Using Composer with Drupal 8

With Drupal 8, composer is super easy to use and should be the defacto standard for managing your Drupal projects.

I am not going to go into too much detail here about Composer but in a nushell, Composer is a PHP based package manager that looks after your project dependencies. You need it because it makes your life easier!

To get started, you obviously need to install composer

Hello Drupal 8 World (Again)!

I finally updated my blog so I could leave it dormant for another 2 or 3 years. If you like the theme, it's called Zircon and it's one of the best themes I could find.

The site is pretty much stock Drupal 8 using composer on a AWS Nano instance with Cloudfront. So far it's pretty snappy but I assume my AWS credits are mostly used up from setting up the instance and installing Drupal.

Hello (Drupal 8) World

I recently upgraded this site from Drupal 7 to 8. It was relatively painless, although I didn't actually do an upgrade. It was a fresh install with some selective copy and pastes of a few posts I have written. I also added Disqus and abandoned Drupal's core commenting system to try and deal with spam.

So far, so good. One thing I noticed is that there are very little modules or themes available for D8 which I guess is to be expected considering there isn't a release candidate yet. 

Parse emails and insert into a MySQL Database using PHP

I had a problem where I needed to parse emails and insert them into a MySQL database in real time as they are received. This is a relatively easy problem to figure out, but I wanted to outline the steps I took to tackle this in case anyone else wanted simple, step by step instructions on how to solve this problem.

Using HTML5 Web Storage in Drupal 7

There are a bunch of ways to store data on the client side including cookies, jquery data and HTML5 Web Storage. The problem with using cookies is that if you are trying to do any sort of high performance implementation of Drupal with Varnish, using cookies is not an option because its a cache buster. So enter HTML5 Web Storage. Web storage is supported in Internet Explorer 8+, Firefox, Opera, Chrome, and Safari but not IE 7 or previous versions. I realize that IE7 can still account for a significant portion of a website's traffic but I only develop for IE8 and up.

Geocoding for free

There are lots of options for geocoding addresses out there including MapQuest, Google Geocoding API, Yahoo PlaceFinder and some open source options such as Nominatim and Gisgraphy. Gisgraphy has a cool tool that lets you compare the accuracy of the various geocoders.

If you are geocoding for Canada, one pay service that seems to be extremely accurate is This wasn't an option for me because even at the reasonable price of $1.00 for 400 geocodes, the costs can add up.

Managing linux EC2 instances (or any remote linux machines)

Its been a while since I posted anything so I thought I would talk about how I've setup my servers using Amazon's EC2 cloud services for easy administration. I have several instances running mostly Ubuntu 10.04.

Some of this stuff may be pretty simple to you depending on your level of expertise but it really simplifies administration for me so I wanted to share.

I put all my keys in a folder in my home directory and then I have a file named config in my ~/.ssh folder that looks something like this:

Facebook could easily be used for evil

A friend of mine recently abandoned his web site in favour of Facebook. It got me thinking about all the information on Facebook and how it could be used, specifically for evil purposes. The information about people includes the obvious such as religious and political beliefs and all kinds of other personal data. This combined with your viewing history and the information that could mined is almost infinitely vast.