Skip to content

Instantly share code, notes, and snippets.

@Boldewyn
Created December 16, 2012 19:38
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Boldewyn/4311962 to your computer and use it in GitHub Desktop.
Save Boldewyn/4311962 to your computer and use it in GitHub Desktop.
Show a Markdown file rendered in the browser. The `markdown` program as well as `base64` must be installed. Assumes, that `x-www-browser` is correctly configured.
#!/bin/bash
MDFILE=$1
x-www-browser $(markdown "$MDFILE" | base64 -w0 | \
cat <(echo -n "data:text/html;charset=UTF-8;base64,") -)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment