With SQLite, INSERT OR IGNORE Is Often Not What You Want

tl;dr - INSERT OR IGNORE will silently fail if any constraint is violated (even a NOT NULL on a column type!). If you want to express "insert this row unless it already exists", use ON CONFLICT instead.

Read More...
Posted on 2024-02-04

Which fields can you use with Kubernetes field selectors?

Field selectors are a handy filter you can provide kubectl get via the --field-selector option to pare down the list of resources you get back from the server. The docs mention that supported fields vary from resource to resource, but sadly don't mention which resources support which fields. I did a little bit of poking around, and - as far as I can tell - this isn't documented anywhere! So, seeing as reading source code is one of my Maslow's hammers, I broke out that particular hammer and got to reading.

Read More...
Posted on 2022-01-24

Follow-up on spurious wakeups

So, the fix I implemented for my wakeup problem a few weeks ago had an interesting side effect. Normally, when I put my laptop to sleep, it loses about 10% of its charge per day, which seems reasonable. After my fix, however, it started to lose 40% per day - it's not uncommon for me not to touch my laptop for a few days, so that's not great. So here's a follow-up on how I addressed that issue!

Read More...
Posted on 2022-01-12

Avoiding spurious wakeups with my ThinkPad X1 Yoga

Last year I bought myself a ThinkPad X1 Yoga to use as my personal laptop - I've been pretty happy with it so far, but there's one problem I've run into that I've noticed a lot more lately - the laptop will sometimes wake up while the lid is closed, go back to sleep, and then repeat that whole process every few minutes. This can't be good for the hardware, so I dug into this issue and wanted to share my findings with anyone who's having the same problem running Linux on this laptop!

Read More...
Posted on 2022-01-01

Random zsh tips

My friend fREW and I both use zsh, and we've picked up a number of tricks over the years. We decided to collaborate on a post sharing some assorted tips that can really improve the zsh experience!

Read More...
Posted on 2020-10-24