Skip to content

Instantly share code, notes, and snippets.

@zdenko
Last active May 14, 2016 06:56
Show Gist options
  • Save zdenko/4a084a595ffaebf6b9260f186475d69e to your computer and use it in GitHub Desktop.
Save zdenko/4a084a595ffaebf6b9260f186475d69e to your computer and use it in GitHub Desktop.
Random password
def make_password(len)
len.times.map { [*'0'..'9', *'a'..'z', *'A'..'Z'].sample }.join
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment