Hearthside by Caleb Hearth

https://calebhearth.com/ (RSS)
visit blog
Tell GitHub to Render Markdown Pages with .gitattributes
22 Nov 2024 | original ↗

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.

Oxtail, and more Cooklang Exploration
21 Nov 2024 | original ↗

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.

Oat Notes
20 Nov 2024 | original ↗

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...

How I Model SwiftUI Views
19 Nov 2024 | original ↗

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...

Truncate Date to Calendar.Component in Swift
18 Nov 2024 | original ↗

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 ...

Using Starship for the Same Prompt, but Faster
15 Nov 2024 | original ↗

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...

Send a From Header When You Crawl
14 Nov 2024 | original ↗

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.

Use cURL and jq to Send Webmentions from Hacker News
13 Nov 2024 | original ↗

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 ...

Search and Sync Your Shell History With Atuin
12 Nov 2024 | original ↗

Atuin is a tool and labor of love built by Ellie Huxtable 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...

Decryption/CypherError on Rails 7.1 Apps with Encrypted Columns After Upgrading from Previous Versions
11 Nov 2024 | original ↗

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...

I Use /uses
8 Nov 2024 | original ↗

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

How to Send a Webmention with h-entry
7 Nov 2024 | original ↗

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

New Fonts Day
6 Nov 2024 | original ↗

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

Ask Git to Show a Method
5 Nov 2024 | original ↗

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

Build Colors from Colors with CSS Relative Color Syntax
4 Nov 2024 | original ↗

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...

Highlighting Text in Links with Text Fragments
3 Nov 2024 | original ↗

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...

swift-format GitHub Action
2 Nov 2024 | original ↗

swift-format is only one of several options for Swift language formatting tools, but as it is part of the official Swift GitHub organization and is built by Apple, it stands a good chance of coming out as the primary one. As of Xcode 16, swift-format is bundled with Apple’s IDE for Swift...

Statistics for My Blog
1 Nov 2024 | original ↗

When thinking about how to kick off NaBloPoMo 2024 this past weekend, instead of picking one of several drafts or mostly written articles I naturally decided that we should instead start with something fresh!

Linked: Follow On Your Phone
1 Sept 2024 | original ↗
Linked: Xcode Console and Unified Logging
25 Aug 2024 | original ↗
Linked: CSS One-Liners to Improve (Almost) Every Project
6 Aug 2024 | original ↗
Linked: Swift enum pattern matching with extra conditions
31 Jul 2024 | original ↗
↑ These items are from RSS. Visit the blog itself at https://calebhearth.com/ to find everything else and to appreciate author's digital home.