Rebuild in React

About 3 years ago I created It was a technology-driven pet project; I wanted to learn more about NodeJS and needed a project to work on that.
Since then it has been running and there are still users who use this application on a regular basis.

A few weeks ago I again needed a project to learn more about a technology, this time it was React.
I decided to rebuild because it seemed like a good fit for React. It also has an Android app which could be a nice experiment to rebuild in React Native.


Home Assistant configuration

Home Assistant

I’ve been using Vera Edge for over a year to automate my home.
But it has very limited capabilities for creating automation rules. It does support Lua which enabled me to do most of the automation I needed, but it wasn’t very maintainable.
A while ago I ran into Home Assistant, saw it supports integrating with Vera and started experimenting with it.

Meanwhile, I moved every automation rule from Vera to Home Assistant and I’m use the Vera Edge only for the communicating with my Z-Wave devices.
That appears to be the perfect combination for me.


In my home I’ve the following devices connected to Home Assistant:

WordPress Docker container

WordPress Docker container on

I’m moving all my sites and applications to Docker containers.
The main reason is because it makes the maintenance easier when everything an application needs is included in a single container.
I can run everything on one server or split it up over multiple servers when I need more resources or HA.
I’m currently provisioning everything with Ansible, but I’m looking to solutions that are focused on container orchestration.


To containerize WordPress, I couldn’t find a container on that fits my needs.
So I had to build my own with the following requirements in mind:


Connect a relay board to your Raspberry Pi

If you want to switch things like lights with your Raspberry Pi, you need a relay board.
A relay is an electronic switch that can be switched with a low-voltage signal.
Exactly what the Raspberry Pi offers as GPIO pins.

The relay board I’ve found is ideal for the Raspberry Pi.
It has 8 relays and every relay can separately be switched with the Raspberry Pi because it has 8 GPIO pins.
Also, the voltage needed to switch the relays is 5V, this can be taken directly from the RPi.
This is why you don’t need any additional electronics.


Quickly add a cachebuster to @import statements

This CLI one-liner searches for .css files with @import statements and adds a ‘cache busting’ query string to it.
You can use it to make sure the browser picks up the new CSS files when they are included with @import statements.


find . -iname *.css -exec sed -i -e 's/@import "(.*).css"/@import "1.css?cb=12345"/g' {} ;

(more…) A realtime clipboard - Realtime clipboard

I’ve started a new project to get more familiar with NodeJS and Websockets.
It’s an online clipboard that should make it very easy and fast to share some text between computers or mobile devices.
The only thing you need is the ID of the sender to connect.
After that, every text you type or paste will immediately appear on the receiving-side (ninja style! ;)).

It’s even possible to ‘broadcast’ text by connecting multiple receivers to the sender.


PHP 5.5.13 breaks backwards compatibility

There’s a backwards compatibility break in PHP 5.5.13 (and PHP 5.4.29) affecting PHPUnit, Mockery, Doctrine, Symfony and probably a lot more.
Rafael Dohms triggered me with this Tweet;

And I just ran into the issues with Mockery/PHPUnit;

Failed asserting that exception of type "PHPUnit_Framework_Error_Warning" matches expected exception "SymfonyComponentHttpKernelExceptionNotFoundHttpException". 
Message was: "Erroneous data format for unserializing 'Mockery_9_Symfony_Component_HttpFoundation_File_UploadedFile'".

I found the following sources that explain what happened:

I advise to not upgrade to PHP5.5.13 but wait for PHP5.5.14, it should be released soon.


Debugging Varnish requests with varnishncsa

Varnish provides some tools to help you monitor and debug Varnish’ health.
One of those tools is varnishncsa. When you run it without arguments, it shows a real-time access log in the Apache combined log format.
That’s nice and can come in handy. But, it gets really interesting when you define your own format like this:


Caching WordPress with Nginx

Wordpress caching configuration

I’m running this blog on a small VPS with the help of Nginx and PHP-FPM.
But I noticed the site was not that fast as I wanted it to be.
This is mainly due to the little resources this VPS has. So every request needs to be as efficient as possible.
To make that possible, I want to cache the requests with Nginx to minimize the requests that needs to be handled by PHP-FPM.


Plantronics C520 headset

Plantronics Blackwire C520

I’ve always been a fan of Sennheiser. I have a Sennheiser HD 218 because its on-ear and not too big.
But on my work, I’m constantly switching between a headphone and a headset for using Skype or Google Hangouts.
Time to find a headset that delivers the Sennheiser sound with a microphone for conferencing.

After an intense search I found the Plantronics C520.