Category: Computers

  • Parsing JSON fields in AWS Log Insights

    Parsing JSON fields in AWS Log Insights

    This just took me too long to figure out to not write down somewhere! Say you have a log of the form: My reading of the log insights docs made me think this ought to work: Because you’re wanting to parse the message field out of the JSON. But it won’t, because rather than interpreting…

  • Adding a (scientifically-useful?) workload to k3s

    Adding a (scientifically-useful?) workload to k3s

    I’ve got a k8s cluster in my cupboard, and the plan here is to work on some debugging and monitoring posts and tools, so I need a workload. The first workload will be folding@home, because it’s easy :) And in a break from helming, I’m going to apply the manifest here. We have a couple…

  • Fixing MacBook Wifi with a Raspberry Pi

    Fixing MacBook Wifi with a Raspberry Pi

    I have an M1 Macbook Pro and a thunderbolt dock, and I am suffering what seems to be a reasonably normal experience of often-poor net connections: https://apple.stackexchange.com/questions/441705/m1-macbook-pro-drops-wifi-periodically My dock (a CalDigit) doesn’t have its own WiFi chipset (quite reasonably – what am I going to plug into it that doesn’t have its own?) but it…

  • Modern laptops are quite good, actually

    Modern laptops are quite good, actually

    There’s some talk in the bits of the Internet I hang out in around how poor modern laptops are. As expected (given the bits of the Internet I frequent) a lot of this boils down to the way modern laptops are not Thinkpads. The most recent thing I read was An Epitaph To Laptops and,…

  • Grafana on k3s (with metallb and nginx)

    Grafana on k3s (with metallb and nginx)

    This is a follow-on from my earlier post, but hopefully k8s is consistent enough that you don’t need to know that. Sadly, this is less helmy :( Use the Prometheus-operator We’ll use the prometheus operator to install and configure prometheus. First, let’s get everything created. This will clone a git repo then create a bunch…

  • K3S with metallb and nginx-ingress

    K3S with metallb and nginx-ingress

    I followed Greg Jeanmart’s tutorial for this a few years back, but things have changed, as they always do in k8s! I’m also lazy and like to steer close to Helm installing stuff. This is all on a Debian machine who’s hostname is nuc Install K3s First, install k3s, without servicelb (we will use metallb)…

  • Learning MacOS

    Learning MacOS

    I’ve just taken a job where I get a Macbook, and here I’m going to keep track of some problems I hit and what their solutions are. Some have no solutions yet – I’m keen to hear them if you know them! This is not a flamey list of things that are awful about MacOS…

  • kubectl port-forward and the lost art of bash job control

    kubectl port-forward and the lost art of bash job control

    A really common part of debugging stuff in k8s is to create a port-forward and then open a new shell and do a thing. Which is fine and easy when you’re port-forwarding to the machine you’re actually sat at, but less so when you’re not.

  • Perl Language server in VS Code

    Perl Language server in VS Code

    Thanks to Grinnz via haxmeister: Do cpan PLS and then install this plugin:

  • Documentation

    Documentation

    Documentation is a last resort. Few people want to read a document, and fewer still want to write it. I think the appropriate attitude towards documentation is to have a little of it as possible. First, try to not write documentation In an ideal world, we don’t need any documentation because everyone already knows everything.…

  • IP address changes

    IP address changes

    All my IP addresses have rather hurriedly changed. If you’re using the names below, you’ll be fine and when the DNS changes propagate (~3h) everything will work again. If you’re not, you’ll need to update things. Ideally to using the names :) fairygodmother.avi.co is now the same IP address as bigbadwolf.avi.co, not just the same…

  • Postfixadmin Installer for Wheezy

    Debian Wheezy ships with Dovecot 2.x which has a different config layout to the 1.x verion in Lenny and Squeeze. In response, I’ve created a wheezy branch of postfixadmin-installer (there’s an issue for it, too) which configures Dovecot 2.x and it’s actually been a really easy switch. In much the same way as the current…

  • Tidying up postfixadmin installer

    I’ve *finally* merged about a billion changes into master in postfixadmin installer, chief amongst them is that most of the boring output now goes to a logfile, the vacation plugin might work after install and it the setup password is randomised. This is all procrastination in order to avoid working out how to configure Dovecot…

  • Sitecreator

    I’ve just spent a few days using up spare holiday, which means I’ve been making things for work that work doesn’t want but I do. This time it’s sitecreator, a tool for configuring websites and all their dependencies (Unix users, databases, ssh keys, DNS records etc.) on servers. Since there’s so many possible things for…

  • Network Manager disabling Virt-manager’s bridge

    This doesn’t work, and it’s filed as bug 1099949 in Ubuntu. So we’ll see how that goes. As of about six hours ago, I’ve had this regularly popping up in my syslog: Jan 13 20:13:54 amazing NetworkManager[1347]: (virbr0): device state change: unavailable -> disconnected (reason ‘none’) [20 30 0] virbr0 is the bridge created by…

  • Converting from Apache1-style to (Debian-style) Apache2-style vhosts

    Yeah, some of us are still doing that migration. Anyway, historically Apache vhosts are all in one file at /etc/apache/httpd.conf or if you’re really lucky something like /etc/apache/vhosts.conf. Apache2 in Debian uses two directories – /etc/apache2/sites-available and /etc/apache2/sites-enabled. sites-available contains one file for each vhost and in order to enable them they’re linked to from…

  • Finding exploited wordpress pages

    WordPress seems to be hilariously easy to compromise (this might be a bad place to write that) and the general form of an exploit is to inject code like this < ?php $a = base64_decode(YSBsb25nIHN0cmluZyBvZiBiYXNlNjQgdGV4dAo=.......); right at the top of a script. base64_decode is rarely used by the Good Guys outside of mailers and doing…

  • Unattended Virtualmin installs

    A while ago I was asked to concoct a fire-and forget script to install Virtualmin without prompting. It’s really easy: #!/bin/bash if [ -z $1 ]; then echo “Usage”; echo ” $0 [hostname]”; echo “”; exit fi wget http://software.virtualmin.com/gpl/scripts/install.sh -O install.sh export VIRTUALMIN_NONINTERACTIVE=”1″ chmod +x install.sh ./install.sh -f -host $1 rm install.sh And then you…