Skip to content

Porcelain

A little indicator on my prompt tells me the state of the git repo I’m in, if I’m in one. It’s quite minimal. Green tick: repo is clean; yellow cross: there are changes; red dot: there are merge conflicts. It’s a nice visual cue and for the longest time and the following code in my ~/.zshrc file made it possible. 1 2 3 4 5 6 7 8 9 10 git_status_prompt() { git rev-parse --git-dir >/dev/null 2>&1 || return if git diff --name-only --diff-filter=U 2>/dev/null | grep -q .; then echo " %F{red}●%f" elif git status --porcelain 2>/dev/null | grep -q .; then echo " %F{yellow}✘%f" else echo " %F{green}✓%f" fi } This works fine. It does what it’s supposed to… It’s ugly though. ...

More Backups Are Always Better

I’ve mentioned before that I have my website’s repository mirrored across multiple Git hosts. Well, it is not just the website; it is all my repositories. I have four hosts, namely: GitHub, GitLab, Codeberg, and Bitbucket. This is overkill, I know. I really like it, though. It gives me a warm, fuzzy feeling knowing my precious crap is safe. If one host goes down, I’ve got three others. If two go down, there are still two left. And if three go down… well, there’s probably something far more serious going on, but let’s not get distracted. ...

Hugo, Hosts, And Hard Lessons

Hugo As I wrote in my Hello World post, I have switched to Hugo. And so far, I am loving it. It’s fast, it works great and I have not had to hack together solutions for things I wanted the site to do, but that were not included in the platform (looking at you, Eleventy!). I like how the backend of it works and I like the way you make new posts or run the site locally for testing. I like how you can use a pre-built theme, but then override it so you can make it your own, without having to touch the actual theme files - this also makes updating the theme later possible. ...