Skip to content

Instantly share code, notes, and snippets.

@antoniosb
Created June 28, 2017 21:39
Show Gist options
  • Save antoniosb/e100f8185268ae1124e4a23534270b33 to your computer and use it in GitHub Desktop.
Save antoniosb/e100f8185268ae1124e4a23534270b33 to your computer and use it in GitHub Desktop.
Pisco generation
rand_str = -> { (0...5).map { ('A'..'Z').to_a[rand(26)] }.join }
rand_number = -> { SecureRandom.random_number.to_s[-5..-1] }
code=rand_str.call
password=rand_number.call
school_id=85
PiscoDataGenerator.create(code, password, school_id)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment