Skip to content

Instantly share code, notes, and snippets.

@alivesay
Created November 21, 2012 22:43
Show Gist options
  • Save alivesay/4128332 to your computer and use it in GitHub Desktop.
Save alivesay/4128332 to your computer and use it in GitHub Desktop.
f = File.read(ARGV[0])
puts f.unpack("C*").map{|i| i.to_s(2).rjust(8,"0")}.join(" ")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment