Posts

There are 38 posts in the archive using a total of 20 tags.

An index of all available tags can be found here with descriptions.

Use A Makefile To Build Container Images

I recently replatformed the site from the Digital Ocean app engine to a Hetzner VPS. I wrote about why I migrated off of Digital Ocean here. I decided to use Caddy as the web server because it made getting up and running with TLS nice and easy. During the migration, my domain's A and AAAA records were still pointed at the live Digital Ocean site so Caddy was not able to do the normal ACME style challenge with Let's Encrypt when creating my TLS certificates. Instead, I had to do a DNS challenge so I would not disturb my A and AAAA records. The DNS challenge with Caddy requires that you build a custom container image with the needed functionality specific to your registrar.

I used a Makefile with some well-structured targets and "stamp files" to generate a tar of the Caddy container image, and to deploy and install that image to my remote server. I was able to ensure that if the underlying containerfile was changed, then a new container image would be created, exported to a tar file, uploaded to my server, and then installed on my remote server. Make is able to navigate the dependency graph of your targets, and only perform the minimally required actions needed to get to a goal. Had I written a script to do all of this, I'd be building and deploying a container image every time - or even worse - I could miss a step. Now, I just type 'make' in the terminal and I don't have to think about what step requires what. Fantastic.

I'll explain how I strucutred my Makefile to get this done.

Remember Bookmarklets?

Remember bookmarklets? I remember getting online as a young person and being really amazed by the power of these. I hardly even knew what Javascript was back around the year 2000, but I knew these things were cool.

As I got older and started to work on the web I remember using some very powerful bookmarklets like Firebug Lite. It launched a trimmed down version of the Firebug developer tools suite in browsers outside of Firefox. That was a big deal back then when I was still having to make things work in internet explorer 7 and 8. It felt like magic.

Browsers are a lot different than they used to be. They are some of the most sophisticated pieces of software you may ever use. Today they have robust and powerful plugin and extension ecosystems that make the magic of bookmarklets feel pretty ancient. Extensions are simply more powerful. They integrate much better to the browser, as well as the pages they work on. Extensions can do a whole log of things that bookmarklets just cannot do. Extensions can access protected browser features like dedicated storage, background processing, tab and window control, etc.

Extensions are really impressive and useful kit for anyone using a web browser. Sometimes though, you just need to throw a little javascript at a page to make it do something. That's where bookmarklets still shine. I don't need a whole extension to generate a link to specific text on a page, but I can do that with a bookmarklet pretty quickly. Those are the kinds of bookmarklets I want to collect: things that enhance the page I'm on, or fix the page I'm on, but don't require access to the browser features that extensions offer.

It has been really fun collecting these over time and learning how other folks out on the internet are still using them. I've even written a couple myself. Bookmarklets really take me back to my early days on the web when it was all super new and exciting. Unfortunately, I don't know the source of all of the bookmarklets in my collection, but where possible I've tried to give credit or link to the sources.

I have made my bookmarklet collection available here in my Bookmarklets page. Try them out!

This Web Host Will Self-Destruct

I recently discovered that Digital Ocean - the platform this website is hosted on - has promised to donate $3 million dollars over the next three years to Omarchy. They have joined the project as a "founding corporate patron" according to Omarchy's press release. I will not be linking to their website here, but this announcement is easily reachable if you need to read it. This comittment from Digital Ocean is not acceptable to me. Omarchy is run by the virulent racist DHH, and I will not be supporting them indirectly by continuing to use Digital Ocean's platform. I will be migrating from Digital Ocean to a different platform as soon as I am able to do so.

New Emacs; New Me

I've declared emacs bankruptcy. I started a new configuration for the new emacs 31.1 release. It's been great.

Introducing My Postcard Log

I started sending postcards to people again recently. A while back when I got my typewriter, I signed up for TypePals.com and started snail mailing folks. It was a lot of fun; I wrote a bit about it here.

Recently I decided to sign up for a postcrossing.com. Postcrossing is a postcard exchange site with a huge membership. I started keeping a log of all the postcards I've been sending folks since I joined!

Site Redesign!

Personal websites are living things and are never really finished. There is always something to tweak, to optimize, or to experiment with.

Over the last several months on ersatz.website I've made some changes to the site's stylesheet to fix some accessibility issues, restructured it a bit to make it easier to modify, and other related changes. I made some good changes, but I had a difficult time making them. My HTML markup across my 11ty static site templates was inconsistent, and my CSS often combined structure rules with presentation rules. This made things confusing to read, and a little risky to change. Overloaded CSS rules and inconsistent markup make things brittle and easily breakable. I could fix things in the context of what I was looking at, but unkowingly break something elsewhere. This kind of thing can happen over long periods of time as markup and styles are added and removed.

I could have developed some basica automated browser tests for myself so I could do a lot of editing and refactoring and ensure I didn't break anything while I was working, but that would be a lot of work just to maintain the same design.

Instead of developing some kind of tedious automated test suite that would blow up on any visual regressions in a fantastical effort to keep things exactly the same, I decided I should do a redesign and start from a fresh place.

Using Makefiles for Stuff around the Home (dir)

I use a Makefile to move my emacs configuration from its git repo in my home directory to the emacs config directory. There are a variety of better ways a person could move files from one place to another and a Makefile probably wouldn't be the wisest first choice. Writing a script to execute a copy command would be very straightforward and absolutely be a more sane choice.

I wanted to learn a little more about the tool and this seemed like a fun way to waste some time doing it. I did waste a lot of time doing it, but I learned a lot about the tool. I learned enough to make use of it in more useful circumstances. So it wasn't a total wash.

I will say this for using a Makefile instead of a script: it is weirdly satisfying only seeing the files you've modified get deployed to where they need to go. I thought it might be fun to go through how that works in the context of my emacs Makefile.

After this experiment I ended up adopted Makefiles for several things including ersatz.website. It is surprisingly useful and fairly quick to write once you know what you're doing.

Spring Cleaning

May really crept up on me this year. I'm always surprised when the seasons change. The beginning of a season has me makes feeling like it will last the whole year. They always seem to change faster than I'm ready for. It's May now, and summer is coming on quick.

I'm doing a little digital "spring cleaning" before the summer. I retired my thinkpad, got a macbook neo, learning a few new tricks, and doing some organizing.

April Distractions

This is a log of some of the distractions that sidetracked me while using the computer this month. I got the idea for a log of distractions from a list of writing prompts from The Paris Review. This is NOT an exhaustive list. I'm profoundly distractible, and probably forgot to add things to the log more than I remembered. I might continue this though, it was oddly a fun time.

La Luna

I am sitting on my wooden fire-escape deck in 2017 looking East watching the sunset shine againt some distant clouds. I am on the third floor of an aging walk up in a neighborhood full of two-flats and single family homes. It is summertime. I feel a warm breeze across my body. I watch the neighbor's maple tree while it sways with the same wind I am feeling. I hear the sound the tree makes as the wind ripples through it. It sounds like a wave breaking against a beach. The neighborhood birds are singing their last songs before the dim of night quiets them. I can hear the distant hum of the nearby expressway behind the noise of rippling leaves and branches. An icecube in my drink cracks.

I look to my right - South now - across the roof of my neighbor's house to watch the other neighborhood trees. There is something on their roof. I can see its silhouette against the swaying trees further down the block. There is a cat on the roof. I recognize the cat. It is my downstairs neighbor's cat Luna. How did she get over there? She must have jumped from the second floor of the deck across the gangway and onto the rooftop.

My downstairs neighbor's screen door opens. I see light through the deck boards beneath me. A woman speaks Spanish. I hear the cat's name being called. I watch the cat stand up and casually walk down the sloping roof to the eave and make a leap towards home.

Learning Jujutsu

I am not learning to fight. I am learning the Jujutsu version control system! I've used git almost my entire programming career, and I've learned to use it well. Over the years I've acquired the ability to do rebase workflows, stacked branches, fixups, reordering, staging changes using git add -p, and many other things. I've got a whole mess of git command aliases I'm hoarding like some kind of Tolkien dragon. I've learned the magic spells but still aren't a master of them. Even armed with this secret arcane knowledge, git is still a very confounding and difficult tool to use.

JJ - the abbreviated name of Jujutsu - immediately solves many of the problems I encounter when using git. JJ has a markedly different set of ideas compared to git. Unfrtunately that means my git knowledge doesn't fully transfer, but I think that is alright. JJ actually makes a lot of that knowledge no longer needed. It is a much simpler tool to use and understand and I think that is really exciting.

Emacs config

I almost declared Emacs "bankruptcy" and started my configuration over. Instead, I cleaned it up a bit and released it.

Write yourself a README

I wrote a README for how to manage ersatz.website and it was out of date and wrong. I caused an outage on accident because of it.

Ditching the Algorithm

I recently bought an old iPod because I recognized that my relationship with music has changed a lot over the years and I missed how simple things used to be!