FIND YOUR NEXT FEW LINES

Results for “Streams & byte tools”

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

147 snippets foundClear filters
Arduino / CGetting Started

Store a small unsigned value

Arduino / C: Store a small unsigned value on an Uno with the Serial Monitor set to 9600 baud.

Arduino / C✓ Tested
Bash ScriptsInput streams & redirection

Substitute values into a multiline template

Bash Scripts: An unquoted heredoc delimiter enables parameter expansion in the template.

Bash Scripts✓ Tested
Bash ScriptsInput streams & redirection

Write a literal multiline block

Bash Scripts: Quoting the heredoc delimiter disables parameter and command expansion inside it.

Bash Scripts✓ Tested
Bash ScriptsInput streams & redirection

Write several messages through one file descriptor

Bash Scripts: Open a destination once and close the descriptor after writing.

Bash Scripts✓ Tested
CDynamic memory & ownership

Allocate an independent copy of a C string

C: Include one extra byte for the terminating null character.

C✓ Tested
PowerShellFile operations & integrity

Calculate a file’s SHA-256 digest

PowerShell: Get-FileHash hashes bytes without requiring the caller to load the whole file.

PowerShell✓ Tested
Linux CommandsArchives & checksums

Calculate a SHA-256 checksum

Calculate a file checksum so you can compare it with a hash from a trusted source and detect changed contents.

checksum✓ Tested
JavaEncoding & structured values

Calculate a SHA-256 content digest

Java: Hash UTF-8 bytes and format the result as lowercase hexadecimal.

Java✓ Tested
Arduino / CBinary values & packets

Calculate a simple packet XOR checksum

Arduino / C: XOR all payload bytes to produce a basic error-detection byte.

Arduino / C✓ 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
Linux CommandsSystem information

Check memory usage

Show memory and swap totals in human-readable units. The available column estimates memory usable by new applications.

memory✓ Tested
Linux CommandsSystem information

Check the size of a folder

Show a single total for the disk space used by a folder and its contents.

disk usage✓ Tested