Happened to wake up ten minutes before the Nobel Peace Prize announcement. Predictions: Donald Trump will not win, the United States will declare war on Norway.

Copy git hashes

I’ve been reaching more and more for git history commands to get details about the file I’m working on. I used to use tools like GitHub desktop or Sublime Merge but I never felt like they added that much value, it’s just faster to to call up a git log somefile or git log -L 5,10:somefile. The only shortcoming of this approach is it generally leaves me wanting a commit hash in my clipboard (often to switch to or to run git diff with). No more! Today I doubled down grabbing these hashes without having to mouse over and select the hash; I give you: git diff myfile --pretty=oneline | head -c7 | pbcopy This is the most simple form of this that I can find.

--pretty=oneline ensures the commit hash is first, piped into head -c7 we get the first 7 characters of the hash (you could grab more or use some kind of regex to get the whole thing but I believe 7 is the minimal amount you can give git where it will reliably find a commit). Pipe it to pbcopy and you got a little git hash.
It’s a fair amount of typing, I think I could set --pretty=oneline in my git config and frankly I could likely alias this whole thing as some kind of function in my .zshconfig but for now it is what it is.

Pretty funny that Obsidian makes you type out the “Quit without saving” Vim command to enable Vim mode. I love it but this is the first knowledge test I’ve taken to toggle a setting.

Doubling down on my Vim usage lately, getting to know some of the dot motions really feels like a superpower. I hate to say I’ve drunk the Kool-aid but I think I’m getting there.

My daughter found two monarch caterpillars on our milkweed plants which has kicked off an amazing journey.

Its wild how much they eat and also how fast they grow.

Finished reading: A Different Kind of Power by Jacinda Ardern 📚

I liked this book a lot, and I like Ardern a lot. I know she’s not overly popular in New Zealand, but all the negative review’s I’ve read center on mask mandates and required vaccinations which I have no issues with. I’d be curious to hear from come Kiwis on about this.

Simplicity in Editors

Two things I’ve read/seen recently which have served as a huge inspiration to me:

Mitch Hashimoto talking about his austere editor setup. And yobibyte talking about his plugin free neovim setup.

These talks inspired me to make the full jump over to Neovim. Admittedly, I’m using LSPs and Treesitter a few other plugins but it’s a big step back from the full featured setup of Zed or Sublime that I was running before. I’m still in the “this is hard” phase but I think that moving a bit slower and focusing on each line as opposed to all the jumping around I did before will, ultimately, give me a deeper understanding of the codebase and the discipline to keep bigger mental models in my head.

I work from home, in the basement; my 1 year old cries whenever I go downstairs. My wife has to stand with her at the top of the stairs and they wave me down as I go. It feels like leaving for the office but like 10 times a day.