Git Product home page Git Product logo

gist-1's Introduction

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

There are two ways to set GitHub user and password info:

Using env vars GITHUB_USER and GITHUB_PASSWORD:

$ export GITHUB_USER="your-github-username"
$ export GITHUB_PASSWORD="your-github-password"
$ gist ~/example

Or by having your git config set up with your GitHub username and password.

git config --global github.user "your-github-username"
git config --global github.password "your-github-password"

You can also define github.password to be a command which returns the actual password on stdout by setting the variable to a command string prefixed with !. For example, the following command fetches the password from an item named "github.password" on the Mac OS Keychain:

password = !security 2>&1 >/dev/null find-generic-password -gs github.password | ruby -e 'print $1 if STDIN.gets =~ /^password: \\\"(.*)\\\"$/'

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

gist-1's People

Contributors

defunkt avatar indirect avatar pix avatar akahn avatar headius avatar ermaker avatar rmanalan avatar evanphx avatar jrk avatar boucher avatar adamv avatar alistra avatar brtsz avatar evmar avatar jacknagel avatar jmelis avatar jzellman avatar jbarnette avatar wuputah avatar keithpitt avatar loganj avatar luke-gru avatar ku1ik avatar sr avatar sorah avatar stepheneb avatar homer6 avatar willb avatar taketori avatar ujihisa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.