Skip to content

Instantly share code, notes, and snippets.

@chreke
Last active August 29, 2015 14:07
Show Gist options
  • Save chreke/bda3d406809c04409bc8 to your computer and use it in GitHub Desktop.
Save chreke/bda3d406809c04409bc8 to your computer and use it in GitHub Desktop.
Render Markdown and open in browser
#!/usr/bin/env bash
OUTPUT=/tmp/$(basename $1).html
markdown $1 > $OUTPUT
open $OUTPUT
# FIXME: This is a hack to prevent deleting the file before it's opened.
# Is it possible to use `wait` instead?
sleep 1
rm $OUTPUT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment