David Ogilo

menu search

I recently created a simple program for the game “rock-paper-scissors”, which was for a job application. I decided to publish the code (including PHPUnit tests) on GitHub so if you want to extend or play around with it, please feel free to. The game has two modes – PVC (Player vs. Computer) and CVC (Computer vs. Computer). It can also store the instance and result of your game(s) incase you want to continue on a later date…

Web Schema offers a way to markup site content that is recognised by search engines. It’s currently only developed for WordPress but will look into supporting Drupal in the future. The plugin is still in beta and can be downloaded from GitHub. I’ll be detailing how to use the plugin below.

HOW TO INSTALL

To install the plugin just move the webschema folder to your plugin directory and activate it in the admin interface. Once that is done, you can access the plugin configuration page in…

When trying to call the twitter media upload resource using PECL OAuth, I noticed the API call was failing. I later found out that the reason was because the wrong content type was sent. The header contained Content-Type: application/x-www-form-urlencoded instead of the requiredContent-Type: multipart/formdata

I recently stumbled upon an issue when trying to set cURL as the request engine on PECL OAuth. For some odd reason I got a warning that the expected data type of OAUTH_REQENGINE_CURL was a long and a…

In JavaScript a function or method is automatically assigned a member function, an example is the .toString() function which returns a string representation of the method. Both .call and .apply functions are member functions of the Function prototype. Below I’ll show the uses of both functions and hopefully explain how they work in the process.

OBJECT INHERITANCE

In this example, I’ll be creating a parent and child notation object. The parent contains a function…

This function is useful if you want to display how long ago / from now a content was published etc…

I recently got back from a trip around Croatia in which myself and Sam visited a lot of cool places and islands. Our plan was to visit Zadar (1 night), Plitvice Lakes (2 nights), Hvar (3 nights), Korcula (2 nights), Mljet (2 nights) and Dubrovnik (4 nights) in that order. In this article, I’ll be sharing our wonderful experience.

Zadar

We arrived in Zadar late at night and spent the night at Villa Anton. The hosts were really nice, and the location was perfect. Just 10-15mins drive from the airport, and city centre. Also the guest house is close to…

70 miles, 12 hours, a 7am start, 1 injury and a slight detour but we made it to London in the end….

The day started in Brighton, after a quick photo opportunity by the pier the group of 7 headed along the coast and then up towards Guildford. The first half of the ride was tough, lots of stinging nettles, narrow paths and worst of all hills! After 25 miles of hard riding I overdid it on a hill and pulled my thigh muscle, the rest of the group were still going strong so I tried to carry on but…

I recently stumbled upon an issue when trying to trigger keyboard events on an element and thought I did share how I managed to get it to work.

It seems you’ll need to add a tabindex attribute to the element if you want a keyboard event to be triggered according to this…

I have read a lot of articles online about how to disable the new admin bar introduced in Wordpress 3.1. From what I read, they have not been done the right way. The code below shows you how…

Old school browser detected!

Your browser is out of date, which means you can't use any of the site's required features. You can either upgrade your browser or switch to either Mozilla Firefox or Google Chrome