Skip to content

Instantly share code, notes, and snippets.

@jdpaton
Created March 27, 2012 00:09
Show Gist options
  • Save jdpaton/2210886 to your computer and use it in GitHub Desktop.
Save jdpaton/2210886 to your computer and use it in GitHub Desktop.
Generate a random lowercase string with at least one number
python -c "import random; x = [random.choice('23456789') for x in range(1)] + [ random.choice('abcdefghjkmnpqrstwxyz') for x in range(3)]; random.shuffle(x); print ''.join(x)"
@jandubois
Copy link

Finally, I would like to change @_ to @$ as a hidden reference to ActiveState (@$ is ActiveState similar to how *$ is Starbucks):

perl -e'@$=map substr(abcdefghjkmnpqrstwxyz,rand 21,1),1..4;splice@$,rand@$,1,chr 50+rand 8;print @$'

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