Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
-- Create a gist from the specified text or the contents of the selected file
--
-- Author: Brian Smith <bsmith@swig505.com>
using terms from application "Quicksilver"
on process text str
my growlRegister()
do shell script "echo '" & str & "' | /usr/local/bin/gist"
growlNotify("Gist Created!", "URL has been copied to clipboard")
end process text
on open _file
my growlRegister()
set _path to quoted form of the POSIX path of _file
do shell script "cat " & _path & " | /usr/local/bin/gist"
growlNotify("Gist created!", "URL has been copied to clipboard")
end open
end using terms from
using terms from application "GrowlHelperApp"
on growlRegister()
tell application "GrowlHelperApp"
register as application "Gist" all notifications {"Alert"} default notifications {"Alert"}
end tell
end growlRegister
on growlNotify(grrTitle, grrDescription)
tell application "GrowlHelperApp"
notify with name "Alert" title grrTitle description grrDescription application name "Gist" icon of file path to me
end tell
end growlNotify
end using terms from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.