Results for “options”
Small, practical examples. Search by task or narrow things down below.
Allow several selected options
HTML: A multiple select exposes each selected option as a value with the same control name.
HTML✓ Tested
Collect selected options from a multi-select
Collect selected options from a multi-select with a small React component and explicit browser behavior.
React✓ Tested
Parse a small set of long options
Bash Scripts: Use a loop and case statement to consume a value-bearing long option.
Bash Scripts✓ Tested
Provide a list of selectable options
HTML: Learn how to provide a list of selectable options in a complete browser example.
HTML✓ Tested
Read checked options
Collect checked checkbox values with jQuery map and get.
jQuery✓ Tested
Set several selected options
jQuery: Passing an array to val selects matching values in a multiple select.
jQuery✓ Tested
Add a fixed hostname mapping
Docker / Compose: extra_hosts adds an entry to the container’s hosts file.
Docker / Compose✓ Tested
Choose a service’s internal hostname
Docker / Compose: hostname controls the name reported inside the container.
Docker / Compose✓ Tested
Disable a service’s network interfaces
Docker / Compose: network_mode none leaves only the loopback interface.
Docker / Compose✓ Tested
Drop capabilities for a Compose service
Docker / Compose: cap_drop ALL removes optional Linux capabilities.
Docker / Compose✓ 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
Give a read-only service writable scratch space
Docker / Compose: A tmpfs mount provides temporary storage independent of the root filesystem.
Docker / Compose✓ Tested