Skip to content

Instantly share code, notes, and snippets.

@gilesbowkett
Created April 29, 2009 23:59
Show Gist options
  • Select an option

  • Save gilesbowkett/104149 to your computer and use it in GitHub Desktop.

Select an option

Save gilesbowkett/104149 to your computer and use it in GitHub Desktop.
def rubyurl(original_url)
/<permalink>(h.+)<\/permalink>/.match(
RestClient.post("http://rubyurl.com/api/links",
:link => {:website_url => original_url})
)[1]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment