TIL
Build a TOTP-based 2FA client in Go using the standard library. Generate time-based one-time passwords like Google Authenticator.
Use compile-time interface guards to verify type conformity in Go without runtime overhead. Learn the var _ Interface = (*Type)(nil) pattern.
Master Go 1.21's log/slog package for structured logging with levels, JSON output, and attribute grouping. No third-party libraries needed.
Replace complex nested conditionals with Python's enum.Flag and bitmasks for cleaner, more maintainable logic using bitwise operations.
Share data via DNS TXT records using dig and base64 encoding. Learn limitations, security concerns, and practical use cases for DNS tunneling.
Prevent memory leaks in Python descriptors by using weakref to avoid hard references that prevent garbage collection of validated objects.
Build Unix-style command pipelines in Python using subprocess.run with stdout piping for efficient process chaining and output capture.
Create reusable generators by implementing __iter__ in a class, allowing multiple lazy iterations without memory overhead or repeated function calls.
Learn how to use associative arrays in Bash to create key-value pairs, mimic dictionaries, and manage complex data structures in shell scripts.
Use process substitution <() to treat command output as files in Bash. Compare directories, process data, and avoid temporary files with this technique.
Build interactive CLI menus with Bash select statement. Create user-friendly command-line tools with option selection and function dispatch.
Format terminal output with tput instead of ANSI codes. Set colors, bold text, underlines, and backgrounds with simple commands in shell scripts.
Poll multiple data sources in a single thread using Python generators with itertools.cycle to alternate between infinite data streams efficiently.
Skip elements in iterables until a condition is met using itertools.dropwhile for efficient lazy evaluation that works with generators.
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.