Created
June 29, 2017 14:58
-
-
Save mhinz/a65da4ecabbb783f555f39b2f5c1cfb5 to your computer and use it in GitHub Desktop.
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
function! RandNum() abort | |
return str2nr(matchstr(reltimestr(reltime()), '\.\zs\d*')) | |
endfunction | |
function! RandChar() abort | |
return nr2char((RandNum() % 93) + 33) | |
endfunction | |
function! Password() abort | |
return join(map(range(8), 'RandChar()'), '') | |
endfunction | |
echo Password() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment