FIND YOUR NEXT FEW LINES

Results for “pre”

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

429 snippets foundClear filters
Docker / ComposeLimits & process security

Confirm the root filesystem rejects writes

Docker / Compose: A read-only root prevents creating files outside writable mounts.

Docker / Compose✓ Tested
C#JSON & binary formats

Convert bytes to Base64 and back

C#: Encode text to UTF-8 before converting it to a Base64 representation.

C#✓ Tested
JavaEncoding & structured values

Convert bytes to hexadecimal and back

Java: Use HexFormat for a standard-library representation of raw bytes.

Java✓ Tested
JavaDates & time zones

Convert epoch seconds into an instant

Java: Instant represents a UTC timeline point independent of the default timezone.

Java✓ Tested
PythonText validation & encoding

Convert hexadecimal text to bytes

Python: Use bytes.fromhex for a readable byte representation and hex for the reverse conversion.

Python✓ Tested
Linux CommandsTransforming text

Convert tab stops to spaces

Linux Commands: Use expand with a fixed tab width when preparing plain-text alignment.

Linux Commands✓ Tested
SQLiteDates & time

Convert Unix time to a timestamp

Interpret a seconds-since-epoch value as UTC.

unixepoch✓ Tested
PowerShellFile operations & integrity

Copy a file to a chosen destination

PowerShell: LiteralPath prevents wildcard characters in the source filename from being interpreted.

PowerShell✓ Tested
Linux CommandsFiles & folders

Copy a file to a folder

Create a backup folder if needed, then copy a file into it while preserving its modification time and permission bits.

file✓ Tested
GitRestoring & revising local work

Correct the latest unpublished commit message

Git: Amend replaces the current commit while preserving its tree when no new changes are staged.

Git✓ Tested
Arduino / CDigital signals & interrupts

Count a button’s falling edge in the main loop

Arduino / C: Compare each reading with the previous state to detect transitions.

Arduino / C✓ Tested
PowerShellArray operations

Count a result even when it is empty or has one item

PowerShell: Wrap pipeline results in an array subexpression for consistent Count behavior.

PowerShell✓ Tested