GitHub Gist is a place to store all your code snippets and notes for easy showcasing or sharing. The service has many official and unofficial clients to post of fetch text. We found a new shell script based client that allows sending text right from the terminal.
The gist script (gist.sh) allows you to post test as a registered user or anonymously. You can send text files or text. When you run the command it returns you the URL of the new gist created.
-f Specify a filename of an existing file to send as a gist. -n Specify the name of a gist you'd like to create (must be used in conjunction with -c) -c Specify the text of the gist you'd like to create (must be used in conjunction with -n) -u Specify the user (default is anonymous) -p Specify the creation of a private (aka "secret") gist. The default is public
Create a gist from a file with a username:
$ gist.sh -u exampleuser -f test.txt
Create an anonymous gist with a name from a text string:
$ gist.sh -n test -c "This is a test\nPlease ignore" //Note that newlines need the \n character.
To get the utility, download the repository. Extract and use the gist.sh script. It uses curl to send your text to the Gist service.