Skip to content

Instantly share code, notes, and snippets.

@kenji0x02
Created March 2, 2014 09:58
Show Gist options
  • Save kenji0x02/9304331 to your computer and use it in GitHub Desktop.
Save kenji0x02/9304331 to your computer and use it in GitHub Desktop.
rubyでパスワード生成。アスタリスクで配列を生成して、sampleでランダムに取り出すw
ruby -e "p [*1..9, *'a'..'z'].sample(12).join"
@kenji0x02
Copy link
Author

cat /dev/urandom | tr -dc 'a-z0-9' | head -c 12でもいいかな。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment