Skip to content

Instantly share code, notes, and snippets.

@Lytol
Created January 10, 2009 22:39
Show Gist options
  • Save Lytol/45576 to your computer and use it in GitHub Desktop.
Save Lytol/45576 to your computer and use it in GitHub Desktop.
-- Create a gist from the specified text or the contents of the selected file
--
-- Author: Brian Smith <[email protected]>
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