Blog Posts

Handling PHP-FPM using Caddy

I've been using Caddy for years as a reverse proxy in front of other services, but recently wanted to use it to directly route traffic to PHP-FPM. Caddy has a specialized reverse proxy directive for PHP-FPM, php_fastcgi, which seemed like it would do the trick, but I found that no traffic was ever getting routed to my FPM pool.

Continue reading...

An Experiment in Journaling

I've been struggling to make time to either journal or draw.

The last I journaled regularly was in the winter of 2016/2017. Before that, it had been a number of years as well. I type so much faster than I write by hand, and my handwriting is atrocious. But when I type my journal entries... it's too easy to get distracted and do something else, or to edit as I go, instead of just letting the words spill out.

As for drawing, it's not that I'm not drawing, it's that I'm not drawing regularly. It's felt like an effort, which is unfortunate, as drawing was what I was doing to relax.

So I made a choice.

Continue reading...

SQL Nested Queries or Sub Queries with Doctrine DBAL

I recently ran into a problem with my website for which the solution was a nested query (sometimes termed a subquery). However, I use Doctrine DBAL for creating my dynamic queries, and there's no documentation on how to do them.

Continue reading...

Comments are Back

For a number of years, I was using Disqus to provide comments on my blog. However, I was increasingly unhappy with how bloated the solution was, how many additional entries I was having to put into my Content Security Policy, and unsure how comfortable I was with having a third party own comments to my own site.

So last year, I removed comments from my site entirely.

This worked fine, and I didn't really think about it much, until somebody reached out to me via email recently, with what was essentially a comment on a blog post, and I realized that nobody else but me was going to benefit from it.

So I started thinking about how to go about adding comments again.

Continue reading...

Fixing issues with Yubico's PAM U2F bindings in version 1.3.1

I've been using a Yubikey for years, now, and on each computer I use, I install their U2F (Universal 2 Factor) bindings for the linux Pluggable Authentication Modules (PAM) support, requiring usage of my Yubikey for login and sudo access.

Today, I updated my work machine, and didn't even notice that there were new pamu2fcfg and libpam-u2f packages, updating to version 1.3.1; I never really care, as everything just works. But when I came back to my machine after lunch, I was unable to login: I'd provide my password, but my Yubikey wouldn't activate.

Continue reading...

A Weekly Priority List in Logseq Journal View

I've been using Logseq for a few years now, and even blogged about it last year. I appreciate how it surfaces todo items on the upcoming day(s), as well as anything I've given a due date in the coming week. That said, one exercise I engage each week is a weekly prioritization for the upcoming week, where I note down the items most important for me to complete. While many of these might have due dates, some might be aspirational or more along the lines of things I can do when I have a few minutes of down time between meetings.

Continue reading...

Roundup of PHP 8.4 Posts

I've recently written several blog posts for Zend (one of the brands I help manage at Perforce) covering changes in the recently released PHP 8.4. If you're curious what to look out for, and how to use some of the new major features, they're worth a read:

Continue reading...

Collapsing the Vivaldi Tab Sidebar

tl;dr: In Vivaldi, middle clicking the separator between the tab sidebar and the web page will either collapse or expand the sidebar; when collapsed, it shows just the tab favicons, and the workspace selector icon.

If you want to know how I got to that point, read on.

Continue reading...

Using resurrect.wezterm to manage Wezterm session state

One of my goals when adopting Wezterm was to replace tmux. To do that, I needed not just the ability to open additional tabs/windows and to split into panes, but also a feature I'd come to rely on heavily in the tmux ecosystem: session saving and restoration, which I accomplished with the tmux-resurrect plugin.

I tried a number of options, but was eventually pointed to resurrect.wezterm.

In this post, I'll detail how I've configured it, as well as a workflow I've developed for interacting with it that gives me (a) reasonable satisfaction that I won't lose work, and (b) additional flexibility for branching off work.

Continue reading...

Managing Wezterm Keybindings, or Merging with Lua

As I expand my Wezterm usage, I find that either (a) a third-party module will have default keybinding configuration I want to adopt, and/or (b) I want to segregate keybindings related to specific contexts into separate modules to simplify my configuration.

Keybindings are stored as a list of tables (what we call associative arrays in PHP). Simple, right?

Unlike in other languages I use, Lua doesn't have a built-in way to merge lists.

So, I wrote up a re-usable function.

Continue reading...