FIND YOUR NEXT FEW LINES

Results for “tar”

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

1058 snippets foundClear filters
Docker / ComposeImage management

Give an existing image another tag

Docker / Compose: Tagging adds a reference without copying the image layers.

Docker / Compose✓ Tested
TypeScriptTypes & functions

Give an optional property a default

Handle missing object fields with nullish coalescing.

optional✓ Tested
TypeScriptObject behavior & collections

Group records into map entries

TypeScript: Initialize an array for a missing Map key before appending its values.

TypeScript✓ Tested
Arduino / CArrays & embedded state

Group related readings in a struct

Arduino / C: A struct keeps a sample’s fields together without dynamic allocation.

Arduino / C✓ Tested
TypeScriptSafe data handling

Handle a result with a discriminated union

Separate success data from an error message.

discriminated union✓ Tested
Arduino / CSerial protocols

Handle incomplete serial input

Arduino / C: The returned byte count distinguishes a complete payload from a timed-out partial one.

Arduino / C✓ Tested
GitTags & repository configuration

Identify a commit exactly at a release tag

Git: Describe with exact-match refuses to invent a label for a later commit.

Git✓ Tested
GitTags & repository configuration

Ignore a personal scratch file without changing shared rules

Git: The repository-local exclude file applies only to this checkout.

Git✓ Tested
GitWorking tree & staging

Ignore generated files

Exclude build output from untracked-file listings.

gitignore✓ Tested
Arduino / CSensor calculations

Ignore small movements around a center value

Arduino / C: Values inside the deadband become zero while others keep their direction.

Arduino / C✓ Tested
GitStashing selected work

Include untracked files in a stash

Git: The include-untracked option saves new files along with tracked edits.

Git✓ Tested
Docker / ComposeLimits & process security

Insert Docker’s small init process

Docker / Compose: The init option adds a PID 1 process that reaps children and forwards signals.

Docker / Compose✓ Tested