FIND YOUR NEXT FEW LINES

Results for “require”

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

1101 snippets foundClear filters
GitBranches & recovery

Create and switch to a branch

Start an isolated feature branch from the current commit.

switch✓ Tested
TypeScriptArray restructuring

Create independent rows in a matrix

TypeScript: Use a mapping function to create each row instead of sharing one array with fill.

TypeScript✓ Tested
PythonFiles & paths

Create nested folders

Create a folder and any missing parent folders in one call. Running the code again is safe when the folder already exists.

directory✓ Tested
Bash ScriptsGetting Started

Declare a fixed configuration value

Bash Scripts: Declare a fixed configuration value with a small standalone Bash program.

Bash Scripts✓ Tested
Docker / ComposeCompose applications

Declare a named volume in Compose

Mount persistent storage at a service path.

Compose✓ Tested
GitTags & repository configuration

Declare LF normalization for a file type

Git: A gitattributes rule records text normalization expectations for matching paths.

Git✓ Tested
TypeScriptRegular expressions & URL encoding

Decode a percent-encoded URL component

TypeScript: decodeURIComponent reverses percent encoding and throws for malformed sequences.

TypeScript✓ Tested
Docker / ComposeGetting Started

Define a first Compose service

Docker / Compose: Define a first Compose service in a small Compose file.

Docker / Compose✓ Tested
PowerShellGetting Started

Define a function with a parameter

PowerShell: Define a function with a parameter using PowerShell 7.

PowerShell✓ Tested
PowerShellFunctions & control

Define a function with a typed parameter

Accept a name and return a greeting.

function✓ Tested
Docker / ComposeCompose applications

Define a one-off Compose service

Describe an image and command in a reusable YAML file.

Compose✓ Tested
Bash ScriptsGetting Started

Define and call a shell function

Bash Scripts: Define and call a shell function with a small standalone Bash program.

Bash Scripts✓ Tested