Hacker News new | ask | show | jobs
by axelf4 1400 days ago
Here is my script gfm-preview [1], which I think is pretty cool since it implements a HTTP server in 50 lines of shell script (ab-)use with netcat. What is does is it starts a HTTP server that serves a rendered preview of a Markdown document using GitHub's API for rendering GitHub Flavoured Markdown. The page will automatically update when the document changes using fswatch and HTTP long polling!

[1]: https://github.com/axelf4/nixos-config/blob/e90e897243e1d135...