Command line tool for publishing gists
# read from stdin
cat file.sh | gist
# set file name
cat file.sh | gist -f "myfile.sh"
# make public
cat file.sh | gist -p
# multiple files
gist *.js
go get github.com/woremacx/gist
For auth, the tool looks for an environment variable called GITHUB_TOKEN_FOR_GIST
You can generate one at: https://github.com/settings/tokens
export GITHUB_TOKEN_FOR_GIST="blah blah blah"
To use GitHubGist Enterprise, set environment variables: GIST_ENTERPRISE_BASE_URL
and GIST_ENTERPRISE_UPLOAD_URL
export GIST_ENTERPRISE_BASE_URL="https://git.example.com/api/v3/"
export GIST_ENTERPRISE_UPLOAD_URL="https://git.example.com/api/v3/"