Windy Gap, Kerry, Ireland

Setting up a Recurring Google Cloud Function With Terraform

I recently needed to run a simple Python script every 10 mins to alert me if a website had been updated, rather than going the traditional route of spinning up a VM with a cronjob running on it I wanted to investigate using a serverless approach. In this guide I’ll show you have to setup a Google Cloud Function and Cloud Scheduler using Terraform.

April 29, 2020

Downloading Sony GPS Ephemeris Data on macOS

What is GPS Ephemeris Data

GPS ephemeris data is used by your GPS devices (smartphone, GPS running watch, camera with built in GPS tagging etc.) to predict which satellites will be in the sky at a particular point in time. Knowing which satellites are available dramatically decreases the amount of time it takes for your device to get a GPS “fix”. The prediction data is usually valid only for a few days so new data needs to be downloaded from the internet periodically.

November 5, 2017

Using Nginx as a Reverse Proxy for Developing Microservices with Docker Compose

Introduction

I’ve recently started using Docker for my development environment. One of the first problems I ran into was how to run multiple Docker Compose microservice projects on the same host if they all need to run on the same port (port 80 for example).

I will outline one of the solutions that involves using Nginx as a reverse proxy to send requests to the correct backend microservice.

April 5, 2016

On The Fly PHP Image Manipulation Server With ImageRack, Heroku and S3

This guide will show you how to install an ImageRack server on an Heroku free dynamo to resize and serve images from an Amazon S3 bucket. ImageRack is an easy to setup on the fly image manipulation server written that I wrote to simplify handling user media uploads.

August 12, 2015
Elastic Beanstalk Logo

Deploying PHP Workers to AWS Elastic Beanstalk

AWS Elastic Beanstalk (EB) is an AWS service that lets you automatically deploy load balanced PHP applications to EC2. One of the lesser know features is the ability to setup EB as a worker to handle long running or computationally intensive tasks (Think image processing/bulk mail sending etc.). EB Workers listen to a SQS queue and automatically run any jobs you put onto the queue. In this post I’ll show you how to setup your own EB PHP worker.

May 17, 2015

Multiple Twig Template Folders with Slim Framework

This post is more for my own records than anything else as I couldn’t find this information anywhere on the internet.

I have a Slim Framework application that uses Twig for it’s templates. I wanted to initiate the Twig instance in my bootstrap file, but then to dynamically update the template directory within my class files depending on the request. It took me a while to figure out how to set Slim to look in multiple directories, or to change the template directory altogether, to render a view.

August 9, 2014

XKCD's "Now" Coded in JavaScript

I love XKCD’s web comics, they always give you a new way of looking at something and a laugh to boot. Yesterday at work I came accross the Now comic. It shows you at a glance what countries are in business hours, or outside them. The image is rendered on the XKCD server and updated every hour when you refresh your page.

March 23, 2014

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