Skip to content

Instantly share code, notes, and snippets.

@thegengen
Created September 25, 2009 08:44
Show Gist options
  • Save thegengen/193414 to your computer and use it in GitHub Desktop.
Save thegengen/193414 to your computer and use it in GitHub Desktop.
generate random strings
>> ActiveSupport::SecureRandom.hex(10)
=> "8a2cf0a838e64f6f85d1"
>> ActiveSupport::SecureRandom.base64(10)
=> "fUL81hGd77YyGg=="
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment