I've known for some time that it's possible to embed an image into CSS (useful for greasemonkey scripts), using a format like so:
url(data:[mimetype];base64,[data])
...where [mimetype] is the mime type of your data (eg, image/png).
It's eluded me until now how exactly to get at the [data] bit of this equation. This is simply the base64 encoded string of the actual bytes of the file, which you can get like so:
cat foo.png | base64
This will spit a bunch of garbage to your screen, which you copy and paste into the [data] placeholder.