Last active
September 23, 2020 19:51
-
-
Save nhoffman/2968328 to your computer and use it in GitHub Desktop.
Function for getting the contents of a gist
This file contains hidden or 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
gist () { | |
gid=${1:-2968328} | |
curl -s https://api.github.com/gists/$gid | python3 -c 'import json, sys; print(next(iter(json.load(sys.stdin)["files"].items()))[1]["content"])' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment