Skip to content

Instantly share code, notes, and snippets.

@datramt
Created April 13, 2019 01:53
Show Gist options
  • Save datramt/ff9efa8feb663a311c1696e6a46a3d7b to your computer and use it in GitHub Desktop.
Save datramt/ff9efa8feb663a311c1696e6a46a3d7b to your computer and use it in GitHub Desktop.
generate binary #bad
hi = 8.upto(15).map do |n| n.to_s(2) end
lo = hi.map do |e| e.dup end
lo.map do |o| o[0] = "0" end
lohi = lo + hi
puts lohi
#found a better way to do this
#proud of this silly thing tho, lol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment