FIND YOUR NEXT FEW LINES

Results for “tar”

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

1058 snippets foundClear filters
Bash ScriptsFiles & reliability

Replace a text file with an atomic rename

Prepare new content beside the target before renaming it into place.

atomic write✓ Tested
Arduino / CText & bounded buffers

Replace a token inside an Arduino String

Arduino / C: replace modifies all occurrences in the existing object.

Arduino / C✓ Tested
TypeScriptArray restructuring

Replace an array segment in place

TypeScript: splice returns removed items and inserts replacements at the chosen position.

TypeScript✓ Tested
GitRemotes & additional checkouts

Replace the URL of a configured remote

Git: set-url changes configuration without fetching or pushing any objects.

Git✓ Tested
GitMerging & replaying changes

Replay an unpublished branch on a newer base

Git: Rebase updates the base of local feature commits when their changes do not conflict.

Git✓ Tested
Arduino / CSensor calculations

Represent a decimal quantity with a scaled integer

Arduino / C: Integer hundredths avoid floating-point storage for fixed-precision values.

Arduino / C✓ Tested
Docker / ComposeImage management

Require a locally available image

Docker / Compose: The never pull policy fails for missing images instead of attempting a download.

Docker / Compose✓ Tested
Arduino / CBinary values & packets

Require every bit in a mask

Arduino / C: Masking followed by equality tests whether all required flags are set.

Arduino / C✓ Tested
GitMerging & replaying changes

Resolve a merge by writing the intended final file

Git: After a conflict, edit the result, stage it, and finish the merge commit.

Git✓ Tested
Docker / ComposeNetworks & volume metadata

Resolve a peer’s name on a user-defined network

Docker / Compose: The embedded DNS service resolves names on user-defined bridges.

Docker / Compose✓ Tested
TypeScriptRegular expressions & URL encoding

Resolve a relative URL against a base

TypeScript: A trailing slash makes the final base path component a directory.

TypeScript✓ Tested
GitRestoring & revising local work

Restore a file’s content from an older commit

Git: Specify a source revision when the desired contents are not in the current index.

Git✓ Tested