TIL

Writing a TOTP client in Go

Build a TOTP-based 2FA client in Go using the standard library. Generate time-based one-time passwords like Google Authenticator.

Interface guards in Go

Use compile-time interface guards to verify type conformity in Go without runtime overhead. Learn the var _ Interface = (*Type)(nil) pattern.

Go structured logging with slog

Master Go 1.21's log/slog package for structured logging with levels, JSON output, and attribute grouping. No third-party libraries needed.

Using DNS record to share text data

Share data via DNS TXT records using dig and base64 encoding. Learn limitations, security concerns, and practical use cases for DNS tunneling.

Associative arrays in Bash

Learn how to use associative arrays in Bash to create key-value pairs, mimic dictionaries, and manage complex data structures in shell scripts.

Process substitution in Bash

Use process substitution <() to treat command output as files in Bash. Compare directories, process data, and avoid temporary files with this technique.

Colon command in shell scripts

Use the colon : command as a no-op in Bash scripts for cleaner debug output with -x flag. Alternative to echo for section markers and comments.