Syntax highlighting in LaTeX with lstlisting

When adding code snippets to my LaTeX documents, I use lstlisting. It is a syntax highlighting environment that can easily be tweaked to match your own styling. To do this you need to use the package listings: \usepackage{listings}. Code snippets are added like this: \begin{lstlisting} Some super cool code snippet… \end{lstlisting} Adding a code snippet from file […]

Configuring Jenkins on Ubuntu (for C++, GTest and Bitbucket)

 Installing wget -q -O – https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add – sudo sh -c ‘echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list’ sudo apt-get update $ sudo apt-get install jenkins Once installed, Jenkins will run at port 8080 on your server. Don’t forget to install a C/C++ compiler Don’t forget to install dependencies like QT, libc++ and […]

iPhone/iPad altitude app (written in Swift)

When passing holidays in the mountains one often wants to know the altitude. Well… what’s better than writing an altitude app yourself? That’s what I’ve done: It took me no more than 2 hours to complete the job and to come up with the above application. The source code is freely available on Github: Altitude.

Swift/iOS: Moving objects with device motion (tilt screen)

One of the cool things of games on smartphones, is that you can control objects using the device motion. But how do you move an object using device tilt (using Swift 2)? To do so you need to use the CMMotionManager (which is part of Apple’s CoreMotion framework). So don’t forget to include the framework at the top […]

Creating a first iPhone app: Liveblog in Swift

Apple announced that Swift would become open source at the WWDC keynote (earlier this week). The perfect moment for me to create my very first iOS app (in the newly released Swift 2 and Xcode 7 beta). So I spent a few hours yesterday and created a real-time live blog app as a front-end for […]

Simple Liveblog to demonstrate WebSockets in Go

Yesterday I had some time left and thought it was the perfect moment to write a very simple live blog to learn more about WebSockets (in Go). Go WebSockets are actually very easy in Go, they work just like the http handler. The required websocket package is not installed by default, but you can easily […]

Installing MAMP (Mac OS X Apache MariaDB PHP) using MacPorts

Update: I updated the blogpost for PHP 7 instead of PHP 5. If you want to update your current PHP 5 installation to a PHP 7 installation, see this blogpost: Migrating/updating from PHP 5 to PHP 7 on OS X (MacPorts). MacPorts is a BSD ports like package management system for OS X. The MacPorts Project is […]

PHP: Unit tests with Travis, PHPUnit and Composer

In a perfect world, every software developer writes tons of unit tests, and uses continuous integration to make sure everything keeps working. Travis, PHPUnit and Composer are there to save you a lot of time! In this blogpost I will explain how to setup Travis and run PHPUnit to run unit tests in a PHP project […]

PHP fragments in Markdown

Ever wanted to use PHP variables and functions in a markdown file and use that file to generate HTML code from the Markdown syntax? Well, it isn’t too hard… Assume you want to parse the following file as Markdown, after executing the PHP fragment: <?php echo $var; ?> ——————- Some text… > Maecenas sed diam […]