The snippet library.
Small, practical examples. Search by task or narrow things down below.
Pass a function as a callback
C: A typed function pointer permits behavior to be supplied to another function.
C✓ Tested
Pass a named configuration value
Docker / Compose: Pass a named configuration value using a locally available Ubuntu image.
Docker / Compose✓ Tested
Pass a value to a signal input
Pass a value to a signal input with a standalone Angular component and explicit browser behavior.
Angular✓ Tested
Pass a variable to one command
Linux Commands: Use env to supply a child process value without setting it permanently in the parent shell.
Linux Commands✓ Tested
Pass a variable to standard input
Bash Scripts: A here-string supplies the expanded value followed by a newline.
Bash Scripts✓ Tested
Pass an argument into a worker thread
C++: Thread arguments are copied by default; std::ref explicitly passes a reference.
C++✓ Tested
Pass an environment value to a child process
PowerShell: The process environment is inherited by a launched child PowerShell process.
PowerShell✓ Tested
Pass an environment variable
Supply configuration without changing an image.
environment✓ Tested
Pass an input ref as a React 19 prop
Pass an input ref as a React 19 prop with a small React component and explicit browser behavior.
React✓ Tested
Pass an object to the style prop
Pass an object to the style prop with a small React component and explicit browser behavior.
React✓ Tested
Pass behavior as a function delegate
C#: Func describes a callable with typed parameters and a return value.
C#✓ Tested
Pass data through props
Pass data through props with a small React component and explicit browser behavior.
React✓ Tested