Skip to content

Instantly share code, notes, and snippets.

@takuya
Created December 27, 2011 19:12
Show Gist options
  • Save takuya/1524834 to your computer and use it in GitHub Desktop.
Save takuya/1524834 to your computer and use it in GitHub Desktop.
URLのデコード ref: http://qiita.com/items/1469
#!/usr/bin/env ruby
require 'uri'
str = ARGV.join if ARGV.size > 0
str = STDIN.read unless ARGV.size > 0
puts URI.encode(str)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment