Skip to content

Instantly share code, notes, and snippets.

@sigmike
Last active August 29, 2015 14:23
Show Gist options
  • Select an option

  • Save sigmike/5635b6b41ef14d923e0f to your computer and use it in GitHub Desktop.

Select an option

Save sigmike/5635b6b41ef14d923e0f to your computer and use it in GitHub Desktop.
ruby ip seed bitcoin
"178.33.22.32".split(".").reverse.map {|x| "%02x" % x.to_i }.join
=> "201621b2"
puts a.scan(/0x(\w+)/).flatten.map { |x| "* " + x.scan(/../).map { |a| a.to_i(16) }.reverse.join(".") }.join("\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment