FIND YOUR NEXT FEW LINES

Results for “File operations & paths”

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

946 snippets foundClear filters
GoSlices & collections

Reverse slice order

Reverse slice order using a complete Go program with explicit sample inputs.

Go✓ Tested
RustNumbers & durations

Round and format a decimal value

Round and format a decimal value in a complete Rust program using the standard library.

Rust✓ Tested
GoDates & times

Round down to a whole minute

Round down to a whole minute using a complete Go program with explicit sample inputs.

Go✓ Tested
Docker / ComposeContainer commands

Run a command in a running container

Execute an additional process inside an existing container.

exec✓ Tested
Docker / ComposeCompose service options

Run a Compose service as a non-root user

Docker / Compose: user overrides the image’s default identity.

Docker / Compose✓ Tested
Docker / ComposeGetting Started

Run a Compose service as a numeric user

Docker / Compose: Run a Compose service as a numeric user in a small Compose file.

Docker / Compose✓ Tested
Docker / ComposeContainer commands

Run a one-off container

Run a command and remove its stopped container automatically.

run✓ Tested
Docker / ComposeGetting Started

Run a process as an unprivileged user

Docker / Compose: Run a process as an unprivileged user using a locally available Ubuntu image.

Docker / Compose✓ Tested
jQueryEvents

Run an event handler once

Use jQuery one for a handler that removes itself after the first event.

jQuery✓ Tested
Docker / ComposeImage management

Run an image by its local immutable ID

Docker / Compose: Resolve the local image ID before invoking it.

Docker / Compose✓ Tested
GoGetting Started

Run cleanup when a function returns

Run cleanup when a function returns using a complete Go program with explicit sample inputs.

Go✓ Tested
Docker / ComposeGetting Started

Run your first disposable container

Docker / Compose: Run your first disposable container using a locally available Ubuntu image.

Docker / Compose✓ Tested