Skip to content

Instantly share code, notes, and snippets.

@skalnik
Created December 30, 2008 01:59
Show Gist options
  • Save skalnik/41483 to your computer and use it in GitHub Desktop.
Save skalnik/41483 to your computer and use it in GitHub Desktop.
def random_password
chars = ("a".."z").to_a + ("A".."Z").to_a + ("0".."9").to_a
chars.sort_by { rand }[0,7].join
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment