From ca26e663fa861c14aff1f1fb124214cbd7004592 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Sun, 28 Feb 2010 13:02:23 -0800 Subject: [PATCH 1/6] pages --- index.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 index.html diff --git a/index.html b/index.html new file mode 100644 index 0000000..2183c66 --- /dev/null +++ b/index.html @@ -0,0 +1,14 @@ + + + + + + +

+ + + +
+
+ Last modified: Sun Feb 28 13:02:14 PST 2010 + From bb0ce03e23730d7fcb551a6f98ed2e14b0942d0d Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Sun, 28 Feb 2010 13:02:40 -0800 Subject: [PATCH 2/6] manpage --- index.html | 173 ++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 164 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index 2183c66..03f812d 100644 --- a/index.html +++ b/index.html @@ -1,14 +1,169 @@ - - - + + + + + + gist(1) -- gist on the command line + - -

+
+ +

gist(1)

+ +
    +
  1. gist(1)
  2. +
  3. Gist Manual
  4. +
  5. gist(1)
  6. +
+ +

NAME

+

gist -- gist on the command line

+

SYNOPSIS

+ +

gist [-p] [-t extension] FILE

+ +

DESCRIPTION

+ +

gist can be used to create gists on gist.github.com from the command +line. There are two primary methods of creating gists.

+ +

If standard input is supplied, it will be used as the content of the +new gist. If FILE is provided, the content of that file will be used +to create the gist.

+ +

Once your gist is successfully created, the URL will be copied to your +clipboard. If you are on OS X, gist will open the gist in your +browser, too.

+ +

OPTIONS

+ +

gist's default mode of operation is to read content from standard +input and create a public, text gist from it, tied to your GitHub +account if you user and token are provided (see CONFIGURATION).

+ +

These options can be used to change this behavior:

+ +
+
+-p, --private +
+

Create a private gist instead of a public gist.

+
+-t, --type +
+

Set the file extension explicitly. Passing a type of rb ensure +the gist is created as a Ruby file.

+
+ + +

You may additionally ask for help:

+ +
+
+-h, --help +
+

Print help.

+
+-m, --man +
+

Display this man page.

+
+ + +

CONFIGURATION

+ +

Use git-config(1) to display the currently configured GitHub username:

+ +
$ git config --global github.user
+
+ +

Or, set the GitHub username with:

+ +
$ git config --global github.user <username>
+
+ +

See http://github.com/guides/local-github-config for more +information.

+ +

gist will check the HTTP_PROXY env variable if supplied:

+ +
$ HTTP_PROXY=http://host:port/ gist script.py
+
+ +

EXAMPLES

+ +
$ gist < file.txt
+$ echo secret | gist --private
+$ echo "puts :hi" | gist -t rb
+$ gist script.py
+
+ +

BUGS

+ +

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

+ +

AUTHOR

+ +

Chris Wanstrath :: chris@ozmm.org

+ +

SEE ALSO

+

hub(1), git(1), git-clone(1), +http://github.com, +http://github.com/defunkt/gist

+
    +
  1. GITHUB
  2. +
  3. February 2010
  4. +
  5. gist(1)
  6. +
-
-
- Last modified: Sun Feb 28 13:02:14 PST 2010 - +
+ + From dc6800887ae6ec1fc34c22e65fce539139058262 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Wed, 23 Jun 2010 12:40:51 -0700 Subject: [PATCH 3/6] new --- index.html | 298 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 201 insertions(+), 97 deletions(-) diff --git a/index.html b/index.html index 03f812d..f597cf3 100644 --- a/index.html +++ b/index.html @@ -2,73 +2,156 @@ - - gist(1) -- gist on the command line - + - -
- -

gist(1)

- -
    -
  1. gist(1)
  2. -
  3. Gist Manual
  4. -
  5. gist(1)
  6. -
- -

NAME

-

gist -- gist on the command line

-

SYNOPSIS

+ +
+ + + +

gist(1)

+ +
    +
  1. gist(1)
  2. +
  3. Gist Manual
  4. +
  5. gist(1)
  6. +
+ +

NAME

+

gist - gist on the command line

+ +

SYNOPSIS

gist [-p] [-t extension] FILE

-

DESCRIPTION

+

DESCRIPTION

gist can be used to create gists on gist.github.com from the command line. There are two primary methods of creating gists.

@@ -81,7 +164,7 @@

DESCRIPTION

clipboard. If you are on OS X, gist will open the gist in your browser, too.

-

OPTIONS

+

OPTIONS

gist's default mode of operation is to read content from standard input and create a public, text gist from it, tied to your GitHub @@ -90,33 +173,35 @@

OPTIONS

These options can be used to change this behavior:

-
--p, --private -
-

Create a private gist instead of a public gist.

-
--t, --type -
-

Set the file extension explicitly. Passing a type of rb ensure +

-p, --private

Create a private gist instead of a public gist.

+
-t, --type

Set the file extension explicitly. Passing a type of rb ensure the gist is created as a Ruby file.

+
-o, --[no-]open

Open the gist in your browser after creation. Or don't. Defaults +to --open

You may additionally ask for help:

-
--h, --help -
-

Print help.

-
--m, --man -
-

Display this man page.

+
-h, --help

Print help.

+
-m, --man

Display this man page.

-

CONFIGURATION

+

AUTHENTICATION

+ +

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

+ +
    +
  • Using env vars GITHUB_USER and GITHUB_TOKEN

    + +

    $ export GITHUB_USER=johndoe +$ export GITHUB_TOKEN=mysecretgithubtoken +$ gist ~/example

  • +
  • Using git-config(1)

  • +
+

Use git-config(1) to display the currently configured GitHub username:

@@ -125,18 +210,36 @@

CONFIGURATION

Or, set the GitHub username with:

-
$ git config --global github.user <username>
+
$ git config --global github.user <username>
 
-

See http://github.com/guides/local-github-config for more +

See http://github.com/guides/local-github-config for more information.

-

gist will check the HTTP_PROXY env variable if supplied:

+

CONFIGURATION

-
$ HTTP_PROXY=http://host:port/ gist script.py
-
+

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

  • +
+ + +

ENVIRONMENT

-

EXAMPLES

+

The following environment variables affect the execution of gist:

+ +
    +
  • HTTP_PROXY - Proxy to use when Gisting. Should be "http://host:port/"
  • +
+ + +

EXAMPLES

$ gist < file.txt
 $ echo secret | gist --private
@@ -144,26 +247,27 @@ 

EXAMPLES

$ gist script.py
-

BUGS

+

BUGS

-

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

+

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

-

AUTHOR

+

AUTHOR

Chris Wanstrath :: chris@ozmm.org

-

SEE ALSO

+

SEE ALSO

hub(1), git(1), git-clone(1), -http://github.com, -http://github.com/defunkt/gist

+http://github.com, +http://github.com/defunkt/gist

+ -
    -
  1. GITHUB
  2. -
  3. February 2010
  4. -
  5. gist(1)
  6. -
+
    +
  1. GITHUB
  2. +
  3. June 2010
  4. +
  5. gist(1)
  6. +
-
+
From 3f3b9d74de7a9d034bb637e4339e1f063042f5a4 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Wed, 30 Jan 2013 23:37:04 -0800 Subject: [PATCH 4/6] Update index.html --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index f597cf3..1bd02ad 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ gist(1) - gist on the command line - + -
+
- + +
  1. gist(1)
  2. -
  3. Gist Manual
  4. +
  5. Gist manual
  6. gist(1)
-

NAME

-

gist - gist on the command line

+

NAME

+

+ gist - upload code to https://gist.github.com +

-

SYNOPSIS

+

Synopsis

-

gist [-p] [-t extension] FILE

+

The gist gem provides a gist command that you can use from your terminal to +upload content to https://gist.github.com/.

-

DESCRIPTION

+

Installation

-

gist can be used to create gists on gist.github.com from the command -line. There are two primary methods of creating gists.

+
+
If you have ruby installed:

-

If standard input is supplied, it will be used as the content of the -new gist. If FILE is provided, the content of that file will be used -to create the gist.

+

gem install gist

+
If you're using Bundler:

-

Once your gist is successfully created, the URL will be copied to your -clipboard. If you are on OS X, gist will open the gist in your -browser, too.

+

source :rubygems + gem 'gist'

+
-

OPTIONS

-

gist's default mode of operation is to read content from standard -input and create a public, text gist from it, tied to your GitHub -account if you user and token are provided (see CONFIGURATION).

+

Command

-

These options can be used to change this behavior:

+
    +
  • To upload the contents of a.rb just:

    -
    -
    -p, --private

    Create a private gist instead of a public gist.

    -
    -t, --type

    Set the file extension explicitly. Passing a type of rb ensure -the gist is created as a Ruby file.

    -
    -o, --[no-]open

    Open the gist in your browser after creation. Or don't. Defaults -to --open

    -
    +

    gist a.rb

  • +
  • Upload multiple files:

    +

    gist a b c + gist *.rb

  • +
  • By default it reads from STDIN, and you can set a filename with -f.

    -

    You may additionally ask for help:

    +

    gist -f test.rb <a.rb

  • +
  • Alternatively, you can just paste from the clipboard:

    -
    -
    -h, --help

    Print help.

    -
    -m, --man

    Display this man page.

    -
    +

    gist -P

  • +
  • Use -p to make the gist private:

    +

    gist -p a.rb

  • +
  • Use -d to add a description:

    -

    AUTHENTICATION

    +

    gist -d "Random rbx bug" a.rb

  • +
  • You can update existing gists with -u:

    -

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

    +

    gist lib/gist.rb bin/gist -u 42f2c239d2eb57299408

  • +
  • If you'd like to copy the resulting URL to your clipboard, use -c.

    -
      -
    • Using env vars GITHUB_USER and GITHUB_TOKEN

      +

      gist -c <a.rb

    • +
    • If you'd like to copy the resulting embeddable URL to your clipboard, use --copy-js.

      -

      $ export GITHUB_USER=johndoe -$ export GITHUB_TOKEN=mysecretgithubtoken -$ gist ~/example

    • -
    • Using git-config(1)

    • +

      gist --copy-js <a.rb

      +
    • And you can just ask gist to open a browser window directly with -o.

      + +

      gist -o <a.rb

    • +
    • See gist --help for more detail.

    -

    Use git-config(1) to display the currently configured GitHub username:

    +

    Login

    + +

    If you want to associate your gists with your GitHub account, you need to login +with gist. It doesn't store your username and password, it just uses them to get +an OAuth2 token (with the "gist" permission).

    -
    $ git config --global github.user
    +
    gist --login
    +Obtaining OAuth2 access_token from github.
    +GitHub username: ConradIrwin
    +GitHub password:
    +Success! https://github.com/settings/applications
     
    -

    Or, set the GitHub username with:

    +

    This token is stored in ~/.gist and used for all future gisting. If you need to +you can revoke it from https://github.com/settings/applications, or just delete the +file.

    -
    $ git config --global github.user <username>
    -
    + -

    CONFIGURATION

    -

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

    +

    Library

    + +
    +
    You can also use Gist as a library from inside your ruby code:

    + +

    Gist.gist("Look.at(:my => 'awesome').code")

    +
    + + +

    If you need more advanced features you can also pass:

      -
    • 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

    • +
    • :access_token to authenticate using OAuth2 (default is `File.read("~/.gist")).
    • +
    • :filename to change the syntax highlighting (default is a.rb).
    • +
    • :public if you want your gist to have a guessable url.
    • +
    • :description to add a description to your gist.
    • +
    • :update to update an existing gist (can be a URL or an id).
    • +
    • :anonymous to submit an anonymous gist (default is false).
    • +
    • :copy to copy the resulting URL to the clipboard (default is false).
    • +
    • :open to open the resulting URL in a browser (default is false).
    -

    ENVIRONMENT

    +

    NOTE: The access_token must have the "gist" scope.

    -

    The following environment variables affect the execution of gist:

    +
      +
    • If you want to upload multiple files in the same gist, you can:

      + +

      Gist.multi_gist("a.rb" => "Foo.bar", "a.py" => "Foo.bar")

    • +
    • If you'd rather use gist's builtin access_token, then you can force the user +to obtain one by calling:

      + +

      Gist.login!

    • +
    • This will take them through the process of obtaining an OAuth2 token, and storing it +in ~/.gist, where it can later be read by Gist.gist

    • +
    + + +

    GitHub enterprise

      -
    • HTTP_PROXY - Proxy to use when Gisting. Should be "http://host:port/"
    • +
    • If you'd like gist to use your locally installed GitHub Enterprise, +you need to export the GITHUB_URL environment variable in your ~/.bashrc.

      + +

      export GITHUB_URL=http://github.internal.example.com/

    • +
    • Once you've done this and restarted your terminal (or run source ~/.bashrc), gist will +automatically use github enterprise instead of the public github.com

    -

    EXAMPLES

    +

    Configuration

    -
    $ gist < file.txt
    -$ echo secret | gist --private
    -$ echo "puts :hi" | gist -t rb
    -$ gist script.py
    -
    +
      +
    • If you'd like -o or -c to be the default when you use the gist executable, add an +alias to your ~/.bashrc (or equivalent). For example:

      + +

      alias gist='gist -c'

    • +
    • If you'd prefer gist to open a different browser, then you can export the BROWSER +environment variable:

      + +

      export BROWSER=google-chrome

    • +
    -

    BUGS

    -

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

    +

    If clipboard or browser integration don't work on your platform, please file a bug or +(more ideally) a pull request.

    -

    AUTHOR

    +

    If you need to use an HTTP proxy to access the internet, export the HTTP_PROXY or +http_proxy environment variable and gist will use it.

    -

    Chris Wanstrath :: chris@ozmm.org

    +

    Meta-fu

    -

    SEE ALSO

    +

    Thanks to @defunkt and @indirect for writing and maintaining versions 1 through 3. +Thanks to @rking and @ConradIrwin for maintaining version 4.

    -

    hub(1), git(1), git-clone(1), -http://github.com, -http://github.com/defunkt/gist

    +

    Licensed under the MIT license. Bug-reports, and pull requests are welcome.

    -
      -
    1. GITHUB
    2. -
    3. June 2010
    4. +
        +
      1. +
      2. May 2013
      3. gist(1)
      From a38340a0e52dff5cda16ab0888c674deb2de273a Mon Sep 17 00:00:00 2001 From: JBallin Date: Sun, 22 Jul 2018 16:17:01 -0700 Subject: [PATCH 6/6] Remove (deprecated) anon feature --- index.html | 7 ------- 1 file changed, 7 deletions(-) diff --git a/index.html b/index.html index 61889fc..6659c4d 100644 --- a/index.html +++ b/index.html @@ -147,12 +147,6 @@

      Login

      you can revoke it from https://github.com/settings/applications, or just delete the file.

      -
        -
      • After you've done this, you can still upload gists anonymously with -a.

        - -

        gist -a a.rb

      • -
      -

      Library

      @@ -171,7 +165,6 @@

      Library

    5. :public if you want your gist to have a guessable url.
    6. :description to add a description to your gist.
    7. :update to update an existing gist (can be a URL or an id).
    8. -
    9. :anonymous to submit an anonymous gist (default is false).
    10. :copy to copy the resulting URL to the clipboard (default is false).
    11. :open to open the resulting URL in a browser (default is false).