FIND YOUR NEXT FEW LINES

Results for “pre”

Small, practical examples. Search by task or narrow things down below.

429 snippets foundClear filters
Docker / ComposeDockerfile patterns

Exclude files from the build context

Docker / Compose: A dockerignore file prevents selected local files from being copied.

Docker / Compose✓ Tested
Bash ScriptsParameter expansion

Extract a basename without an external process

Bash Scripts: Double hash removes the longest matching prefix ending in a slash.

Bash Scripts✓ Tested
JavaScriptText handling & Unicode

Extract the text after the last delimiter

JavaScript: Use lastIndexOf when earlier occurrences should remain part of the prefix.

JavaScript✓ Tested
TypeScriptText handling & Unicode

Extract the text after the last delimiter

TypeScript: Use lastIndexOf when earlier occurrences should remain part of the prefix.

TypeScript✓ Tested
SQLExpressions & aggregates

Filter aggregate groups

Keep only categories with multiple products.

HAVING✓ Tested
Arduino / CArrays & embedded state

Find a value in a small lookup table

Arduino / C: A linear scan is simple and predictable for a small fixed array.

Arduino / C✓ Tested
GitCommits & history

Find commits by message

Search commit subjects and bodies for a phrase.

log✓ Tested
Linux CommandsFinding & selecting files

Find empty regular files

Linux Commands: Use the empty predicate with a file type constraint.

Linux Commands✓ Tested
Linux CommandsSorting & joining records

Find lines common to two sorted files

Linux Commands: Use comm -12 to suppress the two columns of unmatched lines.

Linux Commands✓ Tested
PowerShellFile operations & integrity

Find matching files recursively

PowerShell: Select files explicitly and sort their names for predictable presentation.

PowerShell✓ Tested
C++Ordering & set operations

Find sorted set members missing from another set

C++: set_difference writes elements present in the first sorted input but absent from the second.

C++✓ Tested
JavaScriptUTC date operations

Find the final day of a month

JavaScript: Day zero of the following UTC month selects the previous month’s final day.

JavaScript✓ Tested