Generating asset names for Hexo

One thing I like to do with my web assets is not really to obfuscate them, although that is a side effect, but to guarantee unique asset names (files, images, what have you).

In the past I used to generate an MD5 hash over the asset, but more recently have taken to using UUIDs instead. In Mac OS X you can use the following to get a lowercase representation of the UUID without dashes.

uuidgen | tr "[:upper:]" "[:lower:]" | tr -d "-"