Skip to content

Instantly share code, notes, and snippets.

@tkanarsky
Last active May 16, 2022 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tkanarsky/720598b25a16ac02a125a2b2b6ad0cde to your computer and use it in GitHub Desktop.
Save tkanarsky/720598b25a16ac02a125a2b2b6ad0cde to your computer and use it in GitHub Desktop.
Cool bash commands, one-liners I found helpful or interesting
# Live audio broadcast over the Internet in one line of bash
# Currently only works for one client
while true; do cat <(echo -e "HTTP/1.1 200 OK\r\nContent-type: audio/mp3\r\nContent-Disposition: inline\r\n\r\n") <(arecord --format=cd | lame -r -) | nc -l 8080; done
# Preview a pandoc-rendered markdown document
# Requires installation of `inotify-tools` `pandoc`, `texlive`, `texlive-latex-extra`
while inotifywait document.md; do pandoc -V geometry:margin=1in document.md -o document.pdf; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment