mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-12 03:47:38 +00:00
Update cheatsheets
This commit is contained in:
26
tldr/alr
Normal file
26
tldr/alr
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# alr
|
||||
|
||||
> Ada package manager.
|
||||
> Manage Ada toolchains, dependencies, tools and libraries.
|
||||
> More information: <https://alire.ada.dev/>.
|
||||
|
||||
- Create a binary or library project:
|
||||
|
||||
`alr init {{--bin|--lib}} {{project_name}}`
|
||||
|
||||
- Add a dependency to the project:
|
||||
|
||||
`alr add {{crate}}`
|
||||
|
||||
- Run the compiled binary (no need to do `build` before):
|
||||
|
||||
`alr run`
|
||||
|
||||
- Compile the project:
|
||||
|
||||
`alr build {{--release|--development|--validation}}`
|
||||
38
tldr/codex
Normal file
38
tldr/codex
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# codex
|
||||
|
||||
> Natural language code assistant for the terminal, powered by OpenAI.
|
||||
> Reads and edits files in your current directory to fulfill requests.
|
||||
> More information: <https://github.com/openai/codex>.
|
||||
|
||||
- Start an interactive Codex session in the current directory:
|
||||
|
||||
`codex`
|
||||
|
||||
- Run a single Codex command using a prompt:
|
||||
|
||||
`codex "{{your prompt}}"`
|
||||
|
||||
- Run a prompt with automatic approval of all file edits and commands:
|
||||
|
||||
`codex {{[-a|--approval-mode]}} full-auto "{{your prompt}}"`
|
||||
|
||||
- Use a specific provider and model:
|
||||
|
||||
`codex --provider {{provider_name}} {{[-m|--model]}} {{model_name}} "{{your prompt}}"`
|
||||
|
||||
- Load the entire repository as context (experimental):
|
||||
|
||||
`codex --full-context "{{your prompt}}"`
|
||||
|
||||
- Show the resource usage for the current session (run this command inside a session):
|
||||
|
||||
`/cost`
|
||||
|
||||
- Display help:
|
||||
|
||||
`codex --help`
|
||||
34
tldr/exo
Normal file
34
tldr/exo
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# exo
|
||||
|
||||
> Manage the Exoscale services.
|
||||
> Some subcommands such as `exo compute` have their own usage documentation.
|
||||
> More information: <https://community.exoscale.com/tools/command-line-interface/>.
|
||||
|
||||
- Configure the exo command-line:
|
||||
|
||||
`exo config`
|
||||
|
||||
- Generate the exo autocompletion script for a specified shell:
|
||||
|
||||
`exo completion {{zsh}}`
|
||||
|
||||
- List all of the available zones and output them as json:
|
||||
|
||||
`exo zone {{[-O|--output-format]}} {{json}}`
|
||||
|
||||
- Quietly create a Compute instance in a specific zone (disables the non-essential command output):
|
||||
|
||||
`exo compute instance create {{instance_name}} --zone {{zone}} {{[-Q|--quiet]}}`
|
||||
|
||||
- List just the name of all of the buckets in the Organization:
|
||||
|
||||
`exo storage list {{[-O|--output-template]}} '\{\{ .Name \}\}`
|
||||
|
||||
- Display help for a specific sub-command:
|
||||
|
||||
`exo {{iam}} {{[-h|--help]}}`
|
||||
38
tldr/exo-compute
Normal file
38
tldr/exo-compute
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# exo compute
|
||||
|
||||
> Manage Exoscale Compute resources.
|
||||
> Some subcommands such as `instance` have their own documentation.
|
||||
> More information: <https://community.exoscale.com/product/>.
|
||||
|
||||
- Quickly create an Exoscale Compute resource (e.g., instance, Security Group, SKS cluster,...):
|
||||
|
||||
`exo compute {{resource_type}} create {{resource_name}}`
|
||||
|
||||
- List Exoscale Compute instance types:
|
||||
|
||||
`exo compute instance-type list`
|
||||
|
||||
- Register a new SSH key that can be used to access Compute instances:
|
||||
|
||||
`exo compute ssh-key register {{key_name}} {{public_key_file}}`
|
||||
|
||||
- Create a Compute instance with an ssh-key deployed on it:
|
||||
|
||||
`exo compute instance create {{instance_name}} {{ssh_key_name}}`
|
||||
|
||||
- Register a new Compute instance template based on a Snapshot of a Compute instance (useful when you want to quickly create a replica of a Compute instance):
|
||||
|
||||
`exo compute instance template register {{template_name}} --from-snapshot {{snapshot_id}}`
|
||||
|
||||
- Add a new rule to an existing Security Group:
|
||||
|
||||
`exo compute security-group rule add {{security_group_name|id}} --description '{{Allow SSH access}}' --flow {{ingress}} --port {{22}} --network {{0.0.0.0/0}}`
|
||||
|
||||
- Manage the services of an existing Network Load Balancer:
|
||||
|
||||
`exo compute load-balancer service add {{load_balancer_name|id}} {{service_name}} --port {{service_port}}`
|
||||
37
tldr/exo-compute-block-storage
Normal file
37
tldr/exo-compute-block-storage
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# exo compute block-storage
|
||||
|
||||
> Manage the Exoscale Block Storage service.
|
||||
> More information: <https://community.exoscale.com/product/storage/block-storage/>.
|
||||
|
||||
- Create a 20GB Block Storage Volume:
|
||||
|
||||
`exo compute block-storage create {{volume_name}} --size 20 {{[-z|--zone]}} {{zone}}`
|
||||
|
||||
- List Block Storage Volumes:
|
||||
|
||||
`exo compute block-storage list`
|
||||
|
||||
- Attach a Block Storage Volume to a Compute instance:
|
||||
|
||||
`exo compute block-storage attach {{volume_name|id}} {{instance_name|id}} {{[-z|--zone]}} {{zone}}`
|
||||
|
||||
- Forcefully detach a Block Storage Volume (does not require confirmation):
|
||||
|
||||
`exo compute block-storage detach {{volume_name|id}} {{[-z|--zone]}} {{zone}} {{[-f|--force]}}`
|
||||
|
||||
- Create a snapshot of a Block Storage Volume:
|
||||
|
||||
`exo compute block-storage snapshot create {{volume_name|id}} --name {{snapshot_name}} {{[-z|--zone]}} {{zone}}`
|
||||
|
||||
- Create a Block Storage Volume from a snapshot:
|
||||
|
||||
`exo compute block-storage create {{volume_name}} --snapshot {{snapshot_name|id}} {{[-z|--zone]}} {{zone}}`
|
||||
|
||||
- Update an existing Block Storage Volume with a new name and a new volume size of 30GB:
|
||||
|
||||
`exo compute block-storage update {{volume_name|id}} --size 30 --name {{new_name}}`
|
||||
41
tldr/exo-compute-instance
Normal file
41
tldr/exo-compute-instance
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# exo compute instance
|
||||
|
||||
> Manage Exoscale Compute instances.
|
||||
> More information: <https://community.exoscale.com/product/compute/instances/>.
|
||||
|
||||
- Create a Debian based Compute instance with a disk size of 10GB:
|
||||
|
||||
`exo compute instance create --disk-size 10 {{instance_name}} {{[-z|--zone]}} {{zone}} --template '{{Linux Debian 12 (Bookworm) 64-bit}}'`
|
||||
|
||||
- Log into a Compute instance via SSH:
|
||||
|
||||
`exo compute instance ssh {{instance_name|id}}`
|
||||
|
||||
- List all of the Compute instances:
|
||||
|
||||
`exo compute instance list`
|
||||
|
||||
- Add an instance to a Security Group:
|
||||
|
||||
`exo compute instance security-group add {{instance_name|id}} {{security_group_name|id}}`
|
||||
|
||||
- Scale the size of a Compute instance:
|
||||
|
||||
`exo compute instance scale {{instance_name|id}} {{instance_type}}`
|
||||
|
||||
- Create a snapshot of a Compute instance:
|
||||
|
||||
`exo compute instance snapshot create {{instance_name|id}}`
|
||||
|
||||
- Revert a Compute instance to a snapshot (the data written after the snapshot has been created will be lost):
|
||||
|
||||
`exo compute instance snapshot revert {{snapshot_id}} {{instance_name|id}}`
|
||||
|
||||
- Resize the disk size of a Compute instance to 20GB:
|
||||
|
||||
`exo compute instance resize-disk {{instance_name|id}} 20`
|
||||
41
tldr/exo-compute-sks
Normal file
41
tldr/exo-compute-sks
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# exo compute sks
|
||||
|
||||
> Manage the Exoscale Scalable Kubernetes Service (SKS).
|
||||
> More information: <https://community.exoscale.com/product/compute/containers/>.
|
||||
|
||||
- List the supported SKS cluster versions:
|
||||
|
||||
`exo compute sks versions`
|
||||
|
||||
- Create a new SKS cluster:
|
||||
|
||||
`exo compute sks create {{cluster_name}} {{[-z|--zone]}} {{zone}}`
|
||||
|
||||
- List all SKS clusters:
|
||||
|
||||
`exo compute sks list`
|
||||
|
||||
- Generate a Kubernetes kubeconfig file for an SKS cluster that expires in 1800 seconds:
|
||||
|
||||
`exo compute sks kubeconfig {{cluster_name|id}} {{user}} --ttl 1800 {{[-z|--zone]}} {{zone}}`
|
||||
|
||||
- Create and add a Nodepool containing 3 nodes to an SKS cluster:
|
||||
|
||||
`exo compute sks nodepool add {{cluster_name|id}} {{nodepool_name}} --size 3 {{[-z|--zone]}} {{zone}}`
|
||||
|
||||
- Remove a Nodepool from an SKS cluster:
|
||||
|
||||
`exo compute sks nodepool delete {{cluster_name|id}} {{nodepool_name|id}}`
|
||||
|
||||
- Evict a Node from a Nodepool in an SKS cluster:
|
||||
|
||||
`exo compute sks nodepool evict {{cluster_name|id}} {{nodepool_name|id}} {{node_name|id}}`
|
||||
|
||||
- Enable the Exoscale CSI driver for an existing SKS cluster:
|
||||
|
||||
`exo compute sks update {{cluster_name|id}} --enable-csi-addon {{[-z|--zone]}} {{zone}}`
|
||||
33
tldr/exo-dbaas
Normal file
33
tldr/exo-dbaas
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# exo dbaas
|
||||
|
||||
> Manage Exoscale DBaaS.
|
||||
> More information: <https://community.exoscale.com/product/dbaas/>.
|
||||
|
||||
- List available Database Service types:
|
||||
|
||||
`exo dbaas type list`
|
||||
|
||||
- List available plans for a Database Service type:
|
||||
|
||||
`exo dbaas type show {{database_service_type}} --plans`
|
||||
|
||||
- Create a new Database Service (an IP filter must be specified in order to access the service):
|
||||
|
||||
`exo dbaas create {{database_service_type}} {{database_service_type_plan}} {{database_service_name}} --{{database_service_type}}-ip-filter {{1.2.3.4/32}}`
|
||||
|
||||
- Show the connection URI for a Database Service:
|
||||
|
||||
`exo dbaas show {{database_service_name}} --uri`
|
||||
|
||||
- Set a specified maintenance time and day of the week for a Database Service:
|
||||
|
||||
`exo dbaas update {{database_service_name}} --maintenance-dow {{day_of_the_week}} --maintenance-time {{HH:MM:SS}}`
|
||||
|
||||
- Get help for a specific Database Service type:
|
||||
|
||||
`exo dbaas {{subcommand}} --help-{{database_service_type}}`
|
||||
29
tldr/exo-iam
Normal file
29
tldr/exo-iam
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# exo iam
|
||||
|
||||
> Manage the Exoscale IAM service.
|
||||
> More information: <https://community.exoscale.com/product/iam/>.
|
||||
|
||||
- List all of the IAM roles:
|
||||
|
||||
`exo iam role list`
|
||||
|
||||
- Create a new API key:
|
||||
|
||||
`exo iam api-key create {{api_key_name}} {{iam_role_name}}`
|
||||
|
||||
- Create a new IAM role:
|
||||
|
||||
`cat {{/path/to/policy.json}} | exo iam role create {{iam_role_name}} --editable --policy -`
|
||||
|
||||
- Show the policy of an existing IAM role:
|
||||
|
||||
`exo iam role show {{iam_role_name}} --policy {{[-O|--output-format]}} {{json}} | jq .`
|
||||
|
||||
- Update the default Organization policy (the default Organization policy will be applied to all of the API keys within the Organization):
|
||||
|
||||
`cat {{/path/to/policy.json}} | exo iam org-policy update -`
|
||||
29
tldr/exo-storage
Normal file
29
tldr/exo-storage
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# exo storage
|
||||
|
||||
> Manage the Exoscale Simple Object Storage (SOS) service.
|
||||
> More information: <https://community.exoscale.com/product/storage/object-storage/>.
|
||||
|
||||
- Create a new SOS bucket:
|
||||
|
||||
`exo storage mb {{bucket_name}}`
|
||||
|
||||
- Upload a file to a bucket:
|
||||
|
||||
`exo storage put {{file_path}} {{bucket_name}}/{{prefix/}}`
|
||||
|
||||
- List the objects within a bucket:
|
||||
|
||||
`exo storage ls {{bucket_name}}`
|
||||
|
||||
- Simulate the download of an object from a bucket:
|
||||
|
||||
`exo storage get {{bucket_name}}/{{object_key}} {{local_path}} --dry-run`
|
||||
|
||||
- Manage the metadata of an object:
|
||||
|
||||
`exo storage metadata add {{bucket_name}}/{{object_key}} {{key=value}}`
|
||||
@@ -19,7 +19,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Save the output to a file:
|
||||
|
||||
`GetUserSPNs.py {{domain}}/{{username}}:{{password}} -dc-ip {{domain_controller_ip}} -outputfile {{output_file}}`
|
||||
`GetUserSPNs.py {{domain}}/{{username}}:{{password}} -dc-ip {{domain_controller_ip}} -outputfile {{path/to/output_file}}`
|
||||
|
||||
- Request only TGS tickets:
|
||||
|
||||
|
||||
@@ -36,6 +36,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`systemctl list-units {{[-t|--type]}} {{service|socket|automount}} --state {{failed|running}}`
|
||||
|
||||
- Show the contents & absolute path of a unit file:
|
||||
- Show the contents & absolute path of a unit file or edit it:
|
||||
|
||||
`systemctl cat {{unit}}`
|
||||
`systemctl {{cat|edit}} {{unit}}`
|
||||
|
||||
25
tldr/nicotine
Normal file
25
tldr/nicotine
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# nicotine
|
||||
|
||||
> Graphical client for the Soulseek peer-to-peer network.
|
||||
> More information: <https://manned.org/nicotine>.
|
||||
|
||||
- Start Nicotine+:
|
||||
|
||||
`nicotine`
|
||||
|
||||
- Start Nicotine+ in headless ([n]) mode:
|
||||
|
||||
`nicotine {{[-n|--headless]}}`
|
||||
|
||||
- Rescan shared files:
|
||||
|
||||
`nicotine {{[-r|--rescan]}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`nicotine {{[-h|--help]}}`
|
||||
20
tldr/php
20
tldr/php
@@ -12,30 +12,30 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`php {{path/to/file}}`
|
||||
|
||||
- Check syntax on (i.e. lint) a PHP script:
|
||||
- Check syntax on (i.e. [l]int) a PHP script:
|
||||
|
||||
`php -l {{path/to/file}}`
|
||||
`php {{[-l|--syntax-check]}} {{path/to/file}}`
|
||||
|
||||
- Run PHP interactively:
|
||||
- Run PHP inter[a]ctively:
|
||||
|
||||
`php -a`
|
||||
`php {{[-a|--interactive]}}`
|
||||
|
||||
- Run PHP code (Notes: Don't use <? ?> tags; escape double quotes with backslash):
|
||||
|
||||
`php -r "{{code}}"`
|
||||
`php {{[-r|--run]}} "{{code}}"`
|
||||
|
||||
- Start a PHP built-in web server in the current directory:
|
||||
- Start a PHP built-in web [S]erver in the current directory:
|
||||
|
||||
`php -S {{host:port}}`
|
||||
`php {{[-S|--server]}} {{host:port}}`
|
||||
|
||||
- List installed PHP extensions:
|
||||
|
||||
`php -m`
|
||||
`php {{[-m|--modules]}}`
|
||||
|
||||
- Display information about the current PHP configuration:
|
||||
|
||||
`php -i`
|
||||
`php {{[-i|--info]}}`
|
||||
|
||||
- Display information about a specific function:
|
||||
|
||||
`php --rf {{function_name}}`
|
||||
`php {{[--rf|--rfunction]}} {{function_name}}`
|
||||
|
||||
@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# sniff.py
|
||||
|
||||
> Capture and display network packets using the pcapy library.
|
||||
> Capture and display network packets using the `pcapy` library.
|
||||
> Part of the Impacket suite.
|
||||
> More information: <https://github.com/fortra/impacket>.
|
||||
|
||||
@@ -15,4 +15,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Capture packets and save output to a file while displaying it on the terminal:
|
||||
|
||||
`sudo sniff.py | sudo tee {{output_file}}`
|
||||
`sudo sniff.py | sudo tee {{path/to/output_file}}`
|
||||
|
||||
@@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Capture packets for specific protocols (e.g., ICMP, TCP):
|
||||
|
||||
`sniffer.py {{protocol1}} {{protocol2}}`
|
||||
`sniffer.py {{protocol1 protocol2 ...}}`
|
||||
|
||||
- Capture packets for specific protocols (e.g., TCP):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user