Created
February 12, 2010 12:51
-
-
Save jmcarbo/302530 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
require 'rubygems' | |
require 'uuid' | |
# import random | |
mac = [ 0x00, 0x16, 0x3e, | |
rand(0x7f), | |
rand(0xff), | |
rand(0xff) ] | |
puts mac.map{|a| sprintf("%02x", a).upcase}.join(':') | |
puts UUID.new.generate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment