Brain Phrye
code cooking diy fiction reviews personal politics tools

Terraform errors

So terraform has this interesting feature. Say you have resource A and it depends on resource B. But it turns out there’s an error in the definition of resource B. Say resource B has an element that’s a string and there’s a limit to how big the string can be and as defined the string is too large. In that case terraform plan will exit with an error. Which makes sense. Read more

Doing sets in shell

Sometimes I need to take two newline delimited lists and do set operations on them. These generally are outputs from commands. You can do unions, intersections and differences - and in this post I’m going to explore the latter. Specifically A - B. Say you have three directories, A, B and C and you want all the files in A that aren’t in B copied into C. To do this, you can do the following: Read more

Blog update

Upgraded hugo and it broke things in the theme I’d been using. A while back I’d read this rant on website (MFWS) and found it amusing. So while browsing through hugo themes I came across this. And was further amused to see it was inspired by this response to MFWS. Tweaked it and here we are. Will try now to go back to posting regularly.

Bloom Filters

Ever since I first read about them, bloom filters were one of those algorithms that seemed really interesting to use. However I’d never found a use for them - until a few months back. Bloom filters are a space and (often) time efficient data structure. However they’re probablistic; they can be wrong. So what do they actually do? Sometimes you need to know if you’ve seen a piece of data before. Read more


Doesn’t happen often but every now and then I’m confronted with a bunch of files that should have a newline as the last char of the file, but some or all of them don’t. A few months back it was postfix config files (postconf assumes there’s a newline at the end when adding a new config option), and today it was the source files for this blog. In the latter case not exactly required, but “nice to have. Read more

Oatmeal Cookies

When I first moved to Ireland this was the first recipe I got stuck on because I could not find molasses anywhere. I tried to make them a number of times with my Aunt Trixie without molasses but it never tasted right. One day, in a pharmacy, I looked up on a shelf and there it was. I checked and it was for people (this was a rural pharmacy and humans were not the only species catered for). Read more


FOSDEM 2019 is now history. This was my second one and last year’s experience made this year’s trip much better. Being more familiar with the campus and giving a bigger time buffer before and after made a big difference. Just like last year there were oodles of talks but these are the ones that caught my eye - and I either saw them in person or caught them on video or plan to catch them on video.

Read more

The g command in vim

My knowledge of g in vi is kind of ironic. I first learned about it when I learned the etymology of grep. It was from the ed command g/re/p. Ed wasn’t a visual editor. You essentially kept the file in your head and then could bring it up line by line - and change it line by line - in an editor. So the g/re/p command was really useful because you could print all lines (p) that matched a pattern (re) over the entire file (g). Read more

Zsh completion for home grown scripts

I use irssi on a cloud server for my IRC needs. Along with it I’ve written some utility scripts - the most useful is kibo to find all messages sent to myself by searching the irssi logs. Since my home dir is a bit longer lived my scripts keep getting little tweaks and improvements. One I’ve been doing lately is completions. I had hoped yesterday to show a more complicated zsh completion example but so far haven’t gotten it to work. Read more