Skip to content

Instantly share code, notes, and snippets.

@danbeam
Created February 29, 2012 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danbeam/1944773 to your computer and use it in GitHub Desktop.
Save danbeam/1944773 to your computer and use it in GitHub Desktop.
Run this and leave it going to impress non-CS people.
#!/bin/bash
while true; do
echo -n ' ';
head -10 /dev/urandom | hexdump -C | head -3 | cut -d' ' -f2-18 | tr "\n" " " | \
sed -e 's/[0-9a-f][0-9a-f]/\x1b[34m&\x1b[0m/g' | \
sed -e 's/[a-c][0-3]/\x1b[41m&\x1b[0m/g' | \
sed -e 's/[d-f][4-6]/\x1b[42m&\x1b[0m/g' | \
sed -e 's/[0-3][0-3]/\x1b[9m&\x1b[0m/g' | \
sed -e 's/[4-6][4-6]/\x1b[7m&\x1b[0m/g' | \
sed -e 's/[7-9][7-9]/\x1b[33m&\x1b[0m/g';
echo;
sleep .05;
done
@danbeam
Copy link
Author

danbeam commented Feb 29, 2012

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