Subscribe
Fenix

Technologies, Hacks and Games...

Latest posts

Storing Terraform state in S3 with native locking

Moving Terraform state from a local file to an S3 bucket with versioning and encryption, locking it with use_lockfile instead of a DynamoDB table, migrating the existing state, the IAM permissions it needs and what a lock error looks like.

6 min read

Golang Tutorial 10: Pointers

Pointers in Go with runnable examples: & and *, when to pass a pointer, nil pointers, pointer vs value receivers, new(expr) from Go 1.26, the range loop trap and a short look at escape analysis with -gcflags=-m. Small exercise at the end.

8 min read

Idempotent payment webhooks in golang with an event table

Payment providers like Razorpay deliver webhooks at least once. Verify the signature on the raw body, record each event in a Postgres table with a unique (provider, event_id), process it in the same transaction and check the captured amount before settling.

6 min read

Switching between Gemini and Ollama behind one Go interface

My golang trading jobs call Gemini for advice, and I wanted to try a local Ollama model without editing every job. Here is the one method interface, the optional health check that fails fast, and how it compares with the Anthropic Go SDK.

6 min read