FIND YOUR NEXT FEW LINES

Results for “os”

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

809 snippets foundClear filters
Docker / ComposeImage management

Check that an image has layer history

Docker / Compose: history shows the instructions associated with image layers.

Docker / Compose✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Check whether a function has been defined

Bash Scripts: declare -F tests a function name without executing it.

Bash Scripts✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Check whether a variable exists under nounset

Bash Scripts: The plus expansion distinguishes an unset variable without reading its missing value.

Bash Scripts✓ Tested
HTMLNative disclosure & dialogs

Clone inert template content into the document

HTML: Template children stay out of the rendered document until their fragment is inserted.

HTML✓ Tested
Docker / ComposeDockerfile patterns

Combine a stable entrypoint with default arguments

Docker / Compose: CMD supplies default arguments to an exec-form ENTRYPOINT.

Docker / Compose✓ Tested
PostgresBulk changes & set operations

Combine results while retaining duplicates

Postgres: UNION ALL does not spend work removing equal rows.

Postgres✓ Tested
PostgresText cleanup & matching

Combine text values with a separator

Postgres: Use the concatenation operator supported by the selected SQL dialect.

Postgres✓ Tested
PostgresSchema design & transactions

Commit multiple related changes together

Postgres: The first transaction prepares the fixtures. The second commits both updates as one unit.

Postgres✓ Tested
PostgresSubqueries & ranked selection

Compare a row with its own group average

Postgres: A correlated aggregate computes a different comparison value for each group.

Postgres✓ Tested
PythonNumbers & calculations

Compare floating-point calculations with tolerance

Python: Use isclose instead of exact equality for results affected by floating-point rounding.

Python✓ Tested
PostgresReporting & grouped calculations

Compute an integer weighted average

Postgres: Multiply before summing and guard a zero total weight with NULLIF.

Postgres✓ Tested
Docker / ComposeLimits & process security

Configure bounded retries after a failure

Docker / Compose: on-failure with a count limits automatic restart attempts.

Docker / Compose✓ Tested