Skip to content

Instantly share code, notes, and snippets.

@sousk
Created May 12, 2010 09:36
Show Gist options
  • Save sousk/398385 to your computer and use it in GitHub Desktop.
Save sousk/398385 to your computer and use it in GitHub Desktop.
escape your copied url string
echo `pbpaste` | ruby -e 'require "uri";print $<.gets.chomp!.gsub!(/([^\/]+)/){|m| URI.escape(m)}' | pbcopy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment