Created
August 5, 2019 22:01
-
-
Save deevis/318fd40f3374449b378aff5dc16f7dbb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hexdump = ->(bytes,width) {bytes.each_with_index{|b,i| print " [#{i.to_s(16).upcase.rjust(2,'0')}] " | |
if i%width==0; print "#{b.to_s(16).upcase.rjust(2,'0')} "; puts "" if (i+1) % width == 0};nil} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hexdump.call(bytes,8)