Skip to content

Instantly share code, notes, and snippets.

@carymrobbins
Created October 30, 2014 22:05
Show Gist options
  • Save carymrobbins/a98f557631c9a3d8fa2c to your computer and use it in GitHub Desktop.
Save carymrobbins/a98f557631c9a3d8fa2c to your computer and use it in GitHub Desktop.
Execute the latest gist by its FILENAME, GIST id, with PROGRAM.
(export PROGRAM=runhaskell FILENAME=hello.hs GIST=6e4540c5d1970d8ce825 ; curl -s -k -H "Accept: application/vnd.github.v3+json" "https://api.github.com/gists/$GIST" | python -c "import os, sys, json ; print json.loads(sys.stdin.read())['files'][os.environ['FILENAME']]['content']" | $PROGRAM)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment