Notes

Short notes about anything that catches my attention. Also a place to save stuff I keep forgetting over and over.

08/01/2026

18:49

Exhaustiveness checking:

type Shape = Circle | Square;
 
function getArea(shape: Shape) {
  switch (shape.kind) {
    case "circle":
      return Math.PI * shape.radius ** 2;
    case "square":
      return shape.sideLength ** 2;
    default: {
      const exhaustiveCheck: never = shape;
      return exhaustiveCheck;
    }
  }
}

07/30/2026

18:04

To get a list of all the files changed between two points in Git history, use git diff main...<HEAD, branch-name or whatever>.

07/16/2026

10:49

Jest is full of niceties. Today I've discovered it.failing. It's for writing tests that are expected to fail.

07/08/2026

10:03

One thing Claude excels at: creating Bash scripts.

07/03/2026

14:11

Last exit code on macOS: echo $?.

07/01/2026

10:36

To delete a AWS secret immediately, run aws secretsmanager delete-secret --secret-id my-secret --force-delete-without-recovery.

06/28/2026

10:20

That's why they sell music to kids, because no one ever forgets their teenage summer, and you’re always gonna go back to the music of your teenage summer. So, nostalgia is pretty built in, you know what I mean? That's why they want young people, you know, everybody will go running screaming why tell sell music to kids, or cigarettes to kids, or anything to kids, because once you got a kid, you got'em for life.

Johnette Napolitano, in https://www.youtube.com/watch?v=ISskfy3FKhc

06/15/2026

11:10

Nice finding of the day: AWS Vault.

06/02/2026

11:01

  • Positive lookahead: (?=regex)
  • Negative lookahead: (?!regex)
  • Positive lookbehind: (?<=regex)
  • Negative lookbehind: (?<!regex)

05/18/2026

15:23

How to change the password of a .pfx certificate:

openssl pkcs12 -in old.pfx -out temp.pem -nodes
openssl pkcs12 -export -out new.pfx -in temp.pem

If the .pfx uses an old/legacy cipher (RC2-40-CBC) that newer OpenSSL versions disable by default, run a slightly different command to extract the temp.pem file:

openssl pkcs12 -in old.pfx -out temp.pem -nodes -legacy
openssl pkcs12 -export -out new.pfx -in temp.pem

This is a hand-crafted, a little weird personal website. Create one of your own!