Skip to content

Instantly share code, notes, and snippets.

@jcarbaugh
Created April 11, 2010 03:20
Show Gist options
  • Save jcarbaugh/362467 to your computer and use it in GitHub Desktop.
Save jcarbaugh/362467 to your computer and use it in GitHub Desktop.
-- Get a URL from the clipboard
set longURL to the clipboard
-- The command to get the shortened URL from the Internets (choose 1 method)
set cmd to "curl http://colossalurl.com/api/colossify/?url=" & longURL
-- Run the curl command and set the new URL to the clipboard
set shortURL to do shell script cmd
set the clipboard to shortURL as text
beep
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment