Latest Posts

  • Multiple VPNs on NixOS  09 Feb 2024  tailscale wireguard vpn nixos

    Back in July, I wrote a post on how to set up split tunneling between Tailscale and a WireGuard VPN — in my case, Mullvad — on macOS. In general, it worked as desired, with all traffic going through Mullvad, except for Tailscale traffic. However, there were some limitations: I had to disable Tailscale DNS in order to prevent DNS leaks, so I had to access Tailscale hosts via their Tailscale IP addresses; I had to manually clear the DNS settings on all my interfaces after disconnecting from the VPN; and crucially, I never completely trusted that the VPN setup was leak-free. Let’s see if we can do better this time.

  • Previewing Pending Comments  19 Dec 2023  the blog jekyll

    When I originally added comments to the blog, commenters didn’t see any indicator that comments went through. This was understandably confusing, so I decided to show a message saying that the new comment was pending. I’ve gone through a couple versions, and I’m reasonably happy with what I ended up with.

  • Building My Site With Nix  18 Dec 2023  jekyll nix  updated 19 Jan 2024

    I’ve had a lot of issues getting my site to build consistently. A while ago, though, I thought I had figured it out and would be able to run bundle exec jekyll serve to build my site locally with the same version of Jekyll and its plugins that are used in CI. However, it wouldn’t last.

  • Installing JDKs via nix-darwin  15 Nov 2023  nix macos java nix-darwin

    I’m in the process of moving as many of the installed packages and as much of the configuration of my Mac to nix-darwin. Among the packages that I want on my Mac are various versions of JDKs1. The way that macOS interacts with JDKs is a bit tricky, so the standard Nix or nix-darwin install doesn’t work, but we can make it work.

    1. why, you may ask. Good question. I don’t actually know if there’s anything that I still use Java for. I used to use it for FRC, though. 

  • Forwarding Dark Mode over SSH  24 Aug 2023  nixos ssh macos

    My Mac is set up to sync its light/dark mode with the local sunset, so it is in light mode through most of the day, and in dark mode later at night. All my apps sync with the system as well, including my terminal and terminal applications. However, what doesn’t sync is SSH sessions. If I SSH into one of my Mac Minis, and then run a command such as bat (which on my Mac is aliased to bat --theme=$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo Catppuccin-mocha || echo Catppuccin-latte) and thus respects dark mode), it always acts as if it is in dark mode (because the Mac Mini is in dark mode).

  • Terminal Apps Respecting System Dark Mode  22 Aug 2023  macos neovim alacritty swift  updated 23 Aug 2023

    This article is dedicated to Alex, for this glowing review and proving the inspiration to finish this post.

  • Reworking Tag Badges  07 Aug 2023  the blog jekyll css scss

    Up until just recently, you may have noticed a curious phenomenon about tag badges on my blog. Some tags, such as jekyll, would have their background color darken on hover, but keep the text the same, while others, such as swift, would keep their background color the same, while the text turned blue like links do1. The key factor that affected whether or not they would exhibit this behavior was whether they used a CSS class that I defined, or one that was defined in Bootstrap itself. The jekyll tag, for example, was using the Bootstrap badge-danger class, while the swift tag was using a custom class. I wanted all the tag badges to behave like the ones defined by Bootstrap (darken background and leave text alone), so I decided to investigate.

    1. Of course, now that I’ve fixed the problem, it’s not visible. 

  • Callouts have been added to the blog  01 Aug 2023  the blog css

    As you have probably already notcied, my blog now supports callouts (also sometimes called admonitions). They’re a neat little feature that looks a little like a blockquote (especially on my blog). You can take a look at the Obsidian page for them here, but on my blog, they look like this:

  • Adding Comments to the Blog  28 Jul 2023  the blog jekyll rust nixos

    If you’re browsing my blog via the website and not solely through the RSS feed, you may have noticed something new at the bottom of every post. That’s right, the blog now supports comments! While that’s as simple as a toggle checkbox in some sites, due to this blog being a “static site”, it was much more involved.

  • Post Dates and Update Dates  25 Jul 2023  the blog jekyll

    You may have noticed another change on the blog — one that should also be visible to those reading via RSS. Posts now have dates with times — no longer will every post appear at midnight — and can have update dates as well.

  • Creating a tag include  25 Jul 2023  the blog jekyll

    As I said in my post about tag pages, Jekyll allows you to have includes that accept parameters. In that post, I created an include for blog posts in a list. You may also remember that that article included examples of tags (such as the blog). The way that I did that was using another include, one that I created while writing that post and will explain in this post. After all, it’s much easier to say:

  • A Page for Every Tag  20 Jul 2023  the blog jekyll  updated 20 Jul 2023

    I have wanted to have a page for each tag essentially since I set up this blog. The idea was that you would be able to click on any tag on any post, and you would be sent to a page that provides a short description of the subject, and shows you all the posts on my blog with that tag. However, for over two years this feature has been missing. No longer.

  • RssBot Bugfix 3: Entries Without Statuses  19 Jul 2023  rssbot python discord rss

    Even after I fixed the bug I was seeing with RssBot, I continued to see errors. Diving into the log again, I saw the following error:

  • RssBot Bugfix 2: Unpostable Channels  18 Jul 2023  python discord rss rssbot

    RssBot has mostly been working really well. However, every once in a while it would just stop posting. The worst part about this is that I wouldn’t notice until I restarted the machine that it is on, incidentally restarting RssBot. This time, however, I caught it in the log, and I was determined to fix the issue.

  • Split Tunneling with Tailscale and WireGuard on macOS  06 Jul 2023  macos tailscale wireguard vpn

    I use Tailscale to connect all my devices to each other. In general, this is great. I can access all my machines from anywhere, through NAT, without messing with my firewall, by hostname. And that’s just the base level. I’m not here to be a Tailscale ad — go check out their website if you want to know more. Sometimes I want to use a VPN to anonymize my internet traffic, though, and Tailscale does not (currently) support that.

  • GPG Agent Forwarding  18 May 2023  nixos gnupg ssh macos

    As I’ve mentioned before, I have a bunch of Mac Minis running NixOS hosting various services. I have SSH access set up to them all with my SSH key, but I don’t have access to my GPG keys on those machines. And since these are the only NixOS machines that I have, things like updating my flake lockfile become annoyingly complicated:

  • A Third NixOS Machine  17 May 2023  nixos ssh  updated 19 Jul 2023

    As I mentioned in the previous post, I have two set-up Mac Minis dual-booting NixOS. Howver, because they’re so old, they’re really, really slow. When I had another service that I wanted to run (details to come), I decided to set up a third. One of NixOS’s strengths is that it’s very easy to deploy an identical machine. I was still getting used to NixOS when I set up my second machine, but now that I’m more comfortable (relatively speaking), I wanted to see how easy it was.

  • Theming rEFInd  13 May 2023  refind catppuccin nixos svg imagemagick

    I have a collection of very old (pre-2010) Mac Minis, two of which are currently set up (dual-booting macOS and NixOS). The reason I kept the macOS partition is really just based on my superstition and the belief that if the Linux distro goes totally kaput, I’ll be able to rescue the machine from the macOS partition.

  • RssBot Bugfix 1: Reposting on Restart  17 Mar 2023  python discord rss rssbot

    I published my post on RssBot two days ago. It worked successfully on that post — huzzah! — and everything else appeared to be working as well. However, when I stopped RssBot, moved it to a different directory on the server, and restarted it, it sent the post again.

  • Building a Discord RSS Bot  10 Mar 2023  python discord rss

    In one of the Discord servers I’m in, there’s a channel for people to post links to their blogs, so we can all read them. My blog has an RSS feed, so one can subscribe to it using an RSS reader application (I use NetNewsWire) to get updates without having to check the site. However, I figured it’d be nice to have a bot that posts blog updates in a channel, rather than making everyone set up an RSS reader.

  • Bee Careful With Sudo  02 Mar 2023  macos sudo shell nixos

    The first time you use sudo on a macOS system (it’s probably been so long you don’t even remember it!), you’re presented with the following dialog: ``` WARNING: Improper use of the sudo command could lead to data loss or the deletion of important system files. Please double-check your typing when using sudo. Type “man sudo” for more information.

  • Setting up SyncTeX with Neovim and Skim  29 Jan 2023  neovim latex rust  updated 01 Feb 2023

    I have… a lot of feelings towards Neovim, but putting those aside for the time being, it’s still my preferred LaTeX editor on my Mac. What my LaTeX editing setup was missing1, though, was the ability to “jump to” a location in the output PDF from the code, or to jump to a location in the code by clicking on the PDF. That capability is provided by SyncTeX, which causes the typesetting process to output a doc.synctex.gz file2 which, when read by a compatible editor/PDF viewer, contains location information to enable the jumping.

    1. as compared to Overleaf, which is how I used to work on LaTeX documents 

    2. assuming a doc.pdf output; we could also say that the SyncTeX file is <filename>.synctex.gz 

  • Graphical macOS Apps with the Swift Package Manager  05 Jan 2023  swift swift package manager macos  updated 12 Dec 2023

    The Swift Package Manager (SPM) is pretty great. You can use it to create libraries, command-line tools, and (since Xcode 11), SPM libraries can be used in apps submitted to Apple App Stores. However, it’s not as trivial to make true graphical apps without using Xcode, even if they’re written in Swift using SPM.

  • Redoing the Search Field  02 Oct 2021  the blog  updated 02 Oct 2021

    As I said in issue #8, I wanted to be able to use ⌘F / ⌃F to search on the page. However, at the time of writing, it selects the search field. This means that I needed to change the search field to have a different keyboard shortcut, so I decided to use / (as does GitHub).

  • Tag Colors on the Blog Homepage  16 Jul 2021  the blog jekyll

    Right now, when you’re on a post, the tags (at least the ones that have colors) are correctly colored:

  • Setting Up A Blank 2021 FRC Project  16 Jan 2021  frc gradle java

    Our FRC team, AFS RooBotics, uses GradleRIO but not VS Code and the official plugins. We use the free educational version of IntelliJ, but that means that we need to set up our projects each year on our own. That’s complicated. What does it entail?

  • Customizing Tags  13 Jan 2021  the blog jekyll

    Today we’re taking a look at the tags on posts, and allowing me to customize them. The one specific goal we have in mind is making language tags that match the language color on GitHub and on the projects page.

  • Welcome to the Blog  12 Jan 2021  the blog

    Hello there! Welcome to my Brand New Blog!

Tags

RSS/Atom feed