FIND YOUR NEXT FEW LINES

Results for “create folder”

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

1248 snippets foundClear filters
RustTesting & reusable patterns

Check a deterministic result with an assertion

Check a deterministic result with an assertion in a complete Rust program using the standard library.

Rust✓ Tested
GoTesting & reusable helpers

Check a function with table-driven cases

Check a function with table-driven cases using a complete Go program with explicit sample inputs.

Go✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Check a script’s syntax without executing its body

Bash Scripts: bash -n parses commands but does not run ordinary script statements.

Bash Scripts✓ Tested
Linux CommandsSystem information

Check available disk space

Show total, used, and available filesystem space for the current directory in human-readable units.

disk✓ Tested
Bash ScriptsArray operations

Check exact array membership

Bash Scripts: Compare each element literally instead of searching a concatenated string.

Bash Scripts✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Check for an installed command

Bash Scripts: command -v checks command resolution without assuming a specific installation path.

Bash Scripts✓ Tested
GitRemotes & additional checkouts

Check out another branch in a second working tree

Git: A linked worktree shares repository objects while maintaining a separate checked-out branch.

Git✓ Tested
Bash ScriptsFiles & reliability

Check that a file is present and nonempty

Test file content availability before reading it.

file check✓ Tested
Linux CommandsArchive integrity & packaging

Check the integrity of a gzip stream

Linux Commands: Use gzip -t to verify a compressed file without extracting it.

Linux Commands✓ Tested
GitCommit history & revision selection

Check what kind of Git object a revision names

Git: cat-file -t distinguishes a commit, tree, blob, or annotated tag.

Git✓ Tested
Linux CommandsSorting & joining records

Check whether a file is already sorted

Linux Commands: Use sort -C for a quiet status check that does not rewrite the file.

Linux Commands✓ Tested
RustNumbers & durations

Check whether a floating-point value is finite

Check whether a floating-point value is finite in a complete Rust program using the standard library.

Rust✓ Tested