Results for “only”
Small, practical examples. Search by task or narrow things down below.
Declare a fixed configuration value
Bash Scripts: Declare a fixed configuration value with a small standalone Bash program.
Bash Scripts✓ Tested
Parse a date without a time component
C#: DateOnly avoids attaching an irrelevant time or timezone to a calendar date.
C#✓ Tested
Protect a Compose service’s root filesystem
Docker / Compose: read_only rejects writes to the image filesystem.
Docker / Compose✓ Tested
Pull without creating a merge commit
Update a branch only when its upstream can be fast-forwarded.
pull✓ Tested
Share data through a named volume
Keep a file across two short-lived containers.
volume✓ Tested
Abort a conflicting cherry-pick
Git: Abort removes the incomplete replay and returns to the previous branch state.
Git✓ Tested
Abort a conflicting rebase
Git: Abort returns the branch to its state before the rebase attempt.
Git✓ Tested
Abort a merge with unresolved conflicts
Git: Abort restores the pre-merge state in this clean practice repository.
Git✓ Tested
Accept a small behavior interface
Accept a small behavior interface using a complete Go program with explicit sample inputs.
Go✓ Tested
Accept a variable number of arguments
Accept a variable number of arguments using a complete Go program with explicit sample inputs.
Go✓ Tested
Accept different types with a generic function
Accept different types with a generic function in a complete Rust program using the standard library.
Rust✓ Tested
Accumulate a result with fold
Accumulate a result with fold in a complete Rust program using the standard library.
Rust✓ Tested