Software programmer interested in SRE, DevOps, Machine Learning and Augmented Reality.
lruc: a reverse cURL
Today Thorsten Ball asked a simple question on Twitter: Does something like a reverse-curl exist? A tool that allows me to listen on a socket and return one HTTP response? — Thorsten Ball (@thorstenball) October 27, 2017 After a brief exchange of tweets, I said: Or we could write one in Go 😺 — Lean (inkel) (@inkel) October 27, 2017 Twenty minutes later lruc was born. Oh wow! :)
CLI sort tricks
If you are like me you might have used the sort(1) CLI utility more than once in your life. Today, I’ve found a trick that I’ve never used before, and hopefully it will help someone else in the future. Say that we have the following file to sort: fpdy 01 08 wcfo juvi 01 02 ejan urbx 04 03 ckbw fkzq 01 08 myaz fjie 04 09 rhvo almv 04 02 adhs cuah 07 04 gbyt chok 09 06 nqwo emjd 01 04 ledx npto 02 10 nqsc Now, supposed that I wanted to sort first by the third column and then for the second one, then one would do sort -k 3 foo.