Posts

Headless BPF

December 30, 2023

I’ve been using the Berkeley Packet Filter from Golang’s wrapper around the PCAP library whenever I needed to filter network packets programmatically:

golang pcap bpf

Byte Replace

October 19, 2023

You are probably very familiar with the strings function to replace a substring:

golang benchmark patch

Caddy with Route53 DNS certificate

March 2, 2021

I’ve been running into this issue often enough and I seem to never remember where to add the environment variables. So, here’s a note to my future self.

caddy route53 dns

VSCode on Arch with arm64 CPU

December 22, 2019

I was recently setting up my Pinebook Pro as my new travel laptop. This laptop uses a combination of 64-bit CPUs implementing the v8-A instruction set. The Laptop now runs Manjaro, an Arch distro to make things a bit more complicated. With VSCode being my current IDE of choice and GoLand not available for arm64, I had to find an easy solution to get Code working. There is an existing build of VSCode for arm64 with rmp and dep packages build on the latest version of VSCode.

vscode code arm64 arch manjaro

That String Array

October 11, 2019

If you are using gqlgen to generate your GraphQL endpoint and sqlx or some other kind of ORM for your database, you can benefit from using one type or struct in both directions. You create one type User struct for GraphQL and it maps to your db schema. Now if this user contains more complex types, things become interesting…

golang gqlgen graphql sql cockroachdb

Locality Sensitive Fuzzy Hashing

December 12, 2018

In order for us to understand locality sensitive (fuzzy) hashing (LSH), let me take a quick detour via cryptographic hash functions as their features serve as a great explanation for fuzzy hashing.

hashing lsfh fuzzy tlsh security