FIND YOUR NEXT FEW LINES

Results for “Restoring & revising local work”

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

812 snippets foundClear filters
Docker / ComposeDockerfile patterns

Keep exec-form arguments literal

Docker / Compose: JSON exec form does not expand shell environment variables.

Docker / Compose✓ Tested
CStructures & function interfaces

Keep function state between calls

C: A static local variable retains its stored value for the lifetime of the process.

C✓ Tested
Bash ScriptsProcesses & environment

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
RustVectors & slices

Keep only values satisfying a condition

Keep only values satisfying a condition in a complete Rust program using the standard library.

Rust✓ Tested
GoTesting & reusable helpers

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
Docker / ComposeLimits & process security

Limit the number of container processes

Docker / Compose: The pids-limit setting caps the container’s process count.

Docker / Compose✓ Tested
Docker / ComposeImage management

List a specific image reference

Docker / Compose: The reference filter narrows repository and tag results.

Docker / Compose✓ Tested
GitBranches & ancestry

List branches already merged into the current branch

Git: The merged filter reports branches whose tips are reachable from HEAD.

Git✓ Tested
GitWorking tree & staging

List changed files without the full diff

Inspect affected paths before staging.

diff✓ Tested
GitCommit history & revision selection

List files changed by the current commit

Git: diff-tree exposes the paths changed between a commit and its parent.

Git✓ Tested
C#Files & paths

List matching files

Enumerate immediate text files and sort their names in C#.

C#✓ Tested
Docker / ComposeContainer lifecycle

List only containers belonging to a label

Docker / Compose: A label filter selects explicitly tagged resources.

Docker / Compose✓ Tested