Today, we celebrate the World Day of Social Justice, recognizing the need to promote the same.

Alternatively, if you’d like something a bit less vague, we in the United States also celebrate today as Presidents’ Day, honoring those who have served as President…some celebrated more reluctantly than others.

Eleanor Roosevelt reading the Universal Declaration of Human Rights

Before you click over to take advantage of deep discounts on furniture and mattresses, let’s talk programming…

Twitter Archive

GitHub - jcolag/twitterJohn's Twitter archive via tweetback. Contribute to jcolag/twitter development by creating an account on GitHub.

I added a public license, Creative Commons Attribution Share-Alike 4.0 International, exactly like this blog. With the usual caveat that anything that I might have discussed or quoted that doesn’t come from a public domain or Free Culture source needs to hide under the Fair Use doctrine’s umbrella—particularly the images—if anybody finds me saying something particularly clever, then they can feel free to build on that.

I also modified the archive’s stylesheet, to include a rudimentary dark mode. I doubt that anybody will care about that but me, but it makes me more comfortable. As you might guess, especially at this time of year, I do a lot of my tinkering in the non-daylight hours, and as I’ve described before, I have scripts to turn on dark mode at sundown. As a result, checking an old tweet on a bright white screen feels fairly jarring.

I’ll think about submitting it as a pull request, at some point.

Oh, one issue to worry about, in publishing this to GitHub Pages, and I resolved the issue during the week via an issue on the project: Search Doesn’t (Always?) Appear on GitHub Pages. We found two problems.

  • First, GitHub Pages won’t deploy any folder whose name starts with an underscore character, so _pagefind breaks the search itself.
  • Then, the search results didn’t seem prepared for a path prefix, so the result results didn’t link anywhere.

The first problem had a straightforward configuration solution. I needed to add to the line invoking npx as follows.

execSync(`npx pagefind --source _site --glob \"[0-9]*/**/*.html\" --bundle-dir pagefind`, { encoding: 'utf-8' });

Of that, the --bundle-dir pagefind differs, to redirect it away from the folder with the underscore.

The latter problem required providing a processResult function on the index page. Because it runs repeatedly, it prepends the path’s prefix (/twitter, for my archive) if it can’t already find it in the URL.

Entropy Arbitrage

GitHub - jcolag/entropy-arbitrageJohn Colagioia's Blog Posts. Contribute to jcolag/entropy-arbitrage development by creating an account on GitHub.

I have gone through my old posts and, for any links pointing to my tweets, they now point to my Twitter archive. Interestingly, I only found two tweets referenced outside a social media roundup post. After all, now that my archive exists—and especially since I don’t want to push people towards Twitter—it no longer makes much sense for my blog to point at Twitter.

For anybody who might need to do something similar, I ran this command against the post source files. I should note that this updates the modification time of every file, so depending on your needs, you might want to handle this differently, like using xargs to send search results to the sed replacement.

sed -i 's/\/jcolag\/status/\/twitter/g' _posts/*.md

This does not change the links to anybody else’s tweets, and I probably won’t bother trying to do that. I reference—by tweet or by profile—roughly twenty Twitter accounts. None of those users have registered archives, and several of them belong to a certain political party that spent a day thanking their deity of choice for Twitter’s CEO, suggesting that they probably won’t leave in the near future…

Regardless, I then went through some posts manually, updating anywhere that I might have suggested that people follow me on Twitter, since anybody doing so will find themselves highly disappointed.

Entropy Arbitrage, Part 2

GitHub - jcolag/entropy-arbitrage-codeThe Jekyll blog for - GitHub - jcolag/entropy-arbitrage-code: The Jekyll blog for

I updated the script that generates the aforementioned social media roundup posts on Fridays. It now has a couple of additional snarky title attributes for the Medieval calendar diagram. The tags for content warnings and embedded images now get generated automatically. And it now provides a brief “follow me” section at the end.

That last item probably has the most interesting story of the three. When I started publishing the Friday posts, I included a similar suggestion at the end of the posts, finding them during the manual step that I described in the previous section. After a few weeks, that section vanished, probably because it never really felt right for me to drive business to Twitter.

By contrast, it fits squarely within the mission of the blog to send people to Mastodon.

Oh, and while I had things to do in the blog code, you might notice slightly darker text in posts. Most people probably won’t notice the difference, but it improves the contrast significantly.


Because blog and Twitter things derailed me, I didn’t have time to work on the Mastodon Tool Trunk, so I’ll want to get back to that.

I also have some changes to make on my Twitter archive.

Credits: The header image is 64-165 by the FDR Presidential Library & Museum, made available under the terms of the Creative Commons Attribution 2.0 Generic license.