How to share code snippets from command line is a great service provided by GitHub, useful to share code snippets.
You can share single files, parts of files, or full applications: every gist is a Git repository, which means that it can be forked and cloned.

I’ve developed this simple python script useful to share sourcecode on gist from command line:




Pretty simple!

For example, to publish the gist embed in this post, i’ve used this command:

python ./ [GitHub Username] [GitHub Password]