Code Monkey home page Code Monkey logo

gist.sh's Introduction

Unmaintained, doesn’t work.

Since Github API changes. Thanks for stopping by!

About

gist.sh is a simple bash shell script for getting/posting code snippets (gists) from/to http://gist.github.com

Installation

  $ curl https://raw.github.com/gmarik/gist.sh/master/gist.sh > gist.sh && 
    chmod 755 gist.sh && 
    sudo mv gist.sh /usr/local/bin/ 

Usage

  • Posting to GitHub from standard input:
  $ cat file | gist.sh
  $ gist.sh < file

or from a file:

  $ gist.sh -f file

or from the clipboard (xclip must be available)

  $ gist.sh -c

When posting from a file using -f, github will guess the language from the filename extension.

When posting from standard input or the clipboard, you may pass -e to set an extension, from which github assigns the gist language:

  $ gist.sh -e java < file
  $ gist.sh -e java -c
  • Getting from GitHub:
  $ gist.sh 1234

or to write the gist to a file

  $ gist.sh -f file 1234

or to write the gist to the clipboard (xclip must be available)

  $ gist.sh -c 1234
  • Cloning a gist from GitHub:
  $ gist.sh -l 1234

or to clone using the private clone URL to support local update and push (this requires the gist to have been created with authentication):

  $ gist.sh -p -l 1234
  • Use the -d (debug) parameter to show the curl command that would be executed to post or receive a gist rather than actually communicating with github.
  • Gists are public by default. Pass -p or —private to make a gist private.
  • If your git config contains github.user and github.token (see https://github.com/account), they will be used to assign yourself as owner of the posted gist. Use the -a or —anon parameter to post anonymously.

Contributors

1. http://github.com/gmarik

2. http://github.com/rocketraman

gist.sh's People

Contributors

gmarik avatar markcaudill avatar niftylettuce avatar rocketraman 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.