I have found out that it is possible to embed images in a HTML page as base64 strings! I like the idea of having everything as text. I use it to display the favicon on the front page of my web site.
This is very easy:
Convert your favicon to base64:
$ base64 -w 0 favicon.ico
The -w switch is to have the whole string as a single line.
Include this entry in the <head> section of your HTML page:
<link href="data:image/x-icon;base64,AAABAAE...fAAD//wAA" rel="icon" type="image/x-icon" />
I cut the base64 string a little for better visibility.
Another cool use of base64.
I recently read about docker wanting to move all their official images from the likes of Debian/Ubuntu/CentOS to Alpine Linux. This is a fantastic idea!
Alpine is very small, it is similar to the busybox image, but it includes a package manager (apk, similar to apt-get and yum) and the distribution provides about 6,000 packages, including openjdk (a must for a Spring developer like me).
The micro images are very easy to use, we go back to the roots of Linux, before systemd, even before sysv 😉 Alpine is now my base image for everything except when I need to have glibc, that is to say when I need to run binaries compiled against it, and it would be too much hassle to recompile against musl (the libc used by Alpine).