Create a gist now

Instantly share code, notes, and snippets.

@atmosx /rpass
Last active Aug 29, 2015

What would you like to do?
#!/usr/bin/env ruby
require 'SecureRandom'
x = ARGV[0]
raise"x must be an integer bigger than 0") unless x.to_i > 0
puts SecureRandom.base64(x.to_i)
# ./rpass 12 #=>NV9nS1GZNvLCMvEl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment