Skip to content

Instantly share code, notes, and snippets.

@yradunchev
Created December 8, 2012 18:10
Show Gist options
  • Save yradunchev/4241200 to your computer and use it in GitHub Desktop.
Save yradunchev/4241200 to your computer and use it in GitHub Desktop.
is.gd on the command line - shorten url directly to the clipboard ready to paste.
#!/bin/bash
baseurl="http://is.gd/create.php?format=simple"
for URL in "$@"; do
curl -s --data-urlencode "url=$URL" "$baseurl" | xclip -selection c
done
exit $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment