Skip to content

Instantly share code, notes, and snippets.

@sddamico
Last active November 1, 2018 10:54
Show Gist options
  • Save sddamico/5b3ce62f0741f209cc0f to your computer and use it in GitHub Desktop.
Save sddamico/5b3ce62f0741f209cc0f to your computer and use it in GitHub Desktop.
paste your clipboard to a gist and copy the gist url to the clipboard
gistp() {
if [ -z "$1" ] ; then
echo "Must supply filename for new gist"
exit(1)
else
gisturl=$(pbpaste | gist -f $1)
echo "Copying $gisturl to clipboard"
echo "$gisturl" | pbcopy
fi
}
@sddamico
Copy link
Author

sddamico commented Apr 9, 2015

First:
brew install gist
gist --login

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