Results for “File operations & paths”
Small, practical examples. Search by task or narrow things down below.
Drop Linux capabilities for a simple command
Docker / Compose: Drop Linux capabilities for a simple command using a locally available Ubuntu image.
Docker / Compose✓ Tested
Embed a struct for shared fields
Embed a struct for shared fields using a complete Go program with explicit sample inputs.
Go✓ Tested
Enable an init process for a service
Docker / Compose: init adds a small PID 1 process to forward signals and reap children.
Docker / Compose✓ Tested
Enable and use foreign keys
Turn on relationship enforcement for the connection.
foreign keys✓ Tested
Encode a struct with JSON field names
Encode a struct with JSON field names using a complete Go program with explicit sample inputs.
Go✓ Tested
Encode an integer as big-endian bytes
Encode an integer as big-endian bytes in a complete Rust program using the standard library.
Rust✓ Tested
Encode and decode Base64 text
Encode and decode Base64 text using a complete Go program with explicit sample inputs.
Go✓ Tested
Encode bytes as hexadecimal
Encode bytes as hexadecimal using a complete Go program with explicit sample inputs.
Go✓ Tested
Encode URL query parameters
Encode URL query parameters using a complete Go program with explicit sample inputs.
Go✓ Tested
Exercise a function with a table of inputs
Exercise a function with a table of inputs in a complete Rust program using the standard library.
Rust✓ Tested
Expand a JSON array into rows
Iterate array elements using a table-valued function.
json_each✓ Tested
Express a duration in milliseconds
Express a duration in milliseconds in a complete Rust program using the standard library.
Rust✓ Tested