FIND YOUR NEXT FEW LINES

Results for “Get-Content”

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

914 snippets foundClear filters
GitRestoring & revising local work

Remove only a named untracked scratch file

Git: Use a narrow pathspec after reviewing the dry run; clean cannot recover untracked content.

Git✓ Tested
Linux CommandsFiles & permissions

Rename a file with mv

Linux Commands: Rename a known file in the current directory and inspect its new contents.

Linux Commands✓ Tested
TypeScriptRegular expressions & URL encoding

Reorder captured text in a replacement

TypeScript: Use numbered replacement groups to rearrange a known two-part name.

TypeScript✓ Tested
TypeScriptText handling & Unicode

Repeat a string a fixed number of times

TypeScript: String.repeat requires a nonnegative finite repetition count.

TypeScript✓ Tested
Arduino / CTiming & control

Repeat an action a fixed number of times

Use a counter and delay for a simple finite sequence.

for loop✓ Tested
Arduino / CText & bounded buffers

Replace a token inside an Arduino String

Arduino / C: replace modifies all occurrences in the existing object.

Arduino / C✓ Tested
TypeScriptArray restructuring

Replace an array segment in place

TypeScript: splice returns removed items and inserts replacements at the chosen position.

TypeScript✓ Tested
Arduino / CSensor calculations

Represent a decimal quantity with a scaled integer

Arduino / C: Integer hundredths avoid floating-point storage for fixed-precision values.

Arduino / C✓ Tested
Arduino / CBinary values & packets

Require every bit in a mask

Arduino / C: Masking followed by equality tests whether all required flags are set.

Arduino / C✓ Tested
CSSBox dimensions & overflow

Reserve space for a visible border

CSS: A border adds to the outer dimensions of a content-box element.

CSS✓ Tested
TypeScriptRegular expressions & URL encoding

Resolve a relative URL against a base

TypeScript: A trailing slash makes the final base path component a directory.

TypeScript✓ Tested
GitStashing selected work

Restore the index state recorded in a stash

Git: Apply with index restores which changes were staged as well as their file contents.

Git✓ Tested