Better Work Time Balance

I kinda suck at time management. Well, maybe that’s not entirely accurate. I’m easily distracted, and rubbish at saying “No.”. I try to manage tasks and my time, with Bear and Things3. My work can sometimes be project based. By that I mean structured, long running, and not interrupt driven. In contrast, a lot of my work is interrupt driven. Disparate tasks with different deadlines and changing priorities. This can mean deferring something in progress, in order to pick up some higher priority task.

S3 Browser Upload And S3 Signed URLs

If you want to distribute content for a limited period of time, or allow users to upload content, S3 signed URLs are an ideal solution. Any AWS IAM principal can generate a signed URL, but in order for that signed URL to be useful, the principal that generated the URL must have the necessary permissions to use it. For example, if you would like Joanne to upload a file to an object in an S3 bucket you own, using a signed URL, the principal that generated the signed URL must have permissions to upload to that object key.

Mental Health Awareness Week 2017 - A GAD Update

It’s the Mental Health Foundation’s Mental Health Awareness Week next week, and I’m glad to see campaigns trying to raise wider awareness of mental health issues. FanDuel, my employer, are doing their part internally, by arranging activities and information sharing forums throughout the week. I’d like to contribute to these efforts by talking briefly about my experience of, and progress with, Generalised Anxiety Disorder. I wrote last year about my diagnosis.

GitLabCI With Jekyll And S3

This site is built using Jekyll. The markdown, and other content, is committed to a Git repository. The Git repository has its origin remote connected to GitLab, with another remote connected to GitHub for redundancy. The Jekyll site is built, and the resulting static content is pushed to an AWS S3 bucket. The S3 objects are stored using the reduced redundancy storage module. All of the content can be readily generated from the Git repository, so I can save money by choosing the lower redundancy storage model.

On Being Generally Anxious

I have Generalized Anxiety Disorder, or GAD as it’s often known. I can learn to cope better with it. I can take medication to help with the symptoms. It’s part of who I am. I’m no different now that I’ve written this, than I was before. Though now I’m able to put a label on it. Being able to label myself in that manner, is both a relief, and itself a source of anxiety.

My Puppet VimRC

Those who know me, know that I’m a Vim user. I’ve been using Vim exclusively for over ten years. I’ve tried different editors, and this isn’t the place to start the editor-holy-war-debate, but I’ve always found myself drawn back to Vim for its extensibility, flexibility and power. When I started at FanDuel, I left behind configuration management with Chef and began my journey to understanding Puppet. The excerpt below comes from my ~/.

Security, Passwords and Password Managers

In this post, I want to talk about staying secure online. This is a less technical post that those I often write. It’s aimed at my family and non-technical friends, who perhaps don’t appreciate why security online is so important; why choosing unique, strong passwords is important; and why password managers are for everyone, and not just socially-awkward sysadmin code monkeys like me. If you think "… nobody’s going to be trying to hack my Gmail account …" then read on!

CloudFormation Gotcha With RDS Read Replicas

I’ve spent more time than I’d like this week being perplexed by spurious behaviour in creating a replicated MySQL environment in RDS, with CloudFormation. RDS supports creating up to five MySQL read-replicas to slave off of a running MySQL master. Configuring this using the web console involves selecting a master RDS instance and selecting the option to create a read-replica. Before the read-replica is created, a configuration page allows various parameters to be reviewed and updated.

Getting More Out Of SSH

If you’ve been working with Linux servers for any length of time then you’ve used SSH to connect to a server. Though the way you use SSH and the features you use may vary, SSH is incredibly powerful and has a lot of features the average user may not be aware of, or use. I don’t want to say this is a post about power user features, or a list of hidden tips and tricks; the more you use something, the more you understand it, and more efficiently use it.

My Mac Tools And Config

This is necessarily quite a long article with many sections. The goal of this post is to share the tools I use on a daily basis to get the job done, and where appropriate, give some insight into how I use them. It may prove useful to others who have asked about the tools I use in the past, or it may prove an interesting retrospective on how things have changed in years to come.

Working With Multiple Chef Orgs

The Problem It’s probably quite common that a lot of developers or operations engineers will typically work with a couple of Chef organisations. These organisations might represent the infrastructure configurations for different products; or perhaps a development and production environment, though this scenario is more often accomplished through the use of different Chef environments. But what if the nature of your work means you’re dealing with many Chef organisations at a time?

On Being A Technical Reviewer

While I don’t read as much fiction as I’d like, often favouring audio books from Amazon’s Audible while on the bus, I’m a bit of a sponge for non-fiction (number theory; the history of mathematics; quantum mechanics; web development; cloud computing and DevOps) and hoovering up everything interesting in my RSS reader. One day I’ll get around to writing my own book (perhaps on Amazon Web Services or something development/operations related), but until I manage to make more time and stop procrastinating, being a technical reviewer is a pretty good compromise.

AWS VPN Solutions with StrongSWAN

In this article, I’ll discuss how to connect two or more VPCs which are in different AWS regions. Using static routing, routes cannot be re-advertised and as such it’s not possible to write routing tables that allow a packet to traverse from one VPC to another via an intermediary VPC, where all VPCs are connected by IPSec tunnels. Because of this limitation, if you want complete connectivity between all peered regions, there must exist an IPSec tunnel between each and every region.

Restoring A MySQL Dump To RDS

I’ve spent some of today migrating a MySQL database instance into RDS from another RDS instance in a separate AWS account as part of a larger piece of work. However, there were a few gotchas that caught me out, so it’s worth keeping the following in mind if you’re having issues. To avoid needing to keep typing the MySQL password, it’s a good idea to export MYSQL_PWD=<your password> A first attempt might be a standard mysqldump command such as the following:

Using Test Kitchen

I’ve been keenly watching the evolution of the test-kitchen project and I’ve recently spent some time using it with the minitest busser to validate that my cookbooks do what I intended them to do. Remember, Chef is already well covered by tests to ensure that e.g. its various resources do what they say they’ll do. With that in mind, the key to using test-kitchen is to write tests that validate your intentions, rather than testing that Chef is doing what it’s been asked.

Whisky Web - On Organising A Conference

It’s been a little over a month since the inaugural Whisky Web conference was held in Scotland’s beautiful capital city of Edinburgh. By all accounts, our first endeavour into organising a conference was a roaring success. I’ve procrastinated enough, so I think it’s time to write up a review of the event from an organisers perspective, and present a SWOT-analysis of sorts. It goes without saying that Whisky Web 2012 wouldn’t have been possible without the speakers and delegates that made it the brilliant event that it was.

Whisky Web 2012

Scotland has a thriving and diverse tech community, reflected in such events and organisations as Tech Meetup; various Linux User Groups; the annual Highland Fling web conference; Culture Hack Scotland; The Turing Festival and the Edinburgh International Science Festival to name but a few. I have been fortunate enough to attend previous Highland Flings, and I know others in the web industry who have had fun and positive experiences at other tech events hosted in Scotland.

SSMTP Local MTA Using Google Apps Account

While there are plenty of MTAs out there, I find it quite handy to have SSMTP installed locally; it’s quick to install and configure and lacks some of the overhead of a more enterprise MTA such as Sendmail, Postfix, Exim etc. The following assumes you have a “Google Apps for Domains” user account, e.g., through which you will relay all email. Additionally, the steps below work on Ubuntu 10.10, similar steps should work on other distributions.

Parisian Honeymoon

As much as for us, as for others, I wanted to document our honeymoon to Paris. Monday 30 May 2011 Our flight was scheduled to leave Edinburgh at 13:50 BST, arriving at Paris Charles de Gaulle at 16:40 GMT+1. It was my first flight abroad, and Jo hadn’t been abroad since she was a lot younger. We were a little nervous about getting things right at the airports, and unfortunately things didn’t go quite as smoothly as we had hoped; neither the airport signs nor staff were particularly helpful for the first-time traveller.

Our Wedding

May 28th 2011. A day I’ll never forget; the day Jo and I got married. It’s always difficult finding the time to write new posts, but I’d be remiss if I didn’t at the very least make sure I wrote something about, cliché as it may be, the happiest day of my life. We’d originally planned the wedding for 10th October 2010: of course that date was nothing to do with the fact that 10-10-10 is easy to remember; not was it in any way related to the fact that 101010 in binary represents 42 in decimal – “the answer to life, the universe, and everything”!

Subversion And The Entropy Pool

I ran into an interesting little subversion problem earlier. I was trying to commit a change, and the commit just seemed to hang indefinitely. I couldn’t sent an interrupt, and eventually resorted to killing the process. I tried all sorts of command line options in case there was an authentication problem - with no luck. I then thought I had made a mistake when switching my working copy to a different branch.

Fixing MySQL Multi-Master Replication

I’ve had some exposure to database replication through PostgreSQL/Slony. I’m reasonably familiar with master/slave replication but in the last few days I’ve had to get my hands dirty and grok multi-master replication with MySQL, specifically with two MySQL servers in master<->master mode. Although conceptually it’s not a significant leap from simple master/slave replication the added layer of replication in both directions made my brain melt a little bit at first. Now that I’ve got my head around as much as I need to, I’m writing this as a gentle reminder should replication screw up again!

Display PostgreSQL Query Results Vertically

Those who are familiar with MySQL may be used to terminating a query with \G to have the client output the query results vertically with each column/value pair a line at a time. There is in a equivalent in PostgreSQL too. The psql client uses \x to toggle vertical output, and \g to send the current buffer to the server for processing. To get the same effect in psql as \G in MySQL, just end your query with \x\g\x.