Skip to content

Instantly share code, notes, and snippets.

@markogresak
Last active August 29, 2015 13:57
Show Gist options
  • Save markogresak/9708835 to your computer and use it in GitHub Desktop.
Save markogresak/9708835 to your computer and use it in GitHub Desktop.

(A copy of section Command from https://github.com/defunkt/gist )

Command

‌To upload the contents of a.rb just:

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.

gist -f test.rb <a.rb

‌Alternatively, you can just paste from the clipboard:

gist -P

‌Use -p to make the gist private:

gist -p a.rb

‌Use -d to add a description:

gist -d "Random rbx bug" a.rb

‌You can update existing gists with -u:

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

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

gist -c <a.rb

‌If you'd like to copy the resulting embeddable URL to your clipboard, use -e.

gist -e <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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment