mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-12 02:47:34 +00:00
Update cheatsheets
This commit is contained in:
12
tldr/audit2why
Normal file
12
tldr/audit2why
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# audit2why
|
||||
|
||||
> This command is an alias of `audit2allow --why`.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
`tldr audit2allow`
|
||||
@@ -11,7 +11,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Create an EKS Cluster:
|
||||
|
||||
`aws eks create-cluster --name {{cluster_name}} --role-arn {{eks_service_role_arn}} --resources-vpc-config {{subnetIds={{subnet_ids}},securityGroupIds={{security_group_ids}}}}`
|
||||
`aws eks create-cluster --name {{cluster_name}} --role-arn {{eks_service_role_arn}} --resources-vpc-config subnetIds={{subnet_ids}},securityGroupIds={{security_group_ids}}`
|
||||
|
||||
- Update kubeconfig to connect to the EKS Cluster:
|
||||
|
||||
|
||||
41
tldr/cava
Normal file
41
tldr/cava
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# cava
|
||||
|
||||
> Cross-platform audio visualizer.
|
||||
> More information: <https://github.com/karlstav/cava#usage>.
|
||||
|
||||
- Start the visualizer:
|
||||
|
||||
`cava`
|
||||
|
||||
- Use the specified configuration file:
|
||||
|
||||
`cava -p {{path/to/file}}`
|
||||
|
||||
- Increase/Decrease sensitivity:
|
||||
|
||||
`{{<ArrowUp>|<ArrowDown>}}`
|
||||
|
||||
- Increase/Decrease the number of bars:
|
||||
|
||||
`{{<ArrowRight>|<ArrowLeft>}}`
|
||||
|
||||
- Reload the configuration file (this resets the number of bars and sensitivity):
|
||||
|
||||
`<r>`
|
||||
|
||||
- Reload colors from the configuration file:
|
||||
|
||||
`<c>`
|
||||
|
||||
- Cycle the foreground/background color:
|
||||
|
||||
`{{<f>|<b>}}`
|
||||
|
||||
- Quit:
|
||||
|
||||
`<q>`
|
||||
@@ -18,11 +18,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Write to a specific coprocess `stdin`:
|
||||
|
||||
`echo "{{input}}" >&"${{{name}}[1]}"`
|
||||
`echo "{{input}}" >&"${{{name[1]}}}"`
|
||||
|
||||
- Read from a specific coprocess `stdout`:
|
||||
|
||||
`read {{variable}} <&"${{{name}}[0]}"`
|
||||
`read {{variable}} <&"${{{name[0]}}}"`
|
||||
|
||||
- Create a coprocess which repeatedly reads `stdin` and runs some commands on the input:
|
||||
|
||||
|
||||
2
tldr/d8
2
tldr/d8
@@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Evaluate a JavaScript expression:
|
||||
|
||||
`d8 -e "{{code}}`
|
||||
`d8 -e "{{code}}"`
|
||||
|
||||
@@ -23,7 +23,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Force a password prompt before connecting to the database:
|
||||
|
||||
`dropdb {{[-W|--password]}} {{dbname}}}}`
|
||||
`dropdb {{[-W|--password]}} {{dbname}}`
|
||||
|
||||
- Suppress a password prompt before connecting to the database:
|
||||
|
||||
|
||||
2
tldr/for
2
tldr/for
@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Iterate over a given range of numbers:
|
||||
|
||||
`for {{variable}} in {{{from}}..{{to}}..{{step}}}; do {{echo "Loop is executed"}}; done`
|
||||
`for {{variable}} in {{{from..to..step}}}; do {{echo "Loop is executed"}}; done`
|
||||
|
||||
- Iterate over a given list of files:
|
||||
|
||||
|
||||
@@ -36,6 +36,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`git lfs fetch`
|
||||
|
||||
- Checkout all Git LFS objects:
|
||||
- Replace pointer files with actual Git LFS objects:
|
||||
|
||||
`git lfs checkout`
|
||||
|
||||
@@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Print a CSS stylesheet for a theme:
|
||||
|
||||
`highlight {{[-o|--out-format]}} {{html}} --print-style {{[-s|--style]}} {{theme_name}} {{[-S|--syntax]}} {{language}}] --stdout`
|
||||
`highlight {{[-o|--out-format]}} {{html}} --print-style {{[-s|--style]}} {{theme_name}} {{[-S|--syntax]}} {{language}} --stdout`
|
||||
|
||||
@@ -30,4 +30,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Run a benchmark where a single parameter changes for each run:
|
||||
|
||||
`hyperfine {{[-p|--prepare]}} '{{make clean}}' {{[-P|--parameter-scan]}} {{num_threads}} {{1}} {{10}} '{{make {{[-j|--jobs]}} {num_threads}}}'`
|
||||
`hyperfine {{[-p|--prepare]}} '{{make clean}}' {{[-P|--parameter-scan]}} {{num_threads}} {{1}} {{10}} '{{make --jobs {num_threads}}}'`
|
||||
|
||||
@@ -30,7 +30,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Output the value of multiple keys as a new JSON object (assuming the input JSON has the keys `key_name1` and `key_name2`):
|
||||
|
||||
`cat {{file.json}} | jello '{"{{key1}}": _.{{key_name1}}, "{{key_name}}": _.{{key_name2}}}'`
|
||||
`cat {{file.json}} | jello '{{{"key1": _.key_name1, "key2": _.key_name2, ...}}}'`
|
||||
|
||||
- Output the value of a given key to a string (and disable JSON output):
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- To tail multiple containers from multiple pods:
|
||||
|
||||
`kubetail {{my_app}} {{[-c|--container]}} {my_container_1}} {{[-c|--container]}} {my_container_2}}`
|
||||
`kubetail {{my_app}} {{[-c|--container]}} {{my_container_1}} {{[-c|--container]}} {{my_container_2}}`
|
||||
|
||||
- To tail multiple applications at the same time separate them by comma:
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Update settings for a Linode:
|
||||
|
||||
`linode-cli linodes update {{linode_id}} --label {{[new_label}}`
|
||||
`linode-cli linodes update {{linode_id}} --label {{new_label}}`
|
||||
|
||||
- Delete a Linode:
|
||||
|
||||
|
||||
@@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Create a temporary binding:
|
||||
|
||||
`sudo keyd bind "{{pressed_key}} = {{output_key}}`
|
||||
`sudo keyd bind "{{pressed_key}} = {{output_key}}"`
|
||||
|
||||
@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Convert a PDF page to PNG or JPEG format:
|
||||
|
||||
`pstoedit -page {{page_number}} -f magick {{path/to/file.pdf}} {{page.png|page.jpg]}}`
|
||||
`pstoedit -page {{page_number}} -f magick {{path/to/file.pdf}} {{page.png|page.jpg}}`
|
||||
|
||||
- Convert multiple PDF pages to numbered images:
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Capture a photo with different encoding:
|
||||
|
||||
`rpicam-still {{[-e|--encoding]}} {{bmp|png|rgb|yuv420}} {{[-o|--output]}} {{path/to/file.{{bmp|png|rgb|yuv420}}}}`
|
||||
`rpicam-still {{[-e|--encoding]}} {{bmp|png|rgb|yuv420}} {{[-o|--output]}} {{path/to/file.[bmp|png|rgb|yuv420]}}`
|
||||
|
||||
- Capture a raw image:
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Set the type of a partition:
|
||||
|
||||
`sfdisk --part-type {{path/to/device}}} {{partition_number}} {{swap}}`
|
||||
`sfdisk --part-type {{path/to/device}} {{partition_number}} {{swap}}`
|
||||
|
||||
- Delete a partition:
|
||||
|
||||
|
||||
@@ -14,16 +14,16 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Extract a self-extracting binary in the current directory:
|
||||
|
||||
`{{./path/to/binary)}}`
|
||||
`{{./path/to/binary}}`
|
||||
|
||||
- Test a self-extracting binary for errors:
|
||||
|
||||
`{{./path/to/binary)}} -t`
|
||||
`{{./path/to/binary}} -t`
|
||||
|
||||
- Print content of a file in the self-extracting binary without extraction:
|
||||
|
||||
`{{./path/to/binary)}} -c {{path/to/filename}}`
|
||||
`{{./path/to/binary}} -c {{path/to/filename}}`
|
||||
|
||||
- Print comments on Zip archive in the self-extracting binary:
|
||||
|
||||
`{{./path/to/binary)}} -z`
|
||||
`{{./path/to/binary}} -z`
|
||||
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Search for all packages satisfying specific constraints:
|
||||
|
||||
`mamba repoquery search {{sphinx<5}}`
|
||||
`mamba repoquery search "{{sphinx<5}}"`
|
||||
|
||||
- List the dependencies of a package installed in the currently activated environment, in a tree format:
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- A comma-separated list of files to load before processing:
|
||||
|
||||
`phpcbf {{path/to/directory}} --bootstrap {{path/to/file1,path/to/file2,...)}}`
|
||||
`phpcbf {{path/to/directory}} --bootstrap {{path/to/file1,path/to/file2,...}}`
|
||||
|
||||
- Don't recurse into subdirectories:
|
||||
|
||||
|
||||
22
tldr/pulumi-console
Normal file
22
tldr/pulumi-console
Normal file
@@ -0,0 +1,22 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pulumi console
|
||||
|
||||
> Open a stack in the Pulumi Console (cloud or self-hosted).
|
||||
> It gives you instructions to migrate if not available for your backend.
|
||||
> More information: <https://www.pulumi.com/docs/iac/cli/commands/pulumi_console/>.
|
||||
|
||||
- Open the current stack:
|
||||
|
||||
`pulumi console`
|
||||
|
||||
- Open the console for a specific stack:
|
||||
|
||||
`pulumi console {{[-s|--stack]}} {{stack_name}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`pulumi console {{[-h|--help]}}`
|
||||
26
tldr/pulumi-import
Normal file
26
tldr/pulumi-import
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pulumi import
|
||||
|
||||
> Import resources into an existing stack.
|
||||
> Read syntax for your cloud provider: <https://www.pulumi.com/registry/>.
|
||||
> More information: <https://www.pulumi.com/docs/iac/cli/commands/pulumi_import/>.
|
||||
|
||||
- Generate the resource definition with a given name for an existing provider resource:
|
||||
|
||||
`pulumi import {{type_token}} {{name}} {{id}}`
|
||||
|
||||
- Import an existing AWS user as a `pulumi` resource:
|
||||
|
||||
`pulumi import aws:iam/user:User {{my_user_resource}} {{id}}`
|
||||
|
||||
- Import an existing Cloudflare worker:
|
||||
|
||||
`pulumi import cloudflare:index/workersScript:WorkersScript {{my_worker_script}} {{account_id/script_name}}`
|
||||
|
||||
- Import from a JSON file for bulk import operations and output to a file instead of `stdout`:
|
||||
|
||||
`pulumi import --file {{path/to/file.json}} --out {{path/to/file}}`
|
||||
30
tldr/pulumi-plugin
Normal file
30
tldr/pulumi-plugin
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# pulumi plugin
|
||||
|
||||
> Manage language and resource provider plugins manually.
|
||||
> Other commands manage these automatically.
|
||||
> More information: <https://www.pulumi.com/docs/iac/cli/commands/pulumi_plugin/>.
|
||||
|
||||
- List all plugins on the downloaded cache:
|
||||
|
||||
`pulumi plugin ls`
|
||||
|
||||
- List plugins being used by the current project in JSON format:
|
||||
|
||||
`pulumi plugin {{[-p|--project]}} {{[-j|--json]}}`
|
||||
|
||||
- Install a plugin kind (e.g resource) with the latest version or a specific one:
|
||||
|
||||
`pulumi plugin install {{kind}} {{name}} {{version}}`
|
||||
|
||||
- Remove a plugin kind (e.g. resource) and interactively pick a version or provide a specific one:
|
||||
|
||||
`pulumi plugin rm {{kind}} {{name}} {{version}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`pulumi plugin {{[-h|--help]}}`
|
||||
@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Render input file(s) to different formats:
|
||||
|
||||
`quarto render {{path/to/file.{{qmd|rmd|ipynb}}}} --to {{html|pdf|docx}}`
|
||||
`quarto render {{path/to/file.[qmd|rmd|ipynb]}} --to {{html|pdf|docx}}`
|
||||
|
||||
- Render and preview a document or a website:
|
||||
|
||||
|
||||
33
tldr/spotify_player
Normal file
33
tldr/spotify_player
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# spotify_player
|
||||
|
||||
> A TUI Spotify client that implements all features of the official Spotify app.
|
||||
> More information: <https://github.com/aome510/spotify-player#commands>.
|
||||
|
||||
- Start a daemon that plays music in the background:
|
||||
|
||||
`spotify_player {{[-d|--daemon]}}`
|
||||
|
||||
- Start the TUI (controls the daemon if available, otherwise starts its own client):
|
||||
|
||||
`spotify_player`
|
||||
|
||||
- Use the specified theme:
|
||||
|
||||
`spotify_player {{[-t|--theme]}} {{theme_name}}`
|
||||
|
||||
- Use configuration files (`app.toml`, `keymap.toml` and `theme.toml`) in the specified directory:
|
||||
|
||||
`spotify_player {{[-c|--config-folder]}} {{path/to/directory}}`
|
||||
|
||||
- Like the currently playing track:
|
||||
|
||||
`spotify_player like`
|
||||
|
||||
- Display a list of keybindings:
|
||||
|
||||
`<?>`
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# swig
|
||||
|
||||
> Generate bindings between C/C++ code and various high level languages such as JavaScript, Python, C#, and more.
|
||||
> It uses special `.i` or `.swg` files to generate the bindings (C/C++ with SWIG directives, then outputs a C/C++ file that contains all the wrapper code needed to build an extension module.
|
||||
> It uses special `.i` or `.swg` files to generate the bindings (C/C++ with SWIG directives), then outputs a C/C++ file that contains all the wrapper code needed to build an extension module.
|
||||
> More information: <https://www.swig.org>.
|
||||
|
||||
- Generate a binding between C++ and Python:
|
||||
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Interpret JSON list as a table and put objects inside as columns (path/to/file.json: `{"list":[{"age":"26","name":"Tanaka"}]}`):
|
||||
|
||||
`trdsql "SELECT * FROM {{path/to/file.json}}::.list`
|
||||
`trdsql "SELECT * FROM {{path/to/file.json}}::.list"`
|
||||
|
||||
- Manipulate complex SQL query with data from multiple CSV files with first line is header (`-ih`):
|
||||
|
||||
|
||||
@@ -15,4 +15,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Ensure that the Vagrantfile is correctly structured while ignoring provider-specific configuration options:
|
||||
|
||||
`vagrant validate {{[-p|--ignore-provider]}} {{docker|hypervlibvirt|parallels|qemu|virtualbox|vmware_desktop}`
|
||||
`vagrant validate {{[-p|--ignore-provider]}} {{docker|hypervlibvirt|parallels|qemu|virtualbox|vmware_desktop}}`
|
||||
|
||||
@@ -14,15 +14,15 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Run a Linux command without using a shell:
|
||||
|
||||
`wsl --exec {{command}} {{command_arguments}}`
|
||||
`wsl {{[-e|--exec]}} {{command}} {{command_arguments}}`
|
||||
|
||||
- Specify a particular distribution:
|
||||
|
||||
`wsl --distribution {{distribution}} {{shell_command}}`
|
||||
`wsl {{[-d|--distribution]}} {{distribution}} {{shell_command}}`
|
||||
|
||||
- List available distributions:
|
||||
|
||||
`wsl --list`
|
||||
`wsl {{[-l|--list]}}`
|
||||
|
||||
- Export a distribution to a `.tar` file:
|
||||
|
||||
|
||||
33
tldr/zinit
Normal file
33
tldr/zinit
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# zinit
|
||||
|
||||
> Flexible and blazing fast `zsh` plugin manager.
|
||||
> More information: <https://github.com/zdharma-continuum/zinit>.
|
||||
|
||||
- Show all installed plugins:
|
||||
|
||||
`zinit plugins`
|
||||
|
||||
- Go to the directory of a plugin:
|
||||
|
||||
`zinit cd {{repository_owner}}/{{repository_name}}`
|
||||
|
||||
- Fetch the newest version of `zinit` from GitHub:
|
||||
|
||||
`zinit self-update`
|
||||
|
||||
- List status of all installed completions:
|
||||
|
||||
`zinit completions`
|
||||
|
||||
- Install completions for a plugin:
|
||||
|
||||
`zinit creinstall {{repository_owner}}/{{repository_name}}`
|
||||
|
||||
- Delete completion for a plugin:
|
||||
|
||||
`zinit cuninstall {{repository_owner}}/{{repository_name}}`
|
||||
Reference in New Issue
Block a user