Results for “Restoring & revising local work”
Small, practical examples. Search by task or narrow things down below.
Keep exec-form arguments literal
Docker / Compose: JSON exec form does not expand shell environment variables.
Docker / Compose✓ Tested
Keep function state between calls
C: A static local variable retains its stored value for the lifetime of the process.
C✓ Tested
Keep loop state by avoiding a pipeline subshell
Bash Scripts: Redirect input into a while loop so updates to a counter remain in the current shell.
Bash Scripts✓ Tested
Keep only values satisfying a condition
Keep only values satisfying a condition in a complete Rust program using the standard library.
Rust✓ Tested
Limit the bytes read from a stream
Limit the bytes read from a stream using a complete Go program with explicit sample inputs.
Go✓ Tested
Limit the number of container processes
Docker / Compose: The pids-limit setting caps the container’s process count.
Docker / Compose✓ Tested
List a specific image reference
Docker / Compose: The reference filter narrows repository and tag results.
Docker / Compose✓ Tested
List branches already merged into the current branch
Git: The merged filter reports branches whose tips are reachable from HEAD.
Git✓ Tested
List changed files without the full diff
Inspect affected paths before staging.
diff✓ Tested
List files changed by the current commit
Git: diff-tree exposes the paths changed between a commit and its parent.
Git✓ Tested
List matching files
Enumerate immediate text files and sort their names in C#.
C#✓ Tested
List only containers belonging to a label
Docker / Compose: A label filter selects explicitly tagged resources.
Docker / Compose✓ Tested