Skip to content

Instantly share code, notes, and snippets.

@tota
Created April 29, 2010 05:32
Show Gist options
  • Save tota/383194 to your computer and use it in GitHub Desktop.
Save tota/383194 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'base64'
unless 1 == ARGV.size
puts <<EOD
Usage:
LAMdecode.rb filename
EOD
end
s = ''
File.open(ARGV[0]) {|f|
7.times { f.gets } # cut header
while l = f.gets
l.chomp!
s << l
end
}
print Base64.decode64(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment