Gists are a feature of git, and a nice way to share snippets of code or short documents. They benefit from being private or public, and can be cloned etc like standard git repositories.
To post a git from the command line there is a tool available called gist, installed with brew:
brew install gist
Then set your git username + password:
git config --global github.user "jbloggs"
git config --global github.password "welcome1"