FIND YOUR NEXT FEW LINES

Results for “files”

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

366 snippets foundClear filters
C++Files & paths

Create nested directories

Use C++17 filesystem to create a directory tree.

C++✓ Tested
PythonFiles & paths

Create nested folders

Create a folder and any missing parent folders in one call. Running the code again is safe when the folder already exists.

directory✓ Tested
Docker / ComposeCompose applications

Declare a named volume in Compose

Mount persistent storage at a service path.

Compose✓ Tested
GitTags & repository configuration

Declare LF normalization for a file type

Git: A gitattributes rule records text normalization expectations for matching paths.

Git✓ Tested
Docker / ComposeGetting Started

Define a first Compose service

Docker / Compose: Define a first Compose service in a small Compose file.

Docker / Compose✓ Tested
Docker / ComposeCompose applications

Define a one-off Compose service

Describe an image and command in a reusable YAML file.

Compose✓ Tested
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
Bash ScriptsFiles & reliability

Detect an error inside a pipeline

Use pipefail to observe failure before the last pipeline command.

pipefail✓ Tested
Docker / ComposeCompose service options

Disable a service’s network interfaces

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

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