Skip to content

Instantly share code, notes, and snippets.

@lkfken
Created June 28, 2012 22:54
Show Gist options
  • Save lkfken/3014516 to your computer and use it in GitHub Desktop.
Save lkfken/3014516 to your computer and use it in GitHub Desktop.
Random URL-safe tokens with SecureRandom
require 'securerandom'
SecureRandom.urlsafe_base64(8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment