Wednesday, February 10, 2010

Automating gists with QuickSilver

I like to use gist for sharing code snippets. I like to use QuickSilver for automating common tasks. To combine the two is fairly simple:
  1. Install the gist helper script
  2. curl http://github.com/evaryont/gist/tree/master%2Fgist.rb?raw=true > gist
    chmod 755 gist
    sudo mv gist /usr/local/bin/gist
  3. Enable the Terminal Module in QuickSilver Plug-ins
  4. Create a new HotKey Trigger
  5. Hit "." then type in "pbpaste | gist | pbcopy" in the Select Item field
  6. Tab over to Action field, and select "Run Command in Shell"
  7. Save the trigger, then set whatever hotkey you want - I use Cmd-Shift-G - you might need to restart quicksilver for this to take effect
Now you can select some text, copy to clipboard, then hit Cmd-Shift-G to create a gist from the clipboard contents, ending up with a url to that gist now in the clipboard.

0 comments:

Post a Comment