Setup Mass Dynamic Virtual Hosts on Nginx

Apache has a handy feature that allows you to dynamically serve a domain without having to create a virtualhost for each time, called Dynamic Virtual Hosts. Nginx doesn’t have this feature built in, but it does gives you the tools you need to to set it up in no time. Here is a guide to how I got it working on my server after I transitioned my site from Apache to Nginx.

March 9, 2014
My workspace

My Workspace 2013

I’ve always enjoyed looking at other peoples workspaces, so here is my workspace show and tell.

January 6, 2014
Märket Island

Märket Island and it's Unusual Border

At work I did a course on improving my presentation skills. It was a two half-day course and on the second day we had to give a short (3 minute) presentation on a topic of our choice. I had just recently read a Wikipedia article about Märket Island and I wanted to share the story with the group. I’ve taken the content of my talk and written it up here. My slides are attached below if you want to take a look.


Märket Island is a small rocky 3.3 hectare skerry located half way between the Gulf of Bothnia and the Baltic Sea. The island is completely void of vegetation and is uninhabited. All in all it is a rather uninteresting island save for one unusual fact. But first a bit of history on the island.

December 21, 2013

PWM Exponential LED Fading on Arduino (or other platforms)

For a project I am working on I needed to dim a LED strip light using the PWM (pulse width modulated) outputs on an Arduino. The most straightforward way to do this would have been to linearly vary the output frequency. Shown below in an Arduino sketch:

// Use pin 9 as the PWM output
const int outputPin = 9;

void setup() {
  // Set the pin as a digital output
  pinMode(outputPin, OUTPUT);
}

void loop() {
  // Fade the brightness from 0 (min) to 255 (max) with 40ms delay per step
  for (int brightness = 0; brightness <= 255; brightness++) {
    analogWrite(outputPin, brightness);
    delay(40);
  }
}

However the light outputted by the LED does not scale linearly. If you were to use the very scientific metric of “Perceived Brightness” vs. time for the above sketch it would look something like the below for a linear PWM signal:

brightness_vs_time_linear

December 16, 2013

Experiences with Buying Cheap Arduinos and shields on eBay

Recently I’ve started getting interested in electronics and in particular Arduino. Ardunios are a microcontroller boards that you can programme to perform actions. The board I am interested in is the entry level Ardunio Uno. This board has 14 digital inputs/outputs and 6 analogue inputs. The Arduino can be expanded with Shields, these are addon boards that stack on top of the Arduino to offer additional functionality (like ethernet, storage, motors etc.)

Buying genuine Arduinos in Ireland can be costly because they have to be ordered from suppliers in the US or UK/Europe. Often the cost of shipping and customs exceeds the cost of the Arduino itself!

June 4, 2012
Donald Crowhurst

Donald Crowhurst: The Man Who Sailed Around The World Without Leaving The Atlantic

I Wrote this essay for a college course on Project Management. The guidelines stated we had to write about a project that failed.


Donald Crowhurst Was a British Businessman and amateur sailor who died while competing in the Sunday Times Golden Globe Race, a race to be the first to sail single headedly non-stop around the world. Faced with mounting financial and technical challenges prior to the start of the race Crowhurst departed from Teignmouth, Devon, on the last day permitted by the rules: 31 October 1968. From the beginning of the race Crowhurst realised that his boat was not suitable for the race and began reporting false positions, in an attempt to appear to circumnavigate the world without actually doing so. Four months into the race Crowhurst’s boat was found drifting in the north Atlantic with no one aboard. Evidence from his logbooks indicates that his race ended in insanity and apparent suicide (Hall and Tomalin 1970).

March 8, 2011