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:
- Install the gist gem
gem install gist
- Enable the Terminal Module in QuickSilver Plug-ins
- Create a new HotKey Trigger
- Hit "." then type the following command into the Select Item field. You only need the bash part if you installed the gist gem using rvm/ruby instead of the system ruby
bash -l -c "pbpaste | gist | pbcopy"
- Tab over to Action field, and select "Run Command in Shell"
- 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.
No comments:
Post a Comment