Ubuntu 20.04 Vagrant with Packer

Ubuntu have recently released the new 20.04 LTS codenamed “Focal Fossa”. I’d also recently seen a tool that piqued my interest, Hashicorp Packer. Packer builds machine images that can be deployed to a cloud or as a virtual machine, or just even a plain disk image. You can even generate many images at once, really simplfying deployment. Very handy if you wanted to create virtual machines for a cluster for example, with a similar but slightly different configuration. ...

May 2, 2020 · 3 min · Neil Grogan

Ubiquiti Home Network

Over the summer, I upgraded my home network to Ubiquiti gear. Ubiquiti do business Wifi, all the way up to covering stadiums. I first heard about them from Troy Hunt and then again from Marco Arment on Accidental Tech Podcast. Ubiquiti are popular in prosumer space - for people serious about good Wifi. So far it’s been an excellent experience and I’d highly recommend it. After setting it up (there is a few moving pieces) it has been running without any intervention from me. Being a professional product, it’s not just a home router (with inbuilt wifi), there is a few more pieces you need to buy: ...

November 10, 2019 · 3 min · Neil Grogan

Scraping Transaction Data from KBC Bank

In a previous post, I mentioned importing transactions using ledger/hledger and plain text accounting. As my former bank PTSB recently raised their fees, I decided to move to KBC. I was excited to see, as part of the open payments directive, they have a nice developer portal. I reached out to KBC’s dev team, but alas they are only accepting registered companies, who meet stringent criteria. They told me they hope to open it up soon to end users, I live in hope! ...

May 13, 2019 · 2 min · Neil Grogan

Using IPv6 with Docker Compose on Ubuntu Server

I recently started using PiHole to block ads on my home network. As the name suggests, you install it on a raspberry pi. I left it in situ for about a month, until I decided I wanted to swap out the pi, but keep PiHole. The natural solution to this, is to use a docker container. Rather helpfully, there is a publicly available docker build of PiHole. Simple, right? Well my home network is also IPv6, thus the DNS on the raspberrypi should be also. The problem is, Docker has support for IPv6, but it’s not very straightforward with Docker Compose. ...

February 8, 2019 · 2 min · Neil Grogan

Learning Org Mode

Since hearing about org-mode on the web many years ago, I always meant to give it a spin. I only ever found one two problems: Time - Life eh? It's a mode of Emacs for which I'd also have to learn (again time) So I recently set about solving both shortcomings, as painful as it was to dismiss all the effort I put in to my vim muscle memory over the years. The tough part usually is finding good documentation that is both easy to read and follow. ...

May 20, 2018 · 3 min · Neil Grogan

Favourite Podcasts

Over the last while I’ve been collecting wonderful podcast episodes from the hundreds of hours I’ve listened to. I’ve even workshopped some of my favourites with colleagues and friends (they all approve!). Luckily a neat service called HuffDuffer allows you to create a personalised feed from episodes spanning any podcast you see fit. All you need is a direct link to the MP3 or indeed any format audio file. So here it is, my favourite episodes spanning many podcasts. Mostly I love good stories, with unexpected twists. I suppose you could simplify that to “Surprise and Delight”. Be prepared to be entertained, surprised and delighted… ...

February 1, 2018 · 1 min · Neil Grogan

Python 3 In-Memory Zip File

In Python, BytesIO is the way to store binary data in memory. Most examples you’ll see using zip files in memory is to store string data and indeed the most common example you’ll find online from the zipfile module is zipfile.writestr(file_name, "Text Data"). But what if you want to store binary data of a PDF or Excel Spreadsheet that’s also in memory? You could use zipfile.write() (designed to take binary data) but then you can’t specify a filename (since our in-memory file was never written to a location on disk). The reason for this is simple: for a web request or for a test case, you shouldn’t need to store any files on disk. ...

January 14, 2018 · 2 min · Neil Grogan

The year of self hosting

Over the last month or so, I’ve come to embrace my home server setup and how powerful it can be. Here I have this small little Intel NUC Server, for which I promised myself I would do lots of cool and interesting things with. The first thing I’ve hosted is Plex. I’ve used Docker Compose to bring up a Plex Docker container, with: Filebot (to tag video files) Beets (to tag audio files) Transmission (to download files) Webhook (receives incoming web requests) The way it works is this: ...

January 3, 2018 · 2 min · Neil Grogan

Scraping Data from your Bank in Python

As part of my previous posts, I talked about ledger and plain text accounting. The only part missing is that you need a method to import transactions from your bank. For this I have been doing this by hand, bi-weekly. I would have to do the following: Log in to online banking Go to the transactions page Select the date range for transactions I needed (double check last date of transaction in ledger at this point) Download the Microsoft Excel format file that wasn’t in the proper format Convert this Excel file into a CSV file that matched my import format (watch the dates, is it YYYY-MM-DD or DD/MM/YYYY?) Finally import the CSV file into ledger Check the balance matches between my online banking and ledger Sounds like a lot of work right? ...

July 12, 2017 · 5 min · Neil Grogan

Slack Bots for Work

In a previous post, I mentioned how I get notified of the restaurant menu via a Ruby script. Recently I’ve moved to a totally different product area and the main communication channel we use is Slack. Naturally enough, I ported the Ruby code I wrote, and it now posts the menu every day to our Slack channel. This also got me thinking of what other information would be handy to have. I scouted around for ideas and came up with an obvious one: reminder of the bus times to and from the office. So here’s my bus times notification slack bot: ...

February 16, 2017 · 2 min · Neil Grogan