Skip to content

Instantly share code, notes, and snippets.

@danhodge
Created October 2, 2011 20:23
Show Gist options
  • Save danhodge/1257879 to your computer and use it in GitHub Desktop.
Save danhodge/1257879 to your computer and use it in GitHub Desktop.
Ruby Formatting Tips
# Print a 32-bit integer as an 8 character hex string
"%08X" % 65535 # => "0000FFFF"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment