Skip to content

Instantly share code, notes, and snippets.

@gom
Created April 7, 2011 10:34
Show Gist options
  • Save gom/907517 to your computer and use it in GitHub Desktop.
Save gom/907517 to your computer and use it in GitHub Desktop.
A input file encoded to BASE64
raise StandardError, __FILE__ + " require <filename>" unless ARGV[0]
str = ''
open(ARGV[0], "r") {|f| str = f.read }
print [str].pack('m').gsub(/\n/, '')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment