FIND YOUR NEXT FEW LINES

Results for “require”

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

1101 snippets foundClear filters
GitStashing selected work

Stash only the staged changes

Git: The staged option saves index changes while keeping unrelated unstaged edits.

Git✓ Tested
GitStashing selected work

Stash unstaged work while leaving staged edits available

Git: Keep-index preserves the staged state for testing or committing while stashing the rest.

Git✓ Tested
Bash ScriptsProcesses & environment

Stop a child process created by the script

Bash Scripts: Send a signal only to the captured PID of the script’s own child and wait for it to exit.

Bash Scripts✓ Tested
Docker / ComposeContainer lifecycle

Stop a running container gracefully

Docker / Compose: stop sends the configured stop signal and waits before forcing termination.

Docker / Compose✓ Tested
Bash ScriptsArguments & decisions

Stop a search loop at the first match

Bash Scripts: Break exits the current loop as soon as the desired item is found.

Bash Scripts✓ Tested
GitRestoring & revising local work

Stop tracking a generated file while keeping it locally

Git: Removing a path from the index leaves its working copy intact when cached is specified.

Git✓ Tested
TypeScriptGetting Started

Store a value in a named variable

TypeScript: Give a value a descriptive name and print it.

TypeScript✓ Tested
Bash ScriptsGetting Started

Store and iterate over an array

Bash Scripts: Store and iterate over an array with a small standalone Bash program.

Bash Scripts✓ Tested
Bash ScriptsGetting Started

Store text in a variable

Bash Scripts: Store text in a variable with a small standalone Bash program.

Bash Scripts✓ Tested
SQL ServerSelect & page

Substitute a value for NULL

Use SQL Server’s ISNULL expression.

ISNULL✓ Tested
Bash ScriptsInput streams & redirection

Substitute values into a multiline template

Bash Scripts: An unquoted heredoc delimiter enables parameter expansion in the template.

Bash Scripts✓ Tested
PowerShellCollections & objects

Sum a collection

Calculate a total with Measure-Object.

Measure-Object✓ Tested