Problem synopsis I’m a huge fan of sqlc’s approach to code generation. I’ve seen sqlc called a reverse ORM, and I really like that moniker.
However, as a sqlc newbie, I’m still discovering its edge cases. Today’s edge case is using postgres UPSERT queries with sqlc.
The crux is that when upserting, it’s necessary for unique key conflicts to occur so that the UPDATE portion of the query executes. But non-null uuid Go types tend to have a zero-value of 00000000-0000-0000-0000-000000000000.
Mastodon While I’m in no way a Mastodon power user, I’ve really been enjoying the content that I get from my very limited Mastodon feed. I recently stopped consuming news from – hold on let’s not call it news. I recently stopped consuming useless information from a site that I won’t name. Everyone has those junk, just-for-fun sites they visit to blow off stream. You don’t have to be proud of them, and it’s fine that you visit them; every part of every day need not be productive.
Introduction Postgres queue tech is a thing of beauty, but far from mainstream. Its relative obscurity is partially attributable to the cargo cult of “scale”. The scalability cult has decreed that there are several queue technologies with greater “scalability” than Postgres, and for that reason alone, Postgres isn’t suitably scalable for anyone’s queuing needs. The cult of scalability would rather we build applications that scale beyond our wildest dreams than applications that meet concrete customer and business needs.
TL;DR ess automates syncing .env with env.sample It’s available here on Github.
The problem If you have a look through any software or infrastructure project you’ve worked on in the past, it won’t take long before you come across some “secrets”. Secrets are how we generally refer to things like passwords, API keys, and certificates that act as “identity”. If you have the secret to an identity, you or your systems are assumed to have that identity.
Update :: live demo now available A demo of this concept is now available at https://garbagespeak.com and the demo source code is available at https://github.com/acaloiaro/garbagespeak.com/.
Intro I’ve encountered a lot of skepticism around the idea of adding dynamic behavior to Hugo sites with hugo-htmx-go-template. That skepticism is well founded, because Hugo bills itself as a static site generator.
So why would anyone want to add dynamic functionality to Hugo sites when Hugo aspires to be a simple static site generator?