<?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>Diarmuid.ie</title><link>/</link><description>Recent content on Diarmuid.ie</description><generator>Hugo -- 0.164.0</generator><language>en-IE</language><lastBuildDate>Mon, 03 May 2021 00:00:00 +0000</lastBuildDate><atom:link href="/feed.xml" rel="self" type="application/rss+xml"/><item><title>DIY Garden Shed Build - Part 2: Framing the Walls and Roof</title><link>/blog/diy-garden-shed-build-part-2-framing-the-walls-and-roof/</link><pubDate>Mon, 03 May 2021 00:00:00 +0000</pubDate><guid>/blog/diy-garden-shed-build-part-2-framing-the-walls-and-roof/</guid><description>&lt;p&gt;This is the second part of the &lt;a href="https://diarmuid.ie/tags/diy-shed-build/"&gt;DIY Garden Shed Series&lt;/a&gt; and it&amp;rsquo;s all about building the framing for the walls and roofs. This was easily the most exciting part of the build because you get to see the shape and structure of the shed rise up!&lt;/p&gt;</description></item><item><title>DIY Garden Shed Build - Part 1: Foundations and Base</title><link>/blog/diy-garden-shed-build-part-1-foundations-and-base/</link><pubDate>Mon, 26 Oct 2020 00:00:00 +0000</pubDate><guid>/blog/diy-garden-shed-build-part-1-foundations-and-base/</guid><description>&lt;p&gt;Building a shed is a DIY project that can be tackled by most people. It&amp;rsquo;s small enough to be tackled in a couple of weekends and the end result is a shed that matches your exact specifications for less that it would cost to buy.&lt;/p&gt;
&lt;p&gt;I needed a modestly sized garden shed, mostly for storage (bikes, lawnmower, tools etc.), that would be solid and looked nice. None of the commercially available sheds met the criteria and were within budget so I decided to build my own.&lt;/p&gt;</description></item><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>DIY GoPro Grenade Grip</title><link>/blog/diy-gopro-grenade-grip/</link><pubDate>Thu, 31 Jul 2014 00:00:00 +0000</pubDate><guid>/blog/diy-gopro-grenade-grip/</guid><description>&lt;p&gt;I had a few GoPro parts laying around so I make myself a DIY GoPro Grenade Grip. The grip is rubberised so it provides good drip in dry and wet conditions.&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><item><title>My Workspace 2013</title><link>/blog/my-workspace-2013/</link><pubDate>Mon, 06 Jan 2014 00:00:00 +0000</pubDate><guid>/blog/my-workspace-2013/</guid><description>&lt;p&gt;I&amp;rsquo;ve always enjoyed looking at &lt;a href="http://lifehacker.com/tag/workspace-show-and-tell"&gt;other peoples workspaces&lt;/a&gt;, so here is my workspace show and tell.&lt;/p&gt;</description></item><item><title>Märket Island and it's Unusual Border</title><link>/blog/m%C3%A4rket-island-and-its-unusual-border/</link><pubDate>Sat, 21 Dec 2013 00:00:00 +0000</pubDate><guid>/blog/m%C3%A4rket-island-and-its-unusual-border/</guid><description>&lt;p&gt;&lt;em&gt;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&amp;rsquo;ve taken the content of my talk and written it up here. My slides are attached below if you want to take a look.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;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.&lt;/p&gt;</description></item><item><title>PWM Exponential LED Fading on Arduino (or other platforms)</title><link>/blog/pwm-exponential-led-fading-on-arduino-or-other-platforms/</link><pubDate>Mon, 16 Dec 2013 00:00:00 +0000</pubDate><guid>/blog/pwm-exponential-led-fading-on-arduino-or-other-platforms/</guid><description>&lt;p&gt;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:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-c++" data-lang="c++"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#75715e"&gt;// Use pin 9 as the PWM output
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;const&lt;/span&gt; &lt;span style="color:#66d9ef"&gt;int&lt;/span&gt; outputPin &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;9&lt;/span&gt;;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;void&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;setup&lt;/span&gt;() {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// Set the pin as a digital output
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; pinMode(outputPin, OUTPUT);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;void&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;loop&lt;/span&gt;() {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#75715e"&gt;// Fade the brightness from 0 (min) to 255 (max) with 40ms delay per step
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; &lt;span style="color:#66d9ef"&gt;for&lt;/span&gt; (&lt;span style="color:#66d9ef"&gt;int&lt;/span&gt; brightness &lt;span style="color:#f92672"&gt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;0&lt;/span&gt;; brightness &lt;span style="color:#f92672"&gt;&amp;lt;=&lt;/span&gt; &lt;span style="color:#ae81ff"&gt;255&lt;/span&gt;; brightness&lt;span style="color:#f92672"&gt;++&lt;/span&gt;) {
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; analogWrite(outputPin, brightness);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; delay(&lt;span style="color:#ae81ff"&gt;40&lt;/span&gt;);
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;However the light outputted by the LED does not scale linearly. If you were to use the very scientific metric of &amp;ldquo;Perceived Brightness&amp;rdquo; vs. time for the above sketch it would look something like the below for a linear PWM signal:&lt;/p&gt;
&lt;p&gt;
&lt;figure&gt;
&lt;picture&gt;
&lt;source type="image/webp" srcset="https://diarmuid.ie/blog/pwm-exponential-led-fading-on-arduino-or-other-platforms/brightness-vs-time-linear_hu_52cf05a2cd9b1ec5.webp 360w,/blog/pwm-exponential-led-fading-on-arduino-or-other-platforms/brightness-vs-time-linear_hu_1c14d5a682587e49.webp 480w,/blog/pwm-exponential-led-fading-on-arduino-or-other-platforms/brightness-vs-time-linear_hu_aaf0437f02009d9c.webp 720w" /&gt;
&lt;source type="image/png" srcset="https://diarmuid.ie/blog/pwm-exponential-led-fading-on-arduino-or-other-platforms/brightness-vs-time-linear_hu_24a770e31710c192.png 360w,/blog/pwm-exponential-led-fading-on-arduino-or-other-platforms/brightness-vs-time-linear_hu_5c3843be91a807c9.png 480w,/blog/pwm-exponential-led-fading-on-arduino-or-other-platforms/brightness-vs-time-linear_hu_4227298a6a0ba836.png 720w" /&gt;
&lt;img
src="https://diarmuid.ie/blog/pwm-exponential-led-fading-on-arduino-or-other-platforms/brightness-vs-time-linear_hu_4227298a6a0ba836.png"
width="720"
height="623"
alt="brightness_vs_time_linear"
/&gt;
&lt;/picture&gt;
&lt;/figure&gt;
&lt;/p&gt;</description></item><item><title>Experiences with Buying Cheap Arduinos and shields on eBay</title><link>/blog/experiences-with-buying-cheap-arduinos-and-shields-on-ebay/</link><pubDate>Mon, 04 Jun 2012 00:00:00 +0000</pubDate><guid>/blog/experiences-with-buying-cheap-arduinos-and-shields-on-ebay/</guid><description>&lt;p&gt;Recently I&amp;rsquo;ve started getting interested in electronics and in particular &lt;a href="http://arduino.cc/"&gt;Arduino&lt;/a&gt;. Ardunios are a microcontroller boards that you can programme to perform actions. The board I am interested in is the entry level &lt;a href="http://arduino.cc/en/Main/ArduinoBoardUno"&gt;Ardunio Uno&lt;/a&gt;. 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.)&lt;/p&gt;
&lt;p&gt;Buying genuine Arduinos in Ireland can be costly because they have to be ordered from suppliers in the &lt;a href="http://www.sparkfun.com/products/11021"&gt;US&lt;/a&gt; or &lt;a href="http://uk.farnell.com/arduino"&gt;UK&lt;/a&gt;/&lt;a href="http://store.arduino.cc/eu/index.php?main_page=product_info&amp;amp;cPath=11_12&amp;amp;products_id=195"&gt;Europe&lt;/a&gt;. Often the cost of shipping and customs exceeds the cost of the Arduino itself!&lt;/p&gt;</description></item><item><title>Donald Crowhurst: The Man Who Sailed Around The World Without Leaving The Atlantic</title><link>/blog/donald-crowhurst-the-man-who-sailed-around-the-world-without-leaving-the-atlantic/</link><pubDate>Tue, 08 Mar 2011 00:00:00 +0000</pubDate><guid>/blog/donald-crowhurst-the-man-who-sailed-around-the-world-without-leaving-the-atlantic/</guid><description>&lt;p&gt;&lt;em&gt;I Wrote this essay for a college course on Project Management. The guidelines stated we had to write about a project that failed.&lt;/em&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;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&amp;rsquo;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 &lt;em&gt;and&lt;/em&gt; Tomalin 1970).&lt;/p&gt;</description></item><item><title>About Me</title><link>/about/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/about/</guid><description>&lt;p&gt;Hi I&amp;rsquo;m Diarmuid. I work at &lt;a href="https://wpengine.com"&gt;WP Engine&lt;/a&gt; in Ireland as a Software Engineer with an interest in Infrastructure and DevOps. In my free time I run, code, and build things.&lt;/p&gt;
&lt;p&gt;This is my (infrequently updated) blog.&lt;/p&gt;
&lt;h2 id="where-to-find-me"&gt;Where to find me?&lt;/h2&gt;
&lt;p&gt;
&lt;span class="inline-svg"&gt;
&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round"&gt;
&lt;path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"&gt;&lt;/path&gt;
&lt;rect x="2" y="9" width="4" height="12"&gt;&lt;/rect&gt;
&lt;circle cx="4" cy="4" r="2"&gt;&lt;/circle&gt;
&lt;/svg&gt;
&lt;/span&gt;
&lt;a href="https://www.linkedin.com/in/diarmuidie"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
&lt;span class="inline-svg"&gt;
&lt;svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
stroke-linecap="round" stroke-linejoin="round"&gt;
&lt;path
d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"&gt;
&lt;/path&gt;
&lt;/svg&gt;
&lt;/span&gt;
&lt;a href="https://github.com/diarmuidie"&gt;Github&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>