Created
March 23, 2016 15:09
-
-
Save pjmelling/d85bc9dd6c3f0b66c041 to your computer and use it in GitHub Desktop.
random_base_36.rb
This file contains 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
length = 8 | |
(36**(length-1) + rand(36**length - 36**(length-1))).to_s(36).upcase |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment