Truncate Date to Calendar.Component in Swift
More from Hearthside by Caleb Hearth
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.
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.
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...
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...
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...