Custom Envoy xDS server in Golang with Cluster Subsets

At work (at Q42, check it out) we started using Envoy for some use cases. Envoy is a very customizable proxy. Think of it as something like NGINX, but with more dynamic configuration possibilities (NGINX Plus probably also has these, but that is behind a paywall). In this post I’ll explore how you can dynamically configure it, via its control plane API called “xDS”.

Play Framework FormMapping in modern front-end frameworks

One of the celebrated features of Play (at least for me) are the built-in form validation and the JSON parsers and combinators. While the team behind Play wants everything to be reactive, they have not build in support to become reactive on the front-end too: Play supports classical HTTP requests and form posts, but the defined form validation is not easily available in say, JavaScript. Looking at all the work done to expose the Routes to JavaScript makes me wonder why no-one made the validation available too.

Browserify browserified libraries

Browserify does not like to eat his own output. When creating a npm library that is browserified make sure to derequire/minify the output so it can be reused in other projects without mystical ‘Cannot find module X’ errors where X is some file you know nothing about. Possible fixes found in the wild: Setting noParse for bundle A in the bundle B operation; or Running the standalone bundle through derequire; or Minifying the bundle Summary,


Once in a while I’m reminded that good API design is of vital importance. Today was such a day. Everybody developing for either Android or iOS platforms knows that one often needs to run something when the view is loaded or when it will appear. Both platforms provide nifty ‘callbacks’ for this: It is good practice to start listeners onStart and cleaning up onStop (or other equal pairs). This is all good, and if we want to share functionality we simply create a subclass of UIViewController or Activity and we put the shared logic there.

Energy metering with ESP8266

Recently a new energy meter was installed in my home. The new meter is a so called Dutch Smart Meter which means as much as that it is a digital meter instead of the good old Ferraris meter, it will send its usage data to the network operator via GPRS and has a “P1” port which is just a regular RJ11/RJ12 socket over which it transmits using the DSMR protocol (v4.

Building ice/speed skating timing system

One of my projects is building my own timing system for speed skating. I have some ideas of how to build this, but to be sure of the feasibility and needed components I decided to ask some help on reddit/arduino. It is a good description of the project too: In ice skating and speed skating they employ Photoelectric Retroreflective Sensors (lasers) to time passing over the start/finish line. As a hobbyist ice/speed skater I want to build such a system so we can organise competitions with our club, and time results precisely.

Floating point precision, in practice

Normally as a programmer Float’s are more than precise enough. During one of my projects however I had some serious headaches because of it. At start of the project I was rolling my own points in 3D-space, just a fancy wrapper around 3 Doubles. When I needed more vector powers (cross products, quaternations, rotation matrices) I switched to com.github.jpbetz.subspace.Vector3 from This Vector3 uses 3 Floats internally, which was fine, cause it wouldn’t make that much of a difference, I thought.

Strava, inline skating heatmaps

Inline skating is one of my favourite things to do during summer, and I love to explore new routes. With skates however the road quality is very important. If the asphalt has too much gravel the skates shake heavily and the experience is awful. Strava, logging activities for cycling and running has had Heatmaps for quite some time. Also their Route Planner integrates the same data and uses *popularity* to snap routes to frequently traveled roads.

Animating views on Android

Note to self: whenever you try to animate a view that is either GONE or has height 0 this will not work the first time. The moment the user touches the screen or an UI update is triggered only then will the animation start. Of course I found this Stack Overflow question about not starting animations, but the view was defined as being VISIBLE. I also explicitly made the view visible in code – just to be sure – but this was not enough.

Spray JSON

So you’re making yet another Scala app and you need to parse or write some data to file/database/webservice. What do you do? If you’re not already inside an (awesome) framework like Play Framework you will probably search “Scala JSON” and find something like Spray JSON. That’s what I did. So then you write: import import spray.json._ import DefaultJsonProtocol._ val jsonString = largeMapObject.toJson.compactPrint Resource.fromFile("someFile").write(jsonString)(Codec.UTF8) … and you get an exception upon either writing, or parsing this string after it was only partially written.

NewRelic causing OutOfMemoryError in Play Framework app

Today I disabled the NewRelic JVM agent on one of my projects. While the Play Framework server was outputting a ZipOutputStream to a client, the NewRelic agent would for some reason gather massive amounts of data and cause the JVM to Garbage Collect continuously until the app became unresponsive, and finally crashed: Uncaught error from thread [] shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for ActorSystem[play] java.lang.OutOfMemoryError: GC overhead limit exceeded Uncaught error from thread [play-scheduler-1] shutting down JVM since 'akka.

[OS X] Linux Open Directory and Mavericks clients: network accounts need GeneratedUID field

It has been quite some time since the last post on Open Directory on this blog, but I wanted to share something i found out about OS X Mavericks as a OD client. Let’s face it: running a non-Apple server for Apple clients is not your ideal, one-click-solution. It is not officially documented and the blogs are sparse, and more importantly: dated. Most how-to’s date back to 2009 or even older.

HTML5 audio trouble

For a website of a music band that I’m currently developing, I needed a onscreen playlist controlled by javascript. The features are: Save the songs in the same .playlist as the currently playing audio-tag. Save current seek time of the playing audio-tag as it changes. Save current song in the .playlist, so the index. Restore the playing playlist on page load in a .playlist-player element if this exists. This way the audio keeps playing when navigating through the website.

Code Reviews

Scrolling through my twitter timeline I read a tweet from Zef Hemel and found myself reading his blog the complete afternoon. One post that catched my attention was entitled “Never Commit to Master”.

WhatsApp, running on your computer

I previously wrote about playing WhatApp through VNC on your Mac, but this wasn’t useful if you didn’t have a phone near. Anyhow, there has been some development in the reverse engineering of Whatsapp and there are also some great emulators available right now, so I would like to introduce to you: Bluestacks running WhatsAppWarning: you can only have 1 device connected to WhatsApp at the same time. Once you have entered the verification code on your computer, you can’t use WhatsApp on your phone anymore until you reactivate WhatsApp on your phone.

[OS X] High process numbers

Ever experienced high process numbers (20k+) in Finder? That’s probably since some process keeps respawning over and over. Some launchAgents fail to start and launchtcl keeps trying to start them. This is filling your hard disk with logs and keeps your hard disk busy writing, preventing it to spin down. 12-07-12 11:11:25,732 (org.postgresql.postgres[66258]) Exited with code: 1<br /> 12-07-12 11:11:25,732 (org.postgresql.postgres) Throttling respawn: Will start in 10 seconds<br /> 12-07-12 11:11:34,034 com.

Control your home server

Last year I published my Ultimate Single Sign On tool for setting up a perfect Home Server. The work on this project is not yet done and I can use all the help you guys can offer me. Setup is easy: just use VirtualBox, Ubuntu Server and install after a git clone of git://

When you have this (or your own working LDAP server) up and running your users can login on Mac OS X and Ubuntu and can use their home directories and stuff. But they can’t change their credentials and user info, till now..

LDAP Control is a control centre for your Home Server where your users can manage their data (feature #2) but can also start and plan backups (feature #1), browse your families Address Book (feature #3), manage your favorite series and movies through the media centre (feature 4), and much more (when you guys help me).

Git repository for ‘Single Sign On’-project

When I first made my installer for OpenLDAP I did this for my own convenience. But while doing so I realized the script could be useful for more people and I published it on my blog. Then it became big, and I invited Sean to write for my blog about this project. For Sean and you guys I just made a git repository on GitHub so anyone can edit the installer to be the best (and first) SSO-installer ever.

WhatsApp on Mac or PC

Update 13/01/13: run WhatsApp on your pc/mac without a phone/VNC! WhatsApp is a fairly new App for multiple mobile devices. Due to the App Store, Android Market, etc. it grew huge in just a few months. Especially since people started to use them as a replacement for SMS chats and because your identity is based on your mobile number. I think WhatsApp as a service has one disadvantage: it only works on mobile devices.

Want a free/open-source Apple Home Server?

When Apple introduced the Mac Mini server version nobody knew. When Apple discontinued the XServe people started thinking. When the changes for OS X Lion became public and OS X Server was merged into the client-version, everybody should have known. When the rumors came that Apple will stop using Samba and implement their own SMB2 server/client, I knew: Apple wants to give the world an alternative to Windows Home Server (WHS).

Whats in for me?

Backup Network Homedirectories to Time Machine

TimeMachine logoHaving a home server can be very useful when having a lot of computers at home or having a lot of machines with different capabilities. User can then choose which computer they want to use and will always have their home directory, group folders and shares right at the dock. Very convenient. But then you start to think about redundancy and data safety. What happens if your single home server crashes. All files and a lot of work will be lost. So there is a need for backups and since we’re using Mac OS X Server I started to look at Time Machine for backing up home directories.

[Tutorial] OpenLDAP server + Mac OSX clients

Lately I have been busy trying to get my Mac clients to bind to OpenLDAP. I found the learning curve of OpenLDAP very steep. Almost 2 years ago now I did some experimenting with OpenLDAP and quitted because of the lack of tutorials that actually worked at once. I hoped to find an install script that could take away the pain of the configuration. Right now I’ve written one myself and if you just came for that, go on and skip to the download section.

Overerving in JavaScript

Sinds de ontwikkeling van JavaScript wordt het al onderschat. Eerst was de naam LiveScript, maar dat was niet verwarrend genoeg, dus is LiveScript hernoemd naar JavaScript. En dat terwijl het niet van Java afstamt, het niet op Java is gebaseerd en niet op Java lijkt, althans niet meer dan andere programmeertalen.

In JavaScript ontbreken classes en voor programmeurs die Java of C++ gewend zijn is dat wennen, maar zaken als inheritance zijn toch mogelijk in JavaScript door middel van prototypes.

Eerste schaatstraining Utrecht

Nadat afgelopen winter De Vechtsebanen failliet waren verklaard werd het afgelopen zomer overgenomen door Nedstede. Toen we afgelopen zaterdagavond naar de eerste, ingelaste, training gingen bleek de hele baan opgeknapt te zijn in de laatste weken voor de opening. Hier volgt een reportage van onze correspondent ter plaatse, Bram:

[][1] Zojuist is ReplayIt live gezet! De afgelopen maand heb ik met en bij @Q42 ontwikkeld. Op zijn de uitzendingen van Nederland 1, 2 en 3 evenals die van SBS6 terug te zien. Features Uitzendingen van de publieke omroep en SBS. Keyboard navigatie. Basis-functies met uitsluitend de pijltjes en enter. Je persoonlijke afspeellijst samenstellen. Toekomst Stay involved, want binnenkort meer nieuwe functies! Onder andere de uitbreiding van het aanbod met RTL en Veronica.

En de winnaar is: Herman Banken

Persbericht 9292ov: 16-jarige scholier wint 9292-programmeerwedstrijd ‘Bouw de ultieme OV Navigator’ Utrecht, 06-02-2009 16-jarige scholier wint 9292-programmeerwedstrijd ‘Bouw de ultieme OV Navigator’ Vandaag heeft de jury van de wedstrijd ‘Bouw de ultieme OV Navigator’ drie studenten geëerd. De staatssecretaris van Verkeer en Waterstaat, mevrouw Tineke Huizinga, heeft hen de prijzen overhandigd. Een vierde inzending kreeg van de jury een eervolle vermelding. De programmeerwedstrijd is door het informatienummer 9292 gestart om de behoefte van de moderne reiziger beter aan te laten sluiten aan de technische mogelijkheden en kansen rondom de mobiele informatie.

9292 winnaar

Vanochtend vertrok ik van huis met de gedachte dat ik 3e of heel misschien wel 2e zou zijn. Maar tot mijn verrassing bleef mijn naam uit bij de 3e en ook de 2e prijs: ik was eerste!! Meer info als ik thuis ben.

9292 wedstrijd

Op 30 april was het zover.Ik moest de applicatie die ik de afgelopen maand had gebouwd inleveren. De laatste week was ik druk bezig geweest om de applicatie helemaal overnieuw te schrijven want de code was niet meer overzichtelijk en een beetje buggy. Voor de mensen die ik niet dagelijks spreek :wink: : Ik had me opgegeven voor een programmeerwedstrijd van 9292 OV. Deze organisatie wilde een nieuwe mobiele (web)applicatie en vroeg informaticastudenten uit het hele land mee te doen en een applicatie in te leveren.


Gymnasiumdag was weer een succes. Ik deed in Aula 2 het licht met de oude Showtech-tafel, maar ondanks dat dat ding oeroud is werkte hij wel goed. Hier een foto:

Once you go Mac…

You never go back! Maar snelle hardware had ik al, dus dat kon ook anders: Sinds ik mijn iPhone heb ben ik eigenlijk al constant met Mac OSX bezig en nu heb ik het – sinds dit weekend – voor elkaar om op mijn Acer TravelMate 5515WLMi (5510 series) OSX Leopard te draaien. Voor alle Acer 5510 eigenaren: ik heb de LawlessPPC Phemom Leopard distro, die werkt goed op AMD.


Vandaag om 16.30 was het zover! Het iPhone Dev Team heeft de yellowsn0w-unlock uitgebracht. Voorheen waarschuwden ze telkens dat je niet naar de nieuwe baseband kon upgraden want dat zou wel eens een probleem kunnen vormen met een toekomstige unlock, maar vandaag stond er ineens dat het nu ALLEEN maar met de nieuwe firmware (2.28) werkt. Nadat ik firmware 2.2 had gejailbreakt kon ik aan de slag met de unlock.

iPhone 3G unlock

Eindelijk, het is zover: het is het iPhone Dev Team gelukt de iPhone 3G te unlocken. Ik zat al sinds augustus met een niet bellende iPhone, dus dit is geweldig nieuws! Nu kan eindelijk die oude Sony Ericsson K320i weg.

Nieuwe blog

Ik heb deze blog geopend om af en toe wat op te posten over mezelf en mijn hobby’s. Er zal dus niet elke dag een nieuw bericht geplaatst worden.

Voor het blog heb ik gekozen voor – alweer –  WordPress, het is ook zo’n fijn systeem.