#log Clear
Tags #php #kotlin #bash #go #sql #rust #typescript #html #java #python #files #utils #strings #http #concurrency #async #json #arrays #security #types #crypto #database #dates #format
PHP Tail Last N Lines of File
Efficiently read the last N lines of a (possibly large) file by seeking to the end and walking backwards in fixed-size chunks. Avoids loading the entire file into memory.
Bash Most-Modified Files in Repo
Find the hottest files in a git history — useful for spotting hotspots that need refactoring or extra test coverage.
Bash Find Commit That Introduced a String
`git log -S` (the "pickaxe") finds commits whose diff added or removed a given string. The fastest way to answer "when did this line first appear?"
Bash Tail Last N Lines (no `tail` shortcuts)
`tail -n 20` works for any case where tail is available. The pure-bash version below is useful inside containers or rescue shells where coreutils is missing.