Skip to main content

Baty.net

A blog about everything by Jack Baty 👋
It Really Whips the Llama's Ass

Adding weather to my Fish welcome message

Fish shell welcome message showing weather conditions

Fish shell welcome message showing weather conditions

For some reason, I always want to know the weather conditions. I barely go outdoors, but I still like to know what’s happening. I have a few shell scripts that kick out some version of the weather. Here’s the one I use most:

    #!/bin/sh
    # Jack Baty, 2023 (https://baty.net)
    # Grab and parse weather info using WeatherAPI.com
    
    jq=/opt/homebrew/bin/jq
    
    # Save the response to temporary file
    # TODO: shouldn't this just be a variable or something instead?
    weatherfile=`mktemp`
    curl -s "https://api.weatherapi.com/v1/forecast.json?key=[SNIP]&q=49301&days=1&aqi=no&alerts=no" > $weatherfile
    
    now=`${jq} -r .current.condition.text ${weatherfile}`
    temp=`${jq} -r .current.temp_f ${weatherfile}`
    condition=`${jq} -r .forecast.forecastday[0].day.condition.text ${weatherfile}`
    high=`${jq} -r .forecast.forecastday[0].day.maxtemp_f ${weatherfile}`
    low=`${jq} -r .forecast.forecastday[0].day.mintemp_f ${weatherfile}`
    
    echo "${now} ${temp} | Low ${low}, High ${high}"

Right now, this returns: Light snow 21.9 | Low 20.1, High 26.4

GoAccess and HTTP Protocols

Using GoAccess to process my web server logs is going fine. It’s nice not paying for an analytics service, but it’s definitely a messier process.

I wrote a little about Filtering server logs for use with GoAccess recently, but have since tweaked things a little.

One thing I found annoying was that GoAccess reports requests separated by HTTP protocol. So HTTP2 and HTTP1.1 requests are counted separately. Not what I wanted, so I discovered --http-protocol no and --http-method no. I’m always going to want this, so I added the following to /etc/goaccess/goaccess.config

Blog Questions Challenge (2025)

I was tagged by Kev Quirk to complete a “Blog Questions Challenge”, so here we go.

The questions are:

  1. Why did you start blogging in the first place?
  2. What platform are you using to manage your blog and why did you choose it?
  3. Have you blogged on other platforms before?
  4. How do you write your posts? For example, in a local editing tool, or in a panel/dashboard that’s part of your blog?
  5. When do you feel most inspired to write?
  6. Do you publish immediately after writing, or do you let it simmer a bit as a draft?
  7. What’s your favourite post on your blog?
  8. Any future plans for your blog? Maybe a redesign, a move to another platform, or adding a new feature?

My first 3D print

Back when I regularly maintained a “Spark file1”, I wrote the following on Aug. 26, 2012:

Do something with a 3D Printer

Me, in 2012

Today, I can finally cross that one off the list.

It’s Benchy!

It’s Benchy!

The Bambu Lab A1 arrived yesterday, so I did what everyone does and printed the little “Benchy” tugboat. The A1 only came with 20g of filament, and of course I forgot to order more with the printer, so the starter filament is all I had to work with. It’s so cute, though!l. k

Trying Ghostty

Ghostty is a new, platform-native terminal app from Mitchell Hashimoto. I’ve been alternating between Ghostty and Apple’s Terminal for about a week.

I like Ghostty. It feels nice right out of the box. Configuration is done via a simple text file, but almost no configuration is necessary. Sensible defaults always make a good first impression, and Ghostty makes a really good first impression.

Most of the early reviews I’ve read begin with raves about how fast Ghostty is. Is it that fast, though? It’s pretty fast, actually, but it’s not noticeably faster on my Mac than Apple’s Terminal. I keep comparing the two, and I find no meaningful difference in speed for anything I do with a terminal. It’s not slower than Terminal, certainly, but I suspect that all this talk about speed is partially because we like new things and because everyone else says it’s fast. We’re an impressionable lot 😀.

Handling Kirby content vs code

One of the things that frustrated me about Kirby last year was handling code/template changes vs content changes. I complained about it here.

Ideally, since Kirby is a PHP CMS, I would do everything directly on the server. What I’ve done more often instead, is to run a full copy locally and rsync the final product (code, blueprints, content, images, etc.) to the production instance. Content is kept in plain text files, so both code and content changes need to be kept in sync. 

The Notebook Situation for 2025

It’s the same old story. I don’t know whether I want to use one or multiple notebooks. Or even if I want to use paper notebooks at all. Here are some random thoughts about my intended notebook use for 2025.

Each year for the past 13 years I have ordered a Hobonichi Techo. Some years, I write in one nearly every day. Other years, I fill the first few pages, then it remains mostly blank for the rest of the year. This morning, I (optimistically, as always) set mine up for 2025.