Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on HN “Why Not Simply”. Parent comment
example usage:
sed -n '/{\"hits\":/p' 1.json|json_reformat|sed 's/ //;s/\\n/ /g'|less
also
instead of entering ^M, we can use something like djb's "addcr" from ucspi-tcp, a simple program that adds a carriage return ("\r") to each line
here is a simple shell version of addcr that also removes indention
x=$(echo x|tr x '\r'); exec sed "s/ *//;s/$/$x/";
stunnel -fd 0 <<eof1 pid=$HOME/1.pid foreground=no [ $$ ] accept=127.0.0.21:80 client=yes connect=graphql.example.com:443 sslVersion=TLSv1.3 eof1 addcr <<eof2|nc -vvn 127.21 80 POST /v1/api HTTP/1.1 Host: graphql.example.com Connection: close Content-Type: x-www-form-urlencoded Content-Length: $((${#@}+141)) {"query":"$@"} eof2 cd;kill $(cat 1.pid);**
There are no comments on this comment yet.
example usage:
sed -n '/{\"hits\":/p' 1.json|json_reformat|sed 's/ //;s/\\n/ /g'|less
also
instead of entering ^M, we can use something like djb's "addcr" from ucspi-tcp, a simple program that adds a carriage return ("\r") to each line
here is a simple shell version of addcr that also removes indention
example usage: