FIND YOUR NEXT FEW LINES

Results for “comm”

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

600 snippets foundClear filters
GitBranches & ancestry

Count commits unique to each of two branches

Git: The symmetric difference with left-right separates commits reachable from only one side.

Git✓ Tested
GitGetting Started

Create a first practice commit from staged changes

Git: Create a first practice commit from staged changes inside the disposable repository created by the input setup.

Git✓ Tested
GitTags & repository configuration

Create a lightweight tag at the current commit

Git: A lightweight tag is a direct reference without an annotation object.

Git✓ Tested
GitRestoring & revising local work

Create a recovery branch for a recently moved commit

Git: The reflog can identify a previous local HEAD position while its entry and objects remain available.

Git✓ Tested
Docker / ComposeGetting Started

Disable networking for a Compose command

Docker / Compose: Disable networking for a Compose command in a small Compose file.

Docker / Compose✓ Tested
Docker / ComposeGetting Started

Disable networking for a local command

Docker / Compose: Disable networking for a local command using a locally available Ubuntu image.

Docker / Compose✓ Tested
PowerShellCommands & execution context

Discard incidental output from a setup command

PowerShell: Out-Null prevents setup objects from becoming part of a function or script’s useful result.

PowerShell✓ Tested
Arduino / CArrays & embedded state

Dispatch a command through function pointers

Arduino / C: A small function table can map validated command indices to actions.

Arduino / C✓ Tested
Bash ScriptsLoops & decisions

Dispatch a command with case

Choose an action from a small set of supported commands.

case✓ Tested
Arduino / CSerial protocols

Dispatch a one-character serial command

Arduino / C: A switch provides explicit handling for accepted and unknown commands.

Arduino / C✓ Tested
Docker / ComposeGetting Started

Drop Linux capabilities for a simple command

Docker / Compose: Drop Linux capabilities for a simple command using a locally available Ubuntu image.

Docker / Compose✓ Tested
PythonGetting Started

Explain a calculation with a comment

Python: Keep the code executable while documenting why a fixed input is used.

Python✓ Tested