FIND YOUR NEXT FEW LINES

Results for “tar”

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

1058 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
TypeScriptUTC date operations

Count days between UTC-midnight dates

TypeScript: A day is exactly 86400000 milliseconds for these explicitly UTC-midnight inputs.

TypeScript✓ Tested
JavaText validation & formatting

Count Unicode code points

Java: Use codePointCount when supplementary characters should count as one rather than two UTF-16 units.

Java✓ Tested
TypeScriptText handling & Unicode

Count Unicode code points in a string

TypeScript: String iteration combines surrogate pairs, unlike the UTF-16 length property.

TypeScript✓ Tested
TypeScriptCollections & records

Count words using a Map

Update a keyed counter without losing its value type.

Map✓ Tested
GitStashing selected work

Create a branch at the original base of a stash

Git: stash branch checks out the stash’s base and reapplies the saved work there.

Git✓ Tested
GitBranches & ancestry

Create a branch from a known release tag

Git: A named starting revision makes the branch’s initial commit explicit.

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
Docker / ComposeNetworks & volume metadata

Create a network marked for internal connectivity

Docker / Compose: The internal option disables normal external routing for that network.

Docker / Compose✓ 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 / ComposeDockerfile patterns

Create a runtime file during the build

Docker / Compose: RUN executes during the build while CMD executes when a container starts.

Docker / Compose✓ Tested
Linux CommandsFiles & folders

Create a symbolic link

Create a relative symbolic link to a file and inspect its target with readlink.

symlink✓ Tested