FIND YOUR NEXT FEW LINES

Results for “comm”

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

600 snippets foundClear filters
GitRemotes & additional checkouts

Delete a chosen branch from a practice remote

Git: The delete push removes only the explicitly named remote branch.

Git✓ Tested
GitBranches & ancestry

Delete an already merged practice branch

Git: The lowercase -d option refuses to delete an unmerged branch in ordinary use.

Git✓ Tested
GitTags & repository configuration

Delete only a selected local tag

Git: Deleting a local tag does not delete a corresponding remote tag.

Git✓ Tested
TypeScriptTypes & functions

Describe an object with an interface

Require named fields on a reusable object shape.

interface✓ Tested
Bash ScriptsFiles & reliability

Detect an error inside a pipeline

Use pipefail to observe failure before the last pipeline command.

pipefail✓ Tested
TypeScriptUTC date operations

Detect an invalid Date object

TypeScript: An invalid Date has a NaN time value.

TypeScript✓ Tested
TypeScriptNumbers & numeric validation

Detect NaN without converting the input

TypeScript: Number.isNaN tests the special numeric value instead of applying string-to-number conversion.

TypeScript✓ Tested
Docker / ComposeCompose service options

Disable a service’s network interfaces

Docker / Compose: network_mode none leaves only the loopback interface.

Docker / Compose✓ Tested
GitRestoring & revising local work

Discard an unstaged edit to one tracked file

Git: Restore copies the index version back into the selected working file.

Git✓ Tested
TypeScriptNumbers & numeric validation

Display a number with a fixed decimal width

TypeScript: toFixed returns a formatted string rather than a numeric value.

TypeScript✓ Tested
GitRemotes & additional checkouts

Distinguish a bare repository from a working checkout

Git: rev-parse reports repository mode without relying on directory naming conventions.

Git✓ Tested
TypeScriptObject behavior & collections

Distinguish an own property from an inherited one

TypeScript: Object.hasOwn avoids depending on an object’s possibly shadowed hasOwnProperty method.

TypeScript✓ Tested