Recently I was creating sets of AWS instances. To configure themselves they needed access to some script functions and a place to share configuration information between them. They would operate as a cluster but there was no way for terraform to tell each machine the ip addresses of the other members. However terraform could inform the last-allocated instance the ip addresses of all the other members so I used an s3 bucket to share around that configuration information as well as some other things.
This episode of Gourmet Makes on Bon Appétit is actually pretty awesome at explaining software development. It involves cooking which most of us vaguely know on some level so it’s more relatable than code.
Claire is a super-knowledgeable chef so she knows her stuff when it comes to cooking. But in this series generally and in this episode in particular she pushes the limits of her experience.
First she does the research and breaks the problem down - how to make instant ramen - explaining why each step is needed.
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.
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:
The software that generates this blog is hugo, a static site
generator. To deploy this I have a Read more
Makefile that runs hugo
but also runs some other bits. One of them minifies the html
to get them to the browser as fast as possible.
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.
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.
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.
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).
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
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).
When last we checked, our
intrepid lazy typer was trying to write a completion rule for
kibo to reduce his keystrokes a microscopic amount.
The working ‘kibo’ completion script:Read more
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.
While looking into something else I came across the Zip Slip vulnerability. Kind of annoying since it’s nearly a year old and I’ve only heard of it now.
Every now and then I keep thinking a neat tool would be something that would run over a project, track every dependency it has and then alert you when there’s a a security issue. However it seems like one of those things people would want but not pay for.
I still use a feed reader and I follow a blog by a U. Toronto sysadmin. He posts pretty much every day and goes after some pretty meaty topic or another. I’ve been wondering how hard that is and what’s to be gained by it so this January I decided to give it a go.
It’s been interesting. I’ve missed a few days - and this weekend diverted into recipes which are kind of technical but not quite.
I’m on a bit of a cracker baking kick. Blame it on GBBO
binge watching. The Cheez-Its was my second cracker recipe to, uh,
take a crack at. The first was this one, Saltines. Through a
number of batches I came up with the following.Read more
My first attempt at Cheez-Its.Read more
I’m working on converting two large svn repos to git. Both have large binary files stored in them so I’m using git lfs to make them more manageable. However the repos are large enough that the normal tools don’t work so I’m using the BFG repo cleaner to do the lfs migration. And this, plus the subgit migration tool leave loads of .gitattributes files laying around.
They’re easy to remove, but I need .
On Monday I discovered that an old Chromebook I have can now support “LinuxApps”. These are a VM + containers that one can use to run straight Linux programs. They descibe using GUI apps, but I just want compilers, vim, my shell, git and the regular crew of dev tools.
And they’re here. Is it the fastest thing ever? No. As I type this I’m having vague flashbacks to connecting up to a shell account via a 9600 baud modem.
One of the nice things about unix is that a lot of your learning is additive. Learning one tool usually doesn’t replace another. Learning perl didn’t mean I stopped using awk for example. The time spent into learning the various tools on unix is therefore pretty well spent - you’ll get a lot of use from what you’ve learned.
However I can think of two circumstance where that didn’t work out.