Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Potentially the best command line gister.

This branch is 0 commits ahead and 0 commits behind master

Merge branch 'oauth'

Conflicts:
	lib/gist.rb
latest commit dab0ea9c30
dr4g0n authored June 25, 2012
Octocat-spinner-32 bin Executable gist binary April 09, 2011
Octocat-spinner-32 lib Merge branch 'oauth' June 25, 2012
Octocat-spinner-32 man 3.1.0 March 22, 2012
Octocat-spinner-32 .gitignore Ignore built gems April 28, 2011
Octocat-spinner-32 LICENSE give credit March 22, 2012
Octocat-spinner-32 README.markdown Update readme. June 25, 2012
Octocat-spinner-32 Rakefile [gist] Switched from ron to ronn May 10, 2010
Octocat-spinner-32 battle.png instructions for real October 10, 2008
Octocat-spinner-32 gist 3.1.0 March 22, 2012
Octocat-spinner-32 gist.gemspec Update gemspec November 06, 2010
README.markdown

Gist: The Script

Works great with Gist: The Website.

Installation

homebrew:

$ brew install gist
$ gist -h

RubyGems:

$ gem install gist
$ gist -h

Old school:

$ curl -s https://raw.github.com/defunkt/gist/master/gist > gist &&
$ chmod 755 gist &&
$ mv gist /usr/local/bin/gist

Ubuntu:

$ sudo apt-get install ruby
$ sudo apt-get install rubygems
$ sudo apt-get install libopenssl-ruby
$ sudo gem install gist
$ sudo cp /var/lib/gems/1.8/bin/gist /usr/local/bin/
$ gist -h

Use

$ gist < file.txt
$ echo secret | gist --private # or -p
$ echo "puts :hi" | gist -t rb
$ gist script.py
$ gist script.js notes.txt
$ pbpaste | gist -p # Copy from clipboard - OSX Only
$ gist -
the quick brown fox jumps over the lazy dog
^D

Authentication

Authentication is a simple process:

$ gist --login
Obtaining OAuth2 access_token from github.
Github username: dr4g0nnn
Github password: 
Success! https://github.com/settings/applications
$

This fetches an OAuth token from GitHub and stores it in '~/.gist'; your username and password are not stored and are only ever transmitted over HTTPS.

Defaults

You can set a few options in your git config (using git-config(1)) to control the default behavior of gist(1).

  • gist.private - boolean (yes or no) - Determines whether to make a gist private by default

  • gist.extension - string - Default extension for gists you create.

  • gist.browse - boolean (yes or no) - Whether to open the gist in your browser after creation. Default: yes

Proxies

Set the HTTP_PROXY env variable to use a proxy.

$ HTTP_PROXY=host:port gist file.rb

Manual

Visit http://defunkt.github.com/gist/ or use:

$ gist -m

Bugs

https://github.com/defunkt/gist/issues

Something went wrong with that request. Please try again.