Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 122 lines (89 sloc) 2.414 kb
f06fba9 @defunkt gah markdown
authored
1 Gist: The Script
2 ================
cc5cf2f @defunkt instructions for real
authored
3
4 Works great with Gist: The Website.
5
f06fba9 @defunkt gah markdown
authored
6 Installation
7 ------------
cc5cf2f @defunkt instructions for real
authored
8
8c90180 @defunkt tweak readme
authored
9 [homebrew](http://mxcl.github.com/homebrew/):
10
bd3bd80 @keithpitt Included an example on how to create a gist from the clipboard on OSX. A...
keithpitt authored
11 ```bash
12 $ brew install gist
13 $ gist -h
14 ```
8c90180 @defunkt tweak readme
authored
15
16 RubyGems:
06a345c @defunkt update install instructions with gem
authored
17
bd3bd80 @keithpitt Included an example on how to create a gist from the clipboard on OSX. A...
keithpitt authored
18 ```bash
19 $ gem install gist
20 $ gist -h
21 ```
06a345c @defunkt update install instructions with gem
authored
22
23 Old school:
24
bd3bd80 @keithpitt Included an example on how to create a gist from the clipboard on OSX. A...
keithpitt authored
25 ```bash
3b83b07 @martine Fix URL to raw gist script in README
martine authored
26 $ curl -s https://raw.github.com/defunkt/gist/master/gist > gist &&
bd3bd80 @keithpitt Included an example on how to create a gist from the clipboard on OSX. A...
keithpitt authored
27 $ chmod 755 gist &&
28 $ mv gist /usr/local/bin/gist
29 ```
cc5cf2f @defunkt instructions for real
authored
30
c8734f8 @homer6 Added the installation instructions for Ubuntu
homer6 authored
31 Ubuntu:
32
bd3bd80 @keithpitt Included an example on how to create a gist from the clipboard on OSX. A...
keithpitt authored
33 ```bash
34 $ sudo apt-get install ruby
35 $ sudo apt-get install rubygems
36 $ sudo apt-get install libopenssl-ruby
37 $ sudo gem install gist
38 $ sudo cp /var/lib/gems/1.8/bin/gist /usr/local/bin/
39 $ gist -h
40 ```
121b26a @defunkt document the new git-config options
authored
41
f06fba9 @defunkt gah markdown
authored
42 Use
43 ---
cc5cf2f @defunkt instructions for real
authored
44
bd3bd80 @keithpitt Included an example on how to create a gist from the clipboard on OSX. A...
keithpitt authored
45 ```bash
46 $ gist < file.txt
47 $ echo secret | gist --private # or -p
48 $ echo "puts :hi" | gist -t rb
49 $ gist script.py
50 $ gist script.js notes.txt
51 $ pbpaste | gist -p # Copy from clipboard - OSX Only
52 $ gist -
53 the quick brown fox jumps over the lazy dog
54 ^D
55 ```
121b26a @defunkt document the new git-config options
authored
56
6829a95 Update README for authentication.
Aupajo authored
57 Authentication
58 --------------
3651d35 @defunkt No more github token. Use your password instead.
authored
59 There are two ways to set GitHub user and password info:
6829a95 Update README for authentication.
Aupajo authored
60
3651d35 @defunkt No more github token. Use your password instead.
authored
61 Using env vars GITHUB_USER and GITHUB_PASSWORD:
3749812 @pix [gist] Updated README.markdown
pix authored
62
bd3bd80 @keithpitt Included an example on how to create a gist from the clipboard on OSX. A...
keithpitt authored
63 ```bash
64 $ export GITHUB_USER="your-github-username"
3651d35 @defunkt No more github token. Use your password instead.
authored
65 $ export GITHUB_PASSWORD="your-github-password"
bd3bd80 @keithpitt Included an example on how to create a gist from the clipboard on OSX. A...
keithpitt authored
66 $ gist ~/example
67 ```
3749812 @pix [gist] Updated README.markdown
pix authored
68
3651d35 @defunkt No more github token. Use your password instead.
authored
69 Or by having your git config set up with your GitHub username and password.
6829a95 Update README for authentication.
Aupajo authored
70
bd3bd80 @keithpitt Included an example on how to create a gist from the clipboard on OSX. A...
keithpitt authored
71 ```bash
72 git config --global github.user "your-github-username"
3651d35 @defunkt No more github token. Use your password instead.
authored
73 git config --global github.password "your-github-password"
bd3bd80 @keithpitt Included an example on how to create a gist from the clipboard on OSX. A...
keithpitt authored
74 ```
6829a95 Update README for authentication.
Aupajo authored
75
3651d35 @defunkt No more github token. Use your password instead.
authored
76 You can also define github.password to be a command which returns the
77 actual password on stdout by setting the variable to a command string
41cac82 @jrk Added new github.token !command description to README.
jrk authored
78 prefixed with `!`. For example, the following command fetches the
3651d35 @defunkt No more github token. Use your password instead.
authored
79 password from an item named "github.password" on the Mac OS
41cac82 @jrk Added new github.token !command description to README.
jrk authored
80 Keychain:
81
bd3bd80 @keithpitt Included an example on how to create a gist from the clipboard on OSX. A...
keithpitt authored
82 ```bash
3651d35 @defunkt No more github token. Use your password instead.
authored
83 password = !security 2>&1 >/dev/null find-generic-password -gs github.password | ruby -e 'print $1 if STDIN.gets =~ /^password: \\\"(.*)\\\"$/'
bd3bd80 @keithpitt Included an example on how to create a gist from the clipboard on OSX. A...
keithpitt authored
84 ```
6829a95 Update README for authentication.
Aupajo authored
85
121b26a @defunkt document the new git-config options
authored
86 Defaults
87 --------
88
89 You can set a few options in your git config (using git-config(1)) to
90 control the default behavior of gist(1).
91
92 * gist.private - boolean (yes or no) - Determines whether to make a gist
93 private by default
94
95 * gist.extension - string - Default extension for gists you create.
96
c326294 @defunkt --no-open and gist.browse
authored
97 * gist.browse - boolean (yes or no) - Whether to open the gist in your
98 browser after creation. Default: yes
121b26a @defunkt document the new git-config options
authored
99
a6df16f @defunkt docs
authored
100 Proxies
101 -------
102
103 Set the HTTP_PROXY env variable to use a proxy.
104
bd3bd80 @keithpitt Included an example on how to create a gist from the clipboard on OSX. A...
keithpitt authored
105 ```bash
106 $ HTTP_PROXY=host:port gist file.rb
107 ```
121b26a @defunkt document the new git-config options
authored
108
72e6bd5 @defunkt manual in readme
authored
109 Manual
110 ------
111
112 Visit <http://defunkt.github.com/gist/> or use:
113
bd3bd80 @keithpitt Included an example on how to create a gist from the clipboard on OSX. A...
keithpitt authored
114 ```bash
115 $ gist -m
116 ```
72e6bd5 @defunkt manual in readme
authored
117
8c90180 @defunkt tweak readme
authored
118 Bugs
119 ----
121b26a @defunkt document the new git-config options
authored
120
50ed19c @defunkt https
authored
121 <https://github.com/defunkt/gist/issues>
Something went wrong with that request. Please try again.