Wikipedia @ 25: Wesley Merritt

Duration

Podcast Version

This post is also available as a podcast. Listen here, download for later, or subscribe wherever you consume podcasts.

To celebrate the site’s 25th birthday this year, Wikipedia is encouraging/challenging people to read one Wikipedia article a day for 25 consecutive days. I felt that I could do one better than that: not only reading an article but – where I found one that was particularly interesting – to write a blog post or record a podcast episode for each of those days, sharing what I learned. For each entry, I’ll hit “random article” a few times until something catches my interest, start reading, and then start writing! Everything I’ve written below came from Wikipedia… so you should check other sources before you use it to do your homework. Happy birthday, Wikipedia!


Today’s random article: Governor-General of the Philippines
Today’s topic: Wesley Merritt

The Philippines spent a lot of modern history under colonial rule:

  • First, from 1565, by the Spanish out of their Viceroyalty of New Spain (Mexico).
  • Then by the British for a few years who captured it after Spain sided with France in the Seven Years War.
  • Then back to Spain at the signing of the 1763 Treaty of Paris, where, when Britain was arguing which captured territories it should be allowed to keep, everybody forgot about it and so it fell into the default bucket of “back to its previous controller”: it seems that Spain hadn’t even noticed that Manilla had been captured!
  • Then, after the Mexican War of Independence… still under Spain, but now directly under the Spanish crown and managed from Madrid.
  • And finally, courtesy of the 1898 Treaty of Paris, under the United States (with the exception of the period during which it was occupied by Japan).
  • The Philippines finally gained independence in 1946.
The US flag is lowered and the Philippine flag is raised.
The Flag of the United States of America is lowered while the Flag of the Philippines is raised during the Independence Day ceremonies on July 4, 1946.

As you might expect if you know anything about colonialism, there are absolutely horrible stories that could be told about any of those periods of history. So when I landed on the page Governor-General of the Philippines, I decided that it might be cheerier to pick out a person from it.

And so I picked what I believe to be the person whose term as Governor-General of the Philippines was shortest: in post for just 16 days in August 1898: Wesley Merritt.

Portrait photograph of a young white man in military uniform.
Gen. Wesley Merritt, circa 1865.

Wesley was a cavalryman in the American Civil War during which, in 1863, he managed to leapfrog three ranks by getting promoted from Captain right up to Brigadier General. After the Civil War he was posted to the Texan frontier where he commanded a cavalry regiment in the American Indian Wars. His success in… umm… “freeing up land” for American settlers (it turns out this post can’t escape from the ugliness of imperialism)… lead him to a new role in using his troops to police the civilians rushing to “claim” land formerly occupied by native Americans.

But it’s right at the end of the 19th century that his story intersects with today’s random article.

Spanish propaganda cartoon showing Uncle Sam standing atop the United States and reaching out his long arms and boney fingers across the Caribbean towards Cuba.
“Uncle Sam’s Craving: Saving the island so it won’t get lost.” says this Spanish propaganda cartoon.

As the 19th century wore on, the world-spanning Spanish Empire came under serious threat. The Napoleonic Wars had cut Spain off from its colonies, and one by one they lost control of Mexico, Peru, Colombia, Chile, Argentina, and others (often with thanks to quiet support from Britain). But Spain had managed to keep hold of Cuba and the Philippines, despite growing unrest and uprisings, which were often brutally suppressed.

Cuba in particular was a major trade partner to the United States, and so the US tried to insert itself as a negotiator in the war between the Cuban independence movement and the Spanish crown.

At the time, the US was working to establish itself as a modern naval power, building new steel warships to compete with European powers and Brazil, and making plans for what would eventually become the Panama Canal, and so this was a perfect opportunity to show off their armoured cruiser the USS Maine.

Cruiser with two funnels, seen from starboard side.
Starboard bow view of USS Maine, shortly before her deployment to Cuba. Fun fact: the last surviving officer who was aboard on the day it sank, Wat Tyler Cluverius Jr., would go on to serve as an engineering officer on the new USS Maine, a pre-dreadnaught battleship that would still be in service at the time of the First World War (although she was only used as a training ship because her coal efficiency was so terrible that it was no-longer sensible to have her cross an ocean).

The Maine got sent to Havana as a show of force and to protect American interests in Cuba, where, a couple of weeks later, she… blew up.

Probably what happened was that the bituminous coal stored in her bunkers was leaking methane out, which spontaneously ignited, starting a fire that ignited the ship’s powder store. But some, including Theodore Roosevelt (who was then assistant navy secretary and on his way to becoming vice-president) and much of the popular press, claimed that the ship must have been struck by a Spanish mine or torpedo.

Newspaper headline and image (The Evening Times, Washington, D.C., U.S., February 16, 1898) reporting sinking of the USS Maine, leading to the Spanish-American War.
Neither the Spanish nor American official reports had been published before the newspapers were claiming that the Maine had been sunk deliberately. Fun fact: the inscription on the monument to the victims that stands in Havana claims it was deliberate… but by the Americans as a false-flag operation to justify a declaration of war against Spain! This interpretation was added by the communist government in 1961.

The next month, after Congress had had a chance to discuss the matter (do you remember when the US Congress used to have to be involved in the US declaring war on another country?), the US declared war on Spain and began actively attacking her fleets and colonies in the Caribbean and the Pacific.

The US fleet steamed into Manilla Bay for what might be the most one-sided naval battle ever. The Spanish fleet at Manilla would have been severely outmatched even were it not for the fact that the second-lead ship was unpowered, the shore batteries’ range was insufficient to be involved, and the mines had been placed suboptimally. Only a single American sailor lost his life in the battle, and it was apparently as a result of a heart attack.

Fanciful patriotic painting showing flaming wooden Spanish warships being bombarded by the guns of a line of steel American battleships.
Battle of Manila Bay by James Gale Tyler (1898).

Okay, we’re at last up to Wesley Merritt‘s bit. Merritt was placed in command of the ground forces that were tasked with capturing Manilla. They sailed out of San Francisco, landed in the Philippines, and prepared to attack the city.

Merritt and Admiral Dewey made a point not to coordinate with Emilio Aguinaldo y Famy, the leader of the Filipino resistance against the Spanish, who by this point had already taken control of most of the Philippines and besieged Manilla, cutting off its water supply and beginning negotiations with the local Spanish leaders. It seems that Americans feared that if the revolutionaries captured the city it would result in significant bloodshed as a result of violent looting and the murder of those who were seen to have collaborated with the Spanish, and so they came up with an alternative plan: the American expeditionary force would attack and capture the city first!

Working through the Belgian consul to Manilla Édouard André, Merritt negotiated with the Spanish Governor-General Fermín Jáudenes to arrange a “mock” battle. The ships in the bay would fire upon a fort that they knew was only used for storage and against defensive walls that they knew they were not capable of breaching, and Spanish troops would be ordered to retreat as Merritt’s soldiers advanced. Then, Merritt would demand that the Spanish surrender the city, and they would comply, turning it over to the American forces.

This would minimise casualties while allowing the Spanish Governor-General to avoid the shame of being seen to have lost the city to the revolutionaries (it being far more politically-acceptable to lose to the might of the American invaders). Meanwhile, Aguinaldo’s troops initially saw the battle as genuine, which led to some casualties as Filipino fighters advanced under fire; they joined the victims of other misunderstandings during the mock battle.

Drawing showing American troops standing at attention on a fort with cannons, as the American flag is raised and the Spanish flag is lowered.
A drawing from Harper’s Pictorial History of the War with Spain. There’s a whole lot of pictures of flags getting rotated in this blog post!

Needless to say, the Filipinos deeply resented being told to stay out of the capital city that, given time, they might well have taken for themselves by force, had their efforts not been leapfrogged by the USA. Ultimately this lead to a guerilla warfare campaign against the USA by Philippine nationalists, which in turn contributed to growing concern in US political circles that America was becoming exactly the kind of imperialist power that it had opposed, at least on paper, since its founding.

Anyway: on 13 August 1898 Wesley Merritt became the de facto Governor-General of the Philippines and the first American to hold that position. Two weeks later Major General Elwell Stephen Otis turned up and relieved him of the position, making Merritt the shortest ever Governor-General of the Philippines.

An older whtie man in military uniform with medals and a sash.
Major General Wesley Merritt from Illustrated Roster of California Volunteer Soliders in the War with Spain (1898).

Merritt retired the next year and lived ten more years.

Anyway: that’s enough of today’s history lesson courtesy of a random Wikipedia page. I wonder what I’ll learn tomorrow! (If it’s as-interesting, I’ll let you know!)

The first glimmer

This is a repost promoting content originally published elsewhere. See more things Dan's reposted.

Glimmers are the opposite of triggers.

They are small, almost imperceptible cues that tell the nervous system: you are safe. You are connected. You are still here. Where a trigger tightens the chest and narrows the world, a glimmer softens the edges. It steadies the breath. It lets a thin ribbon of light slip in.

They are rarely grand in scale. Most often, they are sensory. Fleeting. Easy to miss.

… 

This is beautiful.

I’m reminded of the way Ruth reframed imposter syndrome as wonder syndrome a few years ago, which I wrote about at the time. A “glimmer” is not only a valuable and useful word that I’d not come across before (I love it when that happens, like with entle), but it also reframes the world in a more-positive light.

I’m going to to start looking for and naming glimmers in my life as part of my general practice of gratitude. Cultivating a conscious awareness of our glimmers is probably harder than finding an awareness of our triggers – and even that’s not always easy to narrow down specifically! – but it seems like such a worthwhile exercise.

The One and I is a delightful and long-running personal blog, by the way, if you’re looking for somebody new to follow. It feels calming and personal and sweet and there’s a healthy corpus of pictures of pets.

Two Croissants

Comic showing two croissants. The first is labelled 'almond croissant'. The second is wrapped in spiked metal with eye holes and a grate reminiscent of a medieval helmet and is labelled 'armoured croissant'. The joke is that the two words are near-homophones in some dialects.

I woke up with this in my head and had to draw it.

×

Note #29114

This plant has sonehow managed to grow through the atrtoturf lawn of our temporary home!

Life… uh… finds a way?

A leafy plant growing in the middle of an artificial lawn.

×

Soccer Slash

Observation:

Media franchises attract fandoms, and many get their fair share of character ‘shipping (especially of the attractive characters).

Soccer also attracts huge fandoms… but I don’t think I’ve ever seen or heard of “soccer slash” (even of the attractive players).

Four-cell table showing the intersections of Fandoms and Slash with Media and Soccer, respectively. Media + Fandoms is a photo from Comic-Con; Media + Slash is a comic art picture of Captain Kirk and Spock kissing; Soccer + Fandom is a full World Cup stadium; Soccer + Slash just shows a question mark.

×

Car Climate Control UI

Why, when I change the temperature on the thermostat of my Renault Zoe does it change the fan direction, too? Is this a UI affordance for people who want their faces colder but their feet warmer? I don’t understand!

A white hand turns the thermostat knob in a car from 19℃ to 20℃ in 0.5℃ increments; the untouched nearby fan direction control seems to change of its own accord. Initially blowing towards the user's face it switches on 'towards feet' at 19.5℃ and switches off 'towards face' at 20℃, and reverses the process when the temperature is turned down again.

×

Coding Is When We’re Least Productive

This is a repost promoting content originally published elsewhere. See more things Dan's reposted.

I potentially saved my client a bunch of money and embarrassment with that 3-line change.

Now, I consider that a productive day.

But had I been measured on my contribution by lines of code, or commits, or features finished, it would have been seen as a very unproductive day by my manager.

A great anecdote and some wise words from Jason Gorman on the nature of productivity and code.

This matches my feeling on AI. It’s good at making lots of code. Sometimes it even writes the right code. But something it rarely demonstrates skill at is comprehending the bigger issue. I’m sure we’re already seeing developers who “game” their employers’ productivity metrics, to the detriment of the end users, by having AI make “more” code without having to engage their brain and actually understand the problem.

(And, of course, there are employers who, whether intentionally or not, promote this kind of behaviour through their policies and success metrics.)

Dynamically-Deployed Static Site Subdomains on Caddy

I’ve recently been experimenting with where I host my small and open-source static sites. In my latest experiment, I wanted to try a low-maintenance selfhosting solution1. Here’s what I wanted:

  • Pushing to the main branch of my GitHub/Codeberg/wherever repo would send a webook to my server.
  • Upon receiving the webhook, my server would pull the latest changes2.
  • Using a wildcard certificate, my webserver automatically mounts each project at a subdomain matching its project name3.

Here’s what I came up with:

Step 1: webhook handler

I’m using Caddy as my webserver, because despite its considerable power and versatility it’s a breeze to set up. To sort wildcard DNS later I’ll want to swap in a custom build, but to get started I just ran apt install caddy. Then I used apt install webhook to install Adnan Hajdarević’s webhook endpoint, and tied the two together in my Caddyfile:

webhook.duckling.danq.me {
  reverse_proxy localhost:9000
}
My static server’s called duckling.danq.me, so you’ll see that turn up a lot in these configs.

Then I created a webhook in a GitHub repository:

GitHub webhook pointing to https://webhook.duckling.danq.me/hooks/github-push, with a secret set and SSL verification enabled, triggered by a push event.
I generated a long random string to use as the secret, and kept a copy for later.

When you create a webhook in GitHub it immediately sends a test event, but it doesn’t quite look like a real push event so I pushed an inconsequential change to the repo to trigger another. Once you’ve got a “real” one sent, you can re-send it via the “Recent Deliveries” tab as many times as you like, to help with testing.

Then, on the server, I checked-out a copy of the code (anonymously: this is a public repository so I don’t need keys to read from it anyway) and set up my /etc/webhook.conf to expect these calls:

[
    {
      "id": "github-push",
      "execute-command": "/var/www/github-push/webhook.sh",
      "command-working-directory": "/var/www/github-push/",
      "pass-arguments-to-command": [
        {
          "source": "payload",
          "name": "repository.name"
        }
      ],
      "trigger-rule": {
        "and": [
          {
            "match": {
              "type": "payload-hash-sha256",
              "secret": "[MY SECRET KEY HERE]",
              "parameter": {
                "source": "header",
                "name": "X-Hub-Signature-256"
              }
            }
          },
          {
            "match": {
              "type": "value",
              "value": "refs/heads/main",
              "parameter": {
                "source": "payload",
                "name": "ref"
              }
            }
          }
        ]
      }
    }
  ]
  
The trigger-rule directives ensure that (a) the secret key is correct (it uses a HMAC hash across the entire JSON request, so it prevents payload tampering too) and (b) the event only triggers on pushes to the main branch. The execute-command specifies the Bash script I want to run when the webhook is triggered. The pass-arguments-to-command configuration says to send the repo name on to that script.

Now all I needed to do was write the /var/www/github-push/webhook.sh Bash script so that it pulled the latest copy of the code when triggered:

#!/bin/bash
cd /var/www/github-push/$1 && git pull

I was able to test this by pushing inconsequential changes to my codebase and watching them get replicated down to my webserver. Neat!

Step 2: low-maintenance webserver

After pointing the DNS for *.static.duckling.danq.me at my static server, I set about configuring Caddy to be able to use DNS-01 challenges to get itself wildcard SSL certificates4. Caddy can’t do DNS-01 challenges out of the box, so you either need to write your own renewal script or compile Caddy with plugins corresponding to your DNS provider. My domains’ DNS are managed by a mixture of AWS Route 53, Gandi, and Namecheap, so my xcaddy build step looked like this:

xcaddy build \
  --with github.com/caddy-dns/route53 \
  --with github.com/caddy-dns/gandi \
  --with github.com/caddy-dns/namecheap

Of course, if I’d have preferred somebody else build it for me, CaddyServer’s download configurator would have done it for me on-demand.

For Gandi and Namecheap I just need a personal access token or API key, respectively, but Route 53’s configuration is slightly more-involved: I needed to create a new user via IAM and give it permission to write DNS TXT records for the appropriate hosted zone. Fortunately the guide for the caddy-dns/route53 repo had an almost copy-pastable example.

I added the AWS access key and secret key as environment variables (like this!) into my /etc/systemd/system/multi-user.target.wants/caddy.service service definition, and then told my Caddyfile to make use of them when renewing the wildcard certificate:

*.static.duckling.danq.me {
    tls {
        dns route53 {
          access_key_id {env.AWS_ACCESS_KEY_ID}
          secret_access_key {env.AWS_SECRET_ACCESS_KEY}
        }
      }
      root * /var/www/github-push/{http.request.host.labels.4}
      file_server
    }
}
The {http.request.host.labels.4} refers to the fourth part of the domain name, when separated at the dots and counted from the right, so 0 = me, 1 = danq, 2 = duckling, 3 = static, and 4 = the part that we’re interested in. So long as I don’t store any other directories in the /var/www/github-push/ directory then this will simply map each subdomain onto its git repository name and return a 404 for any other request.

DNS-01 challenges are necessarily slower than HTTP-01/ALPN challenges, because they’re limited by DNS propogation, so it took a while before the certificate was issued. I ran Caddy in the foreground to watch the logs while it did so:

Caddy webserver logs, with a highlighted section showing a DNS-01 challenge for *.static.duckling.danq.me repeatedly fail and then eventually succeed, then a certificate chain being installed.

You can see the whole thing working (for now at least; I don’t know if I’m keeping this approach!) by going to e.g. embed-html.static.duckling.danq.me, which dynamically tracks the main branch of the embed-html repo on GitHub.

I don’t yet know if this is going to be the future forever-home of my many static site side projects, but it’s certainly been the most-satisfying experiment to run so-far.

Footnotes

1 I’ve drifted away from selfhosting simple static sites lately because I’ve accidentally broken them with configuration changes too many times! But I figured I’d be open to in-housing them again if I had a single simple architecture for them all, so I spun up a VPS and gave it a go

2 Running a build script or some other static site generation tool is out of scope for now, but I want to be able to confirm that it would be possible in the future.

3 It also needs to be possible for me to map other domain names to it, but that’s a triviality.

4 It’s absolutely possible to use tls { on_demand } to do this, but it’s better to use a wildcard certificate which can be pre-generated and doesn’t let people trick your server into making ludicrous numbers of certificate requests by hammering random subdomain names.

× ×

Thames Path 7

This is a repost promoting content originally published elsewhere. See more things Dan's reposted.

New friends – obscure sights – the group divides – clear and present danger – an accident of geography – interest in bridges

2026 has not been an easy one so far. Work challenges, family challenges and my frickin’ house flooding have combined to make everything a bit overwhelming and hard to cope with.

So when we got a sunny Sunday, on a weekend in late April when (thanks to having found a long-term rental) we didn’t have to move between short-term lets, I cajoled Dan into once again acting as my support driver so I could walk some more of the Thames Path.

Dan and the smaller child joined me for the first couple of miles from Abingdon, which was nice.

My partner Ruth’s mission to walk the entire length of the Thames Path1 continued recently, and I still love “going on on” her journey – even the parts I wasn’t present for – through her blog posts.

If you too might enjoy blog-spectating this slowest-possible-walk along the length of the River Thames, you can catch-up on the backlog and subscribe for the next one, whenever that happens!

Footnotes

1 She’s doing the walk in many, tiny, and disparate instalments. By her own estimates she’s achieving about 50 metres per day, when averaged over her entire effort. This makes her only marginally faster than the 40 metres per day of the faster parts of the Greenland Ice Sheet, which I guess means that her progress is literally glacial in its speed.

×

Geohashing expedition 2026-05-06 51 -1

This checkin to geohash 2026-05-06 51 -1 reflects a geohashing expedition. See more of Dan's hash logs.

Location

Large field near Tawny’s Farm, East of Stanton Harcourt.

Participants

Plans

Between dropping the kids off at school and going to the dentist I had a small window of time in the vicinity of this hashpoint. Could I make it? I figured I’d rush out there and find out. It’d all depend on whether the field was actively in-use (I’m not gonna go tramping through crops!).

Expedition

I’ve been sort-of distracted from geohashing after my house flooded and I had to evacuate earlier this year, so I’ve not had much opportunity to get out and participate. But today, that changed!

A paved lane leading past a farmhouse.
The road stops here and becomes a footpath.

After dropping the kids at their schools I drove to Manor Cottages at 51.746, -1.396 where I knew I’d be able to park, then set off at a jog down the rest of Steadys Lane and onto the permissive footpath beyond. I waved to a solitary walker coming the other way, and pressed on until I was close to the field.

A field, turned over but left fallow.
Entering the first field.

Satellite photography suggested that I wouldn’t be able to enter the field directly, so I hopped a gate into the field West of it and was pleased to discover that neither field was currently cultivated.

A large empty field.
The second field: the hashpoint’s out there!

The hashpoint turned out to be about 700 metres into the field, and it felt sort of open and exposed to go tramping right across the middle of it, but sure enough that’s where I reached the circle of uncertainty, at 08:53.

A white man wearing a yellow 'Slamilton' t-shirt stands, smiling, in the middle of an empty field.
Silly grin!
Ultrawide 360 degree panoramic view of the empty field, with trees and hedges in the distance.
Panoramic view from the hashpoint.

Coming back, I spotted a disused and rusty old gate that provided easier access to the field, which provided a quicker way back to the footpath.

A rusted metal gate, slightly overgrown, at the egde of a field.
A better-placed gate.

Tracklog

No tracklog today. 😢 I’m not sure if I’ve seen my GPSr since the flood, so I was just working off my my phone.

× × × × × ×

A Postcard from Norway!

I got another postcard, and another new country for the senders list.

Dan, a white pan with a blue ponytail, holds a postcard in front of his face.
It’s always an exciting surprise to receive a Postcard From The Internet(!).1

I’ve added it to my gallery. This one’s from grubbyfox, whom I’ve crossed paths with on a Web forum2.

It remains a huge pleasure to receive a postcard from an Internet stranger (or even somebody I already know). It’s so much more tactile, and thoughtful, and human, and real than most of the other feedback I get.3

I guess there’s sort-of a scale of effort that it takes to react to content online. At the lowest end of the scale, barely above “doing nothing”, is “clicking a reaction button” (hey, did you see that you can click one below this?). It takes more effort to fill in a contact form. More still to send an individual email or ping me on Mastodon. But yet more still to write a postcard, find a stamp, go to the postbox… And I really appreciate it when somebody makes the effort.

Footnotes

1 The surprise is dampened only slightly by the fact that my PO Box provider emails me in advance to tell me I’ve received something.

2 Remember Web forums? They’re still very much around, and there are some cool communities if you can find the right one for you.

3 If you want to send my a postcard, my PO Box address is over here

×