Skip to content

Instantly share code, notes, and snippets.

@daviddoran
Created February 19, 2013 15:22
Show Gist options
  • Save daviddoran/4986809 to your computer and use it in GitHub Desktop.
Save daviddoran/4986809 to your computer and use it in GitHub Desktop.
Needed to generate a few random-looking strings for a spec document. For OSX (pbcopy).
# Generate 7-char string and copy to pasteboard (e.g. "ff757eb" and "41d0a9a")
head -c 10 /dev/urandom | shasum | head -c 7 | pbcopy
# Use date as input
date | shasum | head -c 7 | pbcopy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment