Quick & Easy Random Alphanumeric on OS X (w/ AppleScript)
Often I find myself in situations where a little random string would be very handy, be it a password, a unique identifier, or some sort of throwaway data. The String Generator at random.org is great (and supposedly very random, so a must wherever true randomness is required), but I was looking for something quicker.
In a unixy environment, the following works:
$ head /dev/random | md5 96cfcc873597b02dfa97d3fc0a2fd9a0
While this does work in OS X, it would be nice to run it in a way that would work with my preferred app launcher, ideally without context switching away from whatever I was working on (i.e., not having to bring up Terminal).
The following is one line of AppleScript that leverages the same technique as above, but puts the resulting data into the system clipboard:
After generating a .app from the ActionScript, one simply runs the app and pastes the result as desired.
The generic .app icon is quite bland, so a tiny bit of Context Free Art generates an icon:
Which looks like:

Put it all together and we have a simple Random MD5.app:
