Timing performance of functions in shell scripts

I recently started looking at some shell scripts that run fine on big fast powerful systems (i.e. x86 laptops/desktops), but quite slowly on small slow devices. Using time to run the script (or, the amazing hyperfine) works OK if you're timing the entire script execution, but what do you do if you want to time individual functions within the script?

·Clayton Craft
Timing performance of functions in shell scripts

Quick n' Dirty Mobile IRC/Matrix via Weechat

Due to a current lack of usable Weechat relay clients on Linux that work well with mobile display sizes, and a lack of free time on my part to write one, I've come up with this simple (albeit not elegant) way to "run" Glowing Bear in a way that doesn't take up valuable tab space in Firefox. This essentially just runs a new Firefox window in kiosk mode, so that the tab bar, menus, etc are hidden, and makes it "feel" a bit more like a "native app" than a web thing running in a browser tab.

·Clayton Craft
Quick n' Dirty Mobile IRC/Matrix via Weechat

Setting up a mirror for postmarketOS pmaports on Arch Linux

Running a mirror for postmarketOS is fairly simple, and it allows you to alleviate some pressure from the main pmaports mirror if you're installing from pmaports often... Not to mention you'll almost certainly experience a rapid speed-up in downloading from it (compared to the official mirror) if your mirror is local/close.

·Clayton Craft
Setting up a mirror for postmarketOS pmaports on Arch Linux

On removing a stubborn square tapered bottom bracket

I recently acquired enough quality parts to upgrade my road bike's drivetrain from 9 speed to 10 speed. It couldn't have come at a better time too, my old bottom bracket was starting to get that hallmark 'coffee grinder' sound to it.

·Clayton Craft
On removing a stubborn square tapered bottom bracket

Sending/Testing MMS using XMPP

Recently I've been helping out with a fork of mmsd (located here) since MMS is, unfortunately, a crucial thing I need working on a phone in 2021. Anyways, one of the painful things about hacking on mmsd is that receiving a MMS for testing is a manual process. The simplest way to get an MMS is to ask a friend to send you one. Or perhaps purchase a second SIM to use in a second phone to send yourself one. After a while, your friends, family, people you just met, etc will stop responding to your requests to have them send you a MMS. Before you know it, you're sneaking off with your partner's phone while they are sleeping so you can get some work done. This is rock bottom.

·Clayton Craft
Sending/Testing MMS using XMPP

Saving sent mails in aerc + notmuch + mailbox.org, part 2

Well, the previous attempt to solve this problem was a bust, for the following reasons:

  • The template only applied to new mails, not replies
  • The round trip thing where messages had to get filed on the server, then pulled down again by mbsync was slow and annoying
·Clayton Craft
Saving sent mails in aerc + notmuch + mailbox.org, part 2