Created
August 24, 2016 05:59
-
-
Save lf-/abed8984634c0f6a1091163b2d1b96cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat file | python2 -c 'import json,sys;print json.dumps({"files":{"f":{"content":sys.stdin.read()}}})' | curl -d '@-' https://api.github.com/gists | grep -Pom1 '(?<="url": ")(.+)(?=")' | sed 's@api\.@gist.@;s@gists/@@' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment