FIND YOUR NEXT FEW LINES

Results for “Dates & process utilities”

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

266 snippets foundClear filters
Docker / ComposeBuild images

Run an image as a non-root user

Choose an unprivileged numeric identity for the default process.

Dockerfile✓ Tested
Linux CommandsStreams & byte tools

Save a stream while displaying it

Linux Commands: Use tee to write a copy of standard input to a file.

Linux Commands✓ Tested
Linux CommandsSearching text

Search for a literal string

Linux Commands: Use grep -F when the pattern contains regex metacharacters that should be literal.

Linux Commands✓ Tested
Linux CommandsText processing

Search for text in a file

Find matching lines with their line numbers, ignoring letter case and treating the pattern as literal text.

grep✓ Tested
Linux CommandsSearching text

Search text without case sensitivity

Linux Commands: Use grep -i to match uppercase and lowercase variants.

Linux Commands✓ Tested
TypeScriptUtilities & async

Select fields with the Pick utility type

Expose a smaller view of a larger object type.

Pick✓ Tested
Linux CommandsGetting Started

Send command output into another command

Linux Commands: Send command output into another command using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
C#Data & dates

Serialize an object to JSON

Serialize a small anonymous C# object with System.Text.Json.

C#✓ Tested
Linux CommandsStreams & byte tools

Set a file to a specific byte length

Linux Commands: Use truncate to shorten a known scratch file without replacing its inode.

Linux Commands✓ Tested
Docker / ComposeBuild images

Set a working directory

Choose the default directory for later instructions and the running process.

Dockerfile✓ Tested
Docker / ComposeCompose service options

Set no-new-privileges in Compose

Docker / Compose: security_opt configures the process privilege restriction.

Docker / Compose✓ Tested
Linux CommandsFiles & permissions

Set owner-only file permissions

Linux Commands: Use chmod 600 to allow only the owner to read and write a file.

Linux Commands✓ Tested