Results for “one-off”
Small, practical examples. Search by task or narrow things down below.
Join strings with a separator
Combine a list of strings into one readable string with a separator between each item.
string✓ Tested
Join two sorted files by a shared key
Linux Commands: Use join for sorted, simple delimiter-separated records with one row per key.
Linux Commands✓ Tested
Keep a callback stable between renders
Keep a callback stable between renders with a small React component and explicit browser behavior.
React✓ Tested
Keep a label available without occupying visible layout space
CSS: A clipped one-pixel label remains the input’s accessible name.
CSS✓ Tested
Keep a mutable value without rendering on each write
Keep a mutable value without rendering on each write with a small React component and explicit browser behavior.
React✓ Tested
Keep a secondary button from submitting a form
Keep a secondary button from submitting a form with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Keep numeric input text until conversion
Keep numeric input text until conversion with a small React component and explicit browser behavior.
React✓ Tested
Keep only the latest requested result
Keep only the latest requested result with a small React component and explicit browser behavior.
React✓ Tested
Keep separate state for separate hook calls
Keep separate state for separate hook calls with a small React component and explicit browser behavior.
React✓ Tested
Leave room above a scrolled-to heading
CSS: Scroll-margin offsets scrollIntoView placement so a heading is not flush against the viewport edge.
CSS✓ Tested
Limit a beginner function variable to local scope
Bash Scripts: Limit a beginner function variable to local scope with a small standalone Bash program.
Bash Scripts✓ Tested
Load environment variables from a file
Docker / Compose: An env file supplies one KEY=value assignment per line.
Docker / Compose✓ Tested