Created
April 25, 2014 19:41
-
-
Save alejomongua/11300756 to your computer and use it in GitHub Desktop.
My own password generator. It depends on xclip and ruby. Works on linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
CHAR_MAP = [('a'..'z'), ('A'..'Z'), ('#'..'9')].map { |i| i.to_a }.flatten | |
pass = (0...10).map { CHAR_MAP[rand(CHAR_MAP.length)] }.join | |
exec "echo #{pass} | xclip -sel clip && echo 'Copied to clipboard'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment