Mockery: returning values and throwing exceptions

Returning values and throwing exceptions for the same mocked method does not work in an obvious way. Explore with me how it works with Mockery.
Author's profile picture Jacob Kiers on development and work

Configure nginx with SSL and SPDY on Ubuntu 12.04 Precise

As an experiment, last night I decided to configure nginx with SSL and SPDY. Finding information on how to getting it working with Ubuntu 12.04 wasn’t that easy, so I decided to write the process down. »
Author's profile picture Jacob Kiers on development and work

How To Dynamically Instantiate Classes In PHP

For Annabel, I need to be able to dynamically instantiate classes, based on options in a configuration file (Zend_Config_Ini). However, some of these classes have constructors (some with required options), others don’t even have a constructor. I first tried to instantiate them with call_user_func_array, like this: »
Author's profile picture Jacob Kiers on annabel and work

40x Speedup With iconv And PHP

For our product Annabel (dutch), we have to cleanup the data our customers provide us with. Because this is a fully automated process, we are unable to give feedback and have them fix their input. Therefore, I need a means to clean the data up, so we can process it. »
Author's profile picture Jacob Kiers on annabel, development, personal and work

The law of God: is it still relevant?

You might wonder whether the law of God as laid out in Scripture is still relevant in the 21st century. In this article I'll try to find an answer to that question.
Author's profile picture Jacob Kiers on religion

PHP daemon with fork howto part 3: Creating a Hello World daemon with fork

Well, it took some time, but now I’m back again with part 3 of the series on creating a PHP daemon with fork. In part 1, the introduction we talked about why I would write this series and gave an outline of it. In part 2 we talked about the way UNIX processes work, what forking is and so on. In this part, we will see how to create a basic daemon which launches processes saying the famous Hello World! »
Author's profile picture Jacob Kiers on phpfork-series, work and php

Automatically add user to Ubuntu Linux and set password

I was wondering how to create a user on my system without requiring a prompt or CLI access. The following script is the result: »
Author's profile picture Jacob Kiers on development

PHP daemon with fork howto part 2: About UNIX processes and PHP

As I’ve written in part 1, the introduction of this series on PHP fork, in this part we will talk about the way processes work in UNIX and Linux, and how we can use this for PHP. »
Author's profile picture Jacob Kiers on development, phpfork-series and work

PHP daemon with fork howto part 1: Introduction

Last weeks, I’ve been writing a daemon in PHP for my work at Alphacomm. It now is quite finished, and I decided to share this knowledge with you in a tutorial. »
Author's profile picture Jacob Kiers on phpfork-series and work

Grace alone

Did someone ever want to give you something of a very very great value? Then you know how hard it can be to just accept it. It is nearly impossible to take it, and if you take it, you nearly drop it. »
Author's profile picture Jacob Kiers on christianity