I just bought a new laptop. After years with netbooks (first the EeePC 4G and then the EeePC 1015PE) this is my first full powered laptop since my Fujitsu Lifebook. I wanted something powerful with good screen resolution and battery life.
I finally decided for the Thinkpad X240. More specifically model 20AMS21B00, which is a university edition and not available in this exact configuration to the general public. Luckily I have connections .
This post features a short review and some hints on configuring the X240 with Xubuntu.
Consistent file icons are a bit of a pet peeve for me. Icons make download links or web based file managers (like in DokuWiki) much nicer to use. But where to get them? Whatever iconset you use, there is always the one type missing you currently need. A long while ago I even started to compile my own icon set but that suffers from the same problem.
What I needed was some icon set that would cover any possible file extension, would look nice in different sizes and is free to use. So I built one. Or more specifically, I created a tool to build such an icon set.
It's creatively named File Icon Generator and is a PHP script utilizing libGD to build the icons.
Icons are created based on a basic template (I decided for the document metapher) and a colored label. The label itself is just the file extension, the color specifies what kind of file it is (based on its mimetype). Eg. image files are blue, audio files green and so on.
The templates are configurable based on mime types as well, so for the bigger sizes some graphics can be added. Eg. a musical note for audio files.
For now it creates 16×16 and 32×32 icons for 1072 known extensions. And this is what it looks like:
The source code is available at Github and pull requests are welcome.
Yesterday I tried to fix a bug a user had reported in one of my DokuWiki plugins. Apparently it only occurred on PHP 5.2. Well, the last PHP 5.2 version was released in 2011 and no modern distribution has it anymore. So how do I test this easily?
After a few failed attempts with finding a virtual machine image that would give me the needed PHP version I decided to come up with my own solution. And because I was curious - I decided to build it on docker.
Docker is an open-source project to easily create lightweight, portable, self-sufficient containers from any application. The same container that a developer builds and tests on a laptop can run at scale, in production, on VMs, bare metal, OpenStack clusters, public clouds and more.
Basically docker provides something that is between a full fledged virtual machine like VirtualBox or VMWare and an application running directly on your system. A docker container will run on your current Linux kernel but will bring its own environment and libraries. A better chroot if you want.
My idea was simple: use the very cool PHPfarm script to compile multiple versions of PHP and provide an Apache server that serves these different versions on different ports.
I'll spare you the details of pain involved in getting a 4 year old PHP version to compile on a modern Debian system but in the end I got it working.
The resulting docker image can be checked out and run like this:
docker pull splitbrain/phpfarm docker run -rm -t -i -e APACHE_UID=$UID -v $PWD:/var/www:rw -p 8052:8052 -p 8053:8053 -p 8054:8054 -p 8055:8055 splitbrain/phpfarm
It will make your current directory accessible via the Ports 8052 to 8055 with different PHP releases respectively.
The Dockerfile and supporting configs I used to build this can be seen at Github.
There were a few things I learned during this project:
Our Nexus 7 tablet has become an invaluable tool in our household. For navigation when we're on vacation, for sending music and video to the TV or HiFi system, as second screen when watching TV and for all kinds of other stuff. In the kitchen it gets used as recipe book regularly. But getting it propped up properly always required some makeshift solution that often proved to be unstable.
Time to build a proper tablet holder for the kitchen. Using some leftovers from our trash bin project I created a holder to hang from an IKEA Grundtal rod. It's just two plywood cutouts held together with two 6mm rods. Simple, but works beautifully for portrait and landscape mode.
Last week I finally got a mail I waited nearly two years for. Double Fine released the first part of their ”Broken Age” adventure game. I backed the game in 2012 together with nearly 90,000 others and it was as far as I know the biggest Kickstarter campaign ever or at least back then. It brought in 3.3 Million Dollars!
So why was everyone so excited about this game? Well, mostly nostalgia. We all loved Adventure games and the guy behind this Kickstarter campaign is Tim Schafer who co-designed games like Monkey Island and Day of the Tentacle and was the Lead on the wonderful Grim Fandango. The prospect of experiencing something like these wonderful games from a lost era again opened up the wallets of nerds worldwide. Expectations were high…