<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Programming on Diarmuid.ie</title><link>/tags/programming/</link><description>Recent content in Programming on Diarmuid.ie</description><generator>Hugo -- 0.164.0</generator><language>en-IE</language><lastBuildDate>Wed, 29 Apr 2020 00:00:00 +0000</lastBuildDate><atom:link href="/tags/programming/feed.xml" rel="self" type="application/rss+xml"/><item><title>Setting up a Recurring Google Cloud Function With Terraform</title><link>/blog/setting-up-a-recurring-google-cloud-function-with-terraform/</link><pubDate>Wed, 29 Apr 2020 00:00:00 +0000</pubDate><guid>/blog/setting-up-a-recurring-google-cloud-function-with-terraform/</guid><description>&lt;p&gt;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&amp;rsquo;ll show you have to setup a Google &lt;a href="https://cloud.google.com/functions"&gt;Cloud Function&lt;/a&gt; and &lt;a href="https://cloud.google.com/scheduler"&gt;Cloud Scheduler&lt;/a&gt; using Terraform.&lt;/p&gt;</description></item><item><title>Downloading Sony GPS Ephemeris Data on macOS</title><link>/blog/downloading-sony-gps-ephemeris-data-on-macos/</link><pubDate>Sun, 05 Nov 2017 00:00:00 +0000</pubDate><guid>/blog/downloading-sony-gps-ephemeris-data-on-macos/</guid><description>&lt;h2 id="what-is-gps-ephemeris-data"&gt;What is GPS Ephemeris Data&lt;/h2&gt;
&lt;p&gt;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 &amp;ldquo;fix&amp;rdquo;. The prediction data is usually valid only for a few days so new data needs to be downloaded from the internet periodically.&lt;/p&gt;</description></item><item><title>Using Nginx as a Reverse Proxy for Developing Microservices with Docker Compose</title><link>/blog/using-nginx-as-a-reverse-proxy-for-developing-microservices-with-docker-compose/</link><pubDate>Tue, 05 Apr 2016 00:00:00 +0000</pubDate><guid>/blog/using-nginx-as-a-reverse-proxy-for-developing-microservices-with-docker-compose/</guid><description>&lt;h2 id="introduction"&gt;Introduction&lt;/h2&gt;
&lt;p&gt;I&amp;rsquo;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).&lt;/p&gt;
&lt;p&gt;I will outline one of the solutions that involves using Nginx as a reverse proxy to send requests to the correct backend microservice.&lt;/p&gt;</description></item><item><title>On The Fly PHP Image Manipulation Server With ImageRack, Heroku and S3</title><link>/blog/on-the-fly-php-image-manipulation-server-with-imagerack-heroku-and-s3/</link><pubDate>Wed, 12 Aug 2015 00:00:00 +0000</pubDate><guid>/blog/on-the-fly-php-image-manipulation-server-with-imagerack-heroku-and-s3/</guid><description>&lt;p&gt;This guide will show you how to install an &lt;a href="https://github.com/diarmuidie/ImageRack"&gt;ImageRack&lt;/a&gt; server on an &lt;a href="https://www.heroku.com/"&gt;Heroku&lt;/a&gt; free dynamo to resize and serve images from an &lt;a href="https://aws.amazon.com/s3/"&gt;Amazon S3&lt;/a&gt; bucket. ImageRack is an easy to setup on the fly image manipulation server written that I wrote to simplify handling user media uploads.&lt;/p&gt;</description></item><item><title>Deploying PHP Workers to AWS Elastic Beanstalk</title><link>/blog/deploying-php-workers-to-aws-elastic-beanstalk/</link><pubDate>Sun, 17 May 2015 00:00:00 +0000</pubDate><guid>/blog/deploying-php-workers-to-aws-elastic-beanstalk/</guid><description>&lt;p&gt;&lt;a href="http://aws.amazon.com/elasticbeanstalk/"&gt;AWS Elastic Beanstalk&lt;/a&gt; (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&amp;rsquo;ll show you how to setup your own EB PHP worker.&lt;/p&gt;</description></item><item><title>Multiple Twig Template Folders with Slim Framework</title><link>/blog/multiple-twig-template-folders-with-slim-framework/</link><pubDate>Sat, 09 Aug 2014 00:00:00 +0000</pubDate><guid>/blog/multiple-twig-template-folders-with-slim-framework/</guid><description>&lt;p&gt;This post is more for my own records than anything else as I couldn&amp;rsquo;t find this information anywhere on the internet.&lt;/p&gt;
&lt;p&gt;I have a &lt;a href="http://slimframework.com/"&gt;Slim Framework&lt;/a&gt; application that uses &lt;a href="http://twig.sensiolabs.org/"&gt;Twig&lt;/a&gt; for it&amp;rsquo;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.&lt;/p&gt;</description></item><item><title>XKCD's "Now" Coded in JavaScript</title><link>/blog/xkcds-now-coded-in-javascript/</link><pubDate>Sun, 23 Mar 2014 00:00:00 +0000</pubDate><guid>/blog/xkcds-now-coded-in-javascript/</guid><description>&lt;p&gt;I love XKCD&amp;rsquo;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 &lt;a href="https://xkcd.com/1335/"&gt;Now&lt;/a&gt; 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.&lt;/p&gt;</description></item><item><title>Setup Mass Dynamic Virtual Hosts on Nginx</title><link>/blog/setup-mass-dynamic-virtual-hosts-on-nginx/</link><pubDate>Sun, 09 Mar 2014 00:00:00 +0000</pubDate><guid>/blog/setup-mass-dynamic-virtual-hosts-on-nginx/</guid><description>&lt;p&gt;Apache has a handy feature that allows you to dynamically serve a domain without having to create a virtualhost for each time, called &lt;a href="https://httpd.apache.org/docs/2.2/vhosts/mass.html"&gt;Dynamic Virtual Hosts&lt;/a&gt;. Nginx doesn&amp;rsquo;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.&lt;/p&gt;</description></item></channel></rss>