Skip to content

Instantly share code, notes, and snippets.

@max
Created July 29, 2010 21:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save max/499281 to your computer and use it in GitHub Desktop.
Save max/499281 to your computer and use it in GitHub Desktop.
require 'digest/md5'
email = 'nick@bylinebreak.com'
secret = 'FLAREAPPISAWESOME'
md5 = Digest::MD5.hexdigest(email + secret)
random_charset = Array.new(10) { (rand(122-97) + 97).chr }.join
serial = md5.tr('0-9', random_charset).upcase
puts serial
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment