Caleb Hearth
About Archive Replies Also on Micro.blog
  • Tell GitHub to Render Markdown Pages with .gitattributes

    Articles on Hearthside are written in Markdown (GitHub-flavored), but the file extension is .md.yaml as they also make use of Jekyll-style front matter. My Frontmatter gem requires that files it handles end in .yaml or .yml, so this is necessary.

    Read more on my main blog

    → 7:34 PM, Nov 22
  • Oxtail, and more Cooklang Exploration

    After yesterday’s post, it was time to finally try to handle a blog post and Cooklang recipe in one file. The solution to how to format things was simple: inline the recipe in a Markdown code fence and pre-process it.

    Read more on my main blog

    → 7:17 PM, Nov 21
  • Oat Notes

    You’ll probably read this recipe and think wait, this is just overnight oats but you’d be wrong, because this is a recipe for overnight oats that someone who cares about you remembered to make for you last night. At least that’s how I interpret my 3-year-old’s mis-hearing or pronunciation of us…

    Read more on my main blog

    → 9:43 PM, Nov 20
  • How I Model SwiftUI Views

    The approach I take to defining ViewModels for SwiftUI was heavily inspired by Paul Hudson’s post Introducing MVVM into your SwiftUI project. In it, he advocates for defining class ViewModel inside an extension to the relevant view. By naming each view’s MVVM class ViewModel, it can always be…

    Read more on my main blog

    → 12:42 PM, Nov 19
  • Truncate Date to Calendar.Component in Swift

    I’m frequently wanting to work with truncated dates in Swift apps, especially when dealing with Swift Charts. Foundation provides Calendar.startOfDay(for:) to get the first moment of a day, and that’s been really useful. The extension below will do something similar for an arbitrary1 …

    Read more on my main blog

    → 4:48 PM, Nov 18
  • Using Starship for the Same Prompt, but Faster

    Starship is a highly-configurable, cross-shell prompt. I recently switched to using it and it sped up my prompt rendering from being noticably slow and taking probably half a second to render to an imperceptible 0.03s rendering time. It actually does slightly more than my old prompt did as well…

    Read more on my main blog

    → 1:44 PM, Nov 15
  • Send a From Header When You Crawl

    Sending a From header is part of building a polite crawler, along with respecting Robots.txt and sending a unique User-Agent. The From header simply contains an email address that can be used by the site’s owner to reach out if your bot is creating any issues for them.

    Read more on my main blog

    → 9:25 AM, Nov 14
  • Use cURL and jq to Send Webmentions from Hacker News

    Hacker News doesn’t send Webmentions when a post is created like Lobste.rs will, and there’s not currently a service on sites like Brid.gy that will provide them for you. Even the Hacker News API doesn’t provide search or filtering by site. Luckily, there is a service provided by Algolia that …

    Read more on my main blog

    → 11:37 AM, Nov 13
  • Search and Sync Your Shell History With Atuin

    Atuin is a tool that runs in the background to capture commands you’ve entered. It stores these locally in a SQLite database and provides a great CLI tool to search through that history, provide stats of what commands you frequently run, and optionally syncs this history across devices.

    Read more on my main blog

    → 3:44 PM, Nov 12
  • Decryption/CypherError on Rails 7.1 Apps with Encrypted Columns After Upgrading from Previous Versions

    When upgrading to Rails 7.1 with any models using the encrypts macro from ActiveRecord::Encryption, be wary of upgrading the config.load_defaults in config/application.rb from 7.0 to 7.1. The 7.1 defaults for ActiveRecord::Encryption include a combination of settings that can lead to your app…

    Read more on my main blog

    → 8:34 AM, Nov 11
  • I Use /uses

    Back in 2023 I quietly published my /uses slashpage. Today I gave it a pass to update things that had fallen out of date.

    Read more on my main blog

    → 11:24 AM, Nov 8
  • How to Send a Webmention h-entry

    Notify sites that you have linked to them with extra context: is your content a reply, a review, a bookmark, or even a checkin?

    Read more on my main blog

    → 1:07 PM, Nov 7
  • New Fonts Day

    Today rather than publishing a lengthier post, I’ll point you to some work I’ve done on this site’s design.

    Read more on my main blog

    → 8:18 AM, Nov 6
  • Ask Git to Show a Method

    Easily view the source of a function or method in your terminal using Git and this shell script.

    Read more on my main blog

    → 7:51 AM, Nov 5
  • Build Colors from Colors with CSS Relative Color Syntax

    This is a post I’m mostly writing for my future self, because I can never remember the actual term for the CSS feature that lets you define a color based on another color (it’s “CSS Relative Color”) and “color mix” which is what I keep wanting the feature to be called never turns up any results…

    Read more on my main blog

    → 10:41 AM, Nov 4
  • Highlighting Text in Links with Text Fragments

    I’ve used URL text fragments in a few posts now and often use it outside of this blog to point someone to a particular piece of text on a page. They’re a really useful feature that allows you to create a URL that links not just to a page or an anchor on that page, but specifically to a bit of…

    Read more on my main blog

    → 7:50 AM, Nov 3
  • Café Mezcal

    The Café Mezcal is a twist of the classic espresso martini that leans into the delightful way that coffee and mezcal1 flavors combine. For folks who don't enjoy mezcal but don't mind tequila, you can switch the proportion of mezcal to tequila or use only tequila.

    I also leave out brewed espresso, but I'd definitely experiment with adding it back—maybe cut down on the coffee liqueur to make up the volume.

    Ingredients

    • One part2 simple syrup
    • Three parts coffee liqueur
    • One part reposado tequila
    • Two parts mezcal (I like Del Maguey Vida)

    Instructions

    Combine in double Old-fashioned glass and stir with a large ice cube.

    Footnotes

    1. If you're unfamiliar with mezcal, here are a few resources I recommend, but really you should go out and order a nice glass of it at a good bar. Mezcal should be sipped like a scotch, and it levels up cocktails wonderfully.
      • Everything you need to know about Mezcal by How to Drink
      • Max Falkowitz' A Guide to Mezcal: How It's Made and Which Bottles...

    Read More

    → 5:00 PM, Nov 11
  • 100 Consecutive Days of Reading

    I’ve been using Streaks to track my goal of reading each day since late April of this year. I don’t have a specific amount I’m trying to read; it’s whatever feels like progress that day. Some days I’ll read a couple of pages but not count it, others I’ll listen for 15 minutes and decide that’s good enough. I just hit 100 consecutive days (well, it will be 104 today but I put off writing this post since I wanted to pull some numbers to celebrate).

    I thought it would be cool to pull some stats from my Reading data from the past ~year to compare the periods before I started using Streaks, since starting Streaks, and the past ~100 days that I’ve held this streak.

    For combined progress of audiobooks and other formats, I’m using count of pages read or minutes listened / 1.9, which is a value I got from Nadia OdunayoofThe StoryGraphthat was a rough average ratio of minutes in most popular audiobook edition to pages in most popular non-audio edition over about 200 random works. It means...

    Read More

    → 5:00 PM, Nov 10
  • How to Stash Everything git commit Wouldn't Commit

    If you enjoy this article on Git, also check these other Git tips:

    • Ignore refactoring commits in git blame
    • Trace the history of a method with git log
    • Use your SSH key to sign commits

    Sometimes I want to take some changes that I’ve made but haven’t yet committed yet and put the into the git stash, which I probably use a lot more than I should. When will you learn to just git commit -mwip, Caleb?

    Either way, Git has my back. git stash --keep-index --include-untracked is almost the opposite of the above. It creates a stash commit for only files that wouldn’t otherwise be committed: unstaged changes and untracked files.

    • --keep-index leaves all changes already added to the index (i.e., staged) intact
    • --include-untracked stashes files in the working tree that have not yet been tracked by Git, and then runs git clean to remove untracked files

    The above command is really useful in cases when you want to make a commit of a subset of your working tree. Say you’ve set up the perfect commit and...

    Read More

    → 5:00 PM, Nov 9
  • NaBloPoMo

    While I wrote and tried to publish this post on November 9th, an unrelated change I'd made caused it not to be released until today, the 10th. Sorry about that.

    Today is day nine of November, which besides other more popular “movements”” such as NaNoWriMo, National Novel Writing Month, is NaBloPoMo: National Blog Posting Month. I’ve been known to wax poetic about projects I’m working on and which might “soon” see the light of day, so I actually refrained for a bit before writing this post.

    Yes, I’m participating in NaBloPoMo, which means that I’ve made it my goal to post 30 blog posts in the 30 days of November. Less stringent is the goal to post an article each day; I’m happy to make up for a missed day with a double if I need to but would like to avoid that.

    NaBloPoMo was started in 2006 by Eden Kennedy, who in 2010 sold the concept to BlogHer which in turn seems to have stopped promoting it after 2016. That probably explains why this is the first year I’ve heard of it.

    I’m...

    Read More

    → 5:00 PM, Nov 8
  • Collecting Records to Avoid Buying a Record Player

    If you don’t know me well, it may not be obvious that collecting records is the perfect hobby for me: it’s expensive, easy to get passionate about, few people care, and yes, it’s fairly pretentious. Record collecting even has dedicated and beloved shops for its adherents, often questionably lit and with entrances on side roads or alleys, a-la used book stores. It’s really got my name written all over it. So it might come as a surprise that I’ve never bothered until recently to be interested in it. You see, I’m not really that into music.

    But as it turns out collecting records doesn’t really require that you listen to them. At least, that’s what I’m telling myself as I buy them recently and then proceed to listen to them on Apple Music while I wait for them to arrive.

    I don’t even have a record player, but I’m up to five records on my shelf and in my Discogs account:

    1. So Much (For) Stardust

      So Much (For) Stardust

      Fall Out Boy

    2. Electric Mangrove

      Electric Mangrove

      The Dead Robotz

    3. Signs Of Life

      Signs of Life

      Neil Gaiman...

    Read More

    → 5:00 PM, Nov 7
  • Apps I Use in 2023

    Inspired by Matt Birchler’s “My default apps at the end of 2023” via Adam Fortuna’s “What Apps I Use In 2023” and because I did a good job writing 6 consecutive more or less “real” posts, here are my apps used in 2023. You may consider each of these recommendations.

    • Mail service: Fastmail (referral link)
    • Mail client: Apple Mail (iOS/macOS)
    • Tasks: Reminders.app, Streaks
    • RSS service: Feedbin
    • RSS client: Reeder
    • Launcher: Spotlight
    • Cloud storage: iCloud, Backblaze
    • Photo library: Apple Photos
    • Photo editing: Apple Photos, but I’m in the market
    • Web browser: Safari (iOS, macOS), Firefox (macOS) for GSuite stuff that doesn’t support all browsers
    • Calendar service: Fastmail (referral link)
    • Calendar app: Fantastical (iOS/macOS)
    • Calendar syncing: Calm Calendar
    • Reading: Overcast for audiobooks, physical books, and iBooks for eBooks (in that order)
    • Weather: Carrot Weather
    • Podcasts: Overcast
    • Music: Apple Music
    • Clipboard manager: None
    • Passwords: iCloud Keychain
    • Budgeting: hmm…
    • ...

    Read More

    → 5:00 PM, Nov 6
  • Blogging with Notion

    Notion has been helpful to me in organizing and offloading my thoughts on what articles I’d like to write and features I’d like to add for this blog. My articles usually start with a random thought and I’ll use that as the title for a card in my “Blog Posts” Notion board and possibly add some brief notes.

    Notion board headers 'No Status', 'Notes', 'Draft', 'Review/Written', and 'Completed'. All columns except 'Review/Written' include some cards that have a title, some with tags listed or an excerpt
    Yeah, this is my actual, current board. It's usually just for me so I didn't make much effort to clean it up. If you see something you want to read about soon, let me know!

    How I use Notion

    Notion provides a customizable set of attributes, called “properties”, that are specific to a “database”. These attributes can, in turn, be used to create Kanban-style boards. I mostly use a board whose columns are controlled my custom “Status” property and which is set to automatically sort each column by oldest to most recent update. You can also control what shows up on the cards. I have it set up to show Name, the list of Tags I’ve assigned, and the Excerpt. The latter two Notion hides...

    Read More

    → 5:00 PM, Nov 5
  • I wish there were a better story around replying to blogs

    Unlike social media microblogging, there’s not a great story for continuing the conversation of a blog post that’s part of the IndieWeb. Replying to a blog post most often takes the form of a reply to a POSSE1 syndication like a Mastodon post or promotion link on Hacker News.

    If I read an article by Chris Coyier on answers to design questions, itself a response to Dan Mall’s answers to those same questions and want to reply, there’s little chance that either Chris or Dan would see my response and even less chance that I’ll know they saw it. I could definitely shoot them emails or mention them on Mastodon, but it would be really great if there were some better automated way to do this.

    As an author

    1. A commenting system on each site, either self-hosted or using some embedded service like Disqus
    2. Outsourcing comments somewhere else, such as to the Fediverse or the comments section of a link aggregator
    3. Leave a note that if people want to reply to you they can reach you by email
    4. Set up a...

    Read More

    → 5:00 PM, Nov 4
  • Annotating TTRPG Modules

    I want to share an approach to highlighting and tabbing an adventure that I’ve used recently to prep for RPG night with some success, and have missed when I didn’t have time to do it.

    Prepping for running an adventure or module means reading and understanding a good amount of text. The standard “house style” that most adventure authors use at least in D&D and the OSR includes boxed text for what’s meant to be read to players and often includes italics and bold to call out spells and names, respectively. I find that while these are helpful during the first read, it’s useful for me to have highlighted text and marginalia that I use as study aids when reading the module in advance of running it. For longer texts, I also like to have tabs to navigate.

    Something about my brain makes it hard for me to do things like this without a system for what colors I should use for what things, so here is the one I’ve devised. I hope it’s useful to you too!

    Information that will only be useful...

    Read More

    → 5:00 PM, Nov 3
  • RSS
  • JSON Feed
  • Surprise me!