Skip to content

Instantly share code, notes, and snippets.

@bagwanpankaj
Created January 26, 2011 17:38
Show Gist options
  • Save bagwanpankaj/797078 to your computer and use it in GitHub Desktop.
Save bagwanpankaj/797078 to your computer and use it in GitHub Desktop.
Shortly Blog entries
shortly 'http://shortme.com/' #uses googl service and shorten method by default
shortly ‘http://shortme.com/’ -s bitly -l -p -m method-to-use
shortly 'http://areallylongurl.com/that/frustates/you' -s isgd
shortly 'http://areallylongurl.com/that/frustates/you' -s vgd
shortly 'http://areallylongurl.com/that/frustates/you' -s tinyurl
shortly 'http://areallylongurl.com/that/frustates/you' -s bitly -l a-login -p an-apiKey
shortly 'http://short.ly/I' -s bitly -m expand -l a-login -p an-apiKey
shortly 'http://short.ly/I' -m expand
shortly 'http://short.ly/I' -m analytics
#Googl
googl = Shortly::Clients::Googl
googl.apiKey = 'YOUR-API-KEY' #optional but attaches your shortened url to your account and gives more limit a day
googl.shorten 'http://areallylongurl.com/that/frustates/you'
googl.expand 'http://short.ly/I
googl.analytics 'http://short.ly/I
#
#Bitly
bitly = Shortly::Clients::Bitly
bitly.login = 'YOUR-LOGIN'
bitly.apiKey = 'YOUR-API-KEY'
bitly.shorten 'http://areallylongurl.com/that/frustates/you'
bitly.expand 'http://short.ly/I'
#
#Isgd
isgd = Shortly::Clients::Isgd
isgd.shorten 'http://areallylongurl.com/that/frustates/you'
#
#Vgd
vgd = Shortly::Clients::Vgd
vgd.shorten 'http://areallylongurl.com/that/frustates/you'
#
#Snim
snim = Shortly::Clients::Snim
snim.apiKey = "<apiKey>"
snim.login = "<login>"
snim.shorten 'http://areallylongurl.com/that/frustates/you'
snim.expand 'isfdgG7' #you can also specify id
gem install shortly [-v=<your-version-of-choice>]
#or for Bundler user
gem 'shortly' #then
bundle install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment