More in Networking
Which DNS records does a domain have?
Networking
dig with +short strips everything but the answer.
Follow redirects and show only the headers
Networking
Traces a redirect chain to its destination without downloading the body.
Open an SSH tunnel to a remote database
Networking
Forwards a local port through a bastion so a client can connect as if the database were local.
Time every phase of an HTTP request
Networking
Splits DNS, connect, TLS and first byte apart, which tells you which one is actually slow.
Call a JSON API from PowerShell
Networking
Invoke-RestMethod parses the response for you, so no ConvertFrom-Json step is needed.
Random picks
Format a number as currency
JavaScript
Intl handles the symbol, the separators and the decimal places for the locale, so you never hand-roll them.
Fetch with a timeout
JavaScript
fetch has no timeout of its own. AbortSignal.timeout is the short way to give it one.
Find slow queries in Postgres
Databases
Ranks statements by total time spent. Needs the pg_stat_statements extension enabled.
List branches merged into main
Git
Finds the branches that are safe to delete, and the ones that are not.
Group and count in Ruby
Ruby
tally does the counting; group_by keeps the members when you need them.
Find the largest files with PowerShell
Shell
The Windows counterpart to du | sort | head.
Cache busting with a content hash
Build & CI
Names the built file after its contents so a deploy invalidates the cache without a version bump.
Show what a merge will do before doing it
Git
Lists the commits and the files a merge would bring in, so a surprise is less likely.