Encode and decode URL-safe strings entirely in bash — no python or external tool required. Useful in pure-shell deployment scripts that need to build query strings.
Per-session CSRF token helpers using hash_equals for constant-time comparison. Token is regenerated on logout but persists across requests within a session.
Default values eliminate most overload sets. Named args make call sites self-documenting and let you skip middle parameters without thinking about positions.
`select { }` lets a coroutine wait on multiple suspending operations and proceed when the first one is ready — like nginx select() but for channels, deferreds, and timers.
Mark a recursive function `tailrec` and the compiler rewrites it as a loop — no stack frame per call, no StackOverflowError on deep recursion. Function must end with itself as the FINAL expression.
`CompletableFuture` is the idiomatic way to compose async work. `thenApply` for sync transforms, `thenCompose` for async chains (flatMap), `exceptionally` for fallback on failure.
`<(...)` makes a command's output look like a file; `>(...)` makes a command's input look like a file. Killer feature for tools that only accept filenames.
Like array_unique, but the uniqueness test is a callback that returns the key to dedupe by. Useful for "unique by ID" or "unique by lowercased email" across arrays of objects/rows.
Replace giant config structs with a variadic list of `Option` functions. Lets you add optional parameters later without breaking existing callers. The standard Go API design for constructors.
SQL date_trunc — Bucket Times into Hours/Days/Weeks
`date_trunc('day', ts)` rounds a timestamp down to the start of the day. Use for time-series GROUP BYs — daily/weekly/hourly buckets without messy arithmetic.
A thin fetch wrapper that returns parsed JSON typed as `T`, throws on non-2xx, and accepts an AbortSignal. Single source of truth for "how this app talks to APIs."
`walkdir` recursively iterates every entry under a path, skipping inaccessible directories cleanly. The standard-library alternative requires manual recursion.
Uniformly shuffle an array in place using the modern Fisher-Yates algorithm. Returns the same array for chaining. Use crypto.getRandomValues for cryptographic uses.
`EXPLAIN` shows the query plan; `EXPLAIN ANALYZE` actually runs it and shows real timings. The first tool when a query is slow — look for sequential scans on big tables.