Update cheatsheets

This commit is contained in:
ivuorinen
2025-07-24 00:22:02 +00:00
parent faccb95d5c
commit e6afdf72af
27 changed files with 113 additions and 50 deletions

View File

@@ -14,4 +14,4 @@ source: https://github.com/tldr-pages/tldr.git
- Print what would be removed, but don't actually remove anything: - Print what would be removed, but don't actually remove anything:
`brew autoremove --dry-run` `brew autoremove {{[-n|--dry-run]}}`

View File

@@ -14,8 +14,8 @@ source: https://github.com/tldr-pages/tldr.git
- Build and install a formula from source (dependencies will still be installed from bottles): - Build and install a formula from source (dependencies will still be installed from bottles):
`brew install --build-from-source {{formula}}` `brew install {{[-s|--build-from-source]}} {{formula}}`
- Download the manifest, print what would be installed but don't actually install anything: - Download the manifest, print what would be installed but don't actually install anything:
`brew install --dry-run {{formula|cask}}` `brew install {{[-n|--dry-run]}} {{formula|cask}}`

View File

@@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git
- Print what would be upgraded, but don't actually upgrade anything: - Print what would be upgraded, but don't actually upgrade anything:
`brew upgrade --dry-run` `brew upgrade {{[-n|--dry-run]}}`

View File

@@ -16,7 +16,7 @@ source: https://github.com/tldr-pages/tldr.git
`cargo bench --no-fail-fast` `cargo bench --no-fail-fast`
- Compile, but dont run benchmarks: - Compile, but don't run benchmarks:
`cargo bench --no-run` `cargo bench --no-run`
@@ -36,6 +36,6 @@ source: https://github.com/tldr-pages/tldr.git
`cargo bench --bins` `cargo bench --bins`
- Benchmark the packages library: - Benchmark the package's library:
`cargo bench --lib` `cargo bench --lib`

View File

@@ -20,7 +20,7 @@ source: https://github.com/tldr-pages/tldr.git
`cargo fix --edition` `cargo fix --edition`
- Fix the packages library: - Fix the package's library:
`cargo fix --lib` `cargo fix --lib`

View File

@@ -14,28 +14,28 @@ source: https://github.com/tldr-pages/tldr.git
- Create a domain: - Create a domain:
`cli53 create {{mydomain.com}} --comment "{{comment}}"` `cli53 create {{example.com}} --comment "{{comment}}"`
- Export a bind zone file to `stdout`: - Export a bind zone file to `stdout`:
`cli53 export {{mydomain.com}}` `cli53 export {{example.com}}`
- Create a `www` subdomain pointing to a relative record in the same zone: - Create a `www` subdomain pointing to a relative record in the same zone:
`cli53 {{rc|rrcreate}} {{mydomain.com}} {{'www 300 CNAME lb'}}` `cli53 {{[rc|rrcreate]}} {{example.com}} {{'www 300 CNAME lb'}}`
- Create a `www` subdomain pointing to an external address (must end with a dot): - Create a `www` subdomain pointing to an external address (must end with a dot):
`cli53 {{rc|rrcreate}} {{mydomain.com}} {{'www 300 CNAME lb.externalhost.com.'}}` `cli53 {{[rc|rrcreate]}} {{example.com}} {{'www 300 CNAME lb.example.com.'}}`
- Create a `www` subdomain pointing to an IP address: - Create a `www` subdomain pointing to an IP address:
`cli53 {{rc|rrcreate}} {{mydomain.com}} {{'www 300 A 150.130.110.1'}}` `cli53 {{[rc|rrcreate]}} {{example.com}} {{'www 300 A 150.130.110.1'}}`
- Replace a `www` subdomain pointing to a different IP: - Replace a `www` subdomain pointing to a different IP:
`cli53 {{rc|rrcreate}} --replace {{'www 300 A 150.130.110.2'}}` `cli53 {{[rc|rrcreate]}} --replace {{'www 300 A 150.130.110.2'}}`
- Delete a record A: - Delete a record A:
`cli53 {{rd|rrdelete}} {{mydomain.com}} {{www}} {{A}}` `cli53 {{[rd|rrdelete]}} {{example.com}} {{www}} {{A}}`

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
--- ---
# django-admin # django-admin
> Djangos utility for administrative tasks. > Django's utility for administrative tasks.
> More information: <https://docs.djangoproject.com/en/stable/ref/django-admin/>. > More information: <https://docs.djangoproject.com/en/stable/ref/django-admin/>.
- Create a new Django project: - Create a new Django project:

26
tldr/dmypy Normal file
View File

@@ -0,0 +1,26 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# dmypy
> Type check Python code, running `mypy` as a daemon for better speed.
> See also: `mypy` for more options to use with check and run.
> More information: <https://mypy.readthedocs.io/en/stable/mypy_daemon.html>.
- Type check a file, and start the daemon if it is not running:
`dmypy check -- {{path/to/file.py}}`
- Start the daemon:
`dmypy start`
- Type check a file (requires the daemon to be running):
`dmypy run -- {{path/to/file.py}}`
- Stop the daemon:
`dmypy stop`

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
--- ---
# docker commit # docker commit
> Create a new image from a containers changes. > Create a new image from a container's changes.
> More information: <https://docs.docker.com/reference/cli/docker/container/commit/>. > More information: <https://docs.docker.com/reference/cli/docker/container/commit/>.
- Create an image from a specific container: - Create an image from a specific container:

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
--- ---
# doctl databases sql-mode # doctl databases sql-mode
> View and configure a MySQL database clusters global SQL modes. > View and configure a MySQL database cluster's global SQL modes.
> More information: <https://docs.digitalocean.com/reference/doctl/reference/databases/sql-mode/>. > More information: <https://docs.digitalocean.com/reference/doctl/reference/databases/sql-mode/>.
- Run a `doctl databases sql-mode` command with an access token: - Run a `doctl databases sql-mode` command with an access token:

37
tldr/gemini Normal file
View File

@@ -0,0 +1,37 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# gemini
> Launch an interactive prompt with Gemini AI.
> More information: <https://github.com/google-gemini/gemini-cli>.
- Start a REPL session to chat interactively:
`gemini`
- Send the output of another command to Gemini and exit immediately:
`{{echo "Summarize the history of Rome"}} | gemini {{[-p|--prompt]}}`
- Override the default model (default: gemini-2.5-pro):
`gemini {{[-m|--model]}} {{gemini-2.5-flash}}`
- Run inside a sandbox container:
`gemini {{[-s|--sandbox]}}`
- Execute a prompt then stay in interactive mode:
`gemini {{[-i|--prompt-interactive]}} "{{Give me an example of recursion in Python}}"`
- Include all files in context:
`gemini {{[-a|--all-files]}}`
- Show memory usage in status bar:
`gemini --show-memory-usage`

View File

@@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git
> Build a tree object using `ls-tree` formatted text. > Build a tree object using `ls-tree` formatted text.
> More information: <https://git-scm.com/docs/git-mktree>. > More information: <https://git-scm.com/docs/git-mktree>.
- Build a tree object and verify that each tree entrys hash identifies an existing object: - Build a tree object and verify that each tree entry's hash identifies an existing object:
`git mktree` `git mktree`

View File

@@ -16,6 +16,6 @@ source: https://github.com/tldr-pages/tldr.git
`git replace {{[-d|--delete]}} {{object}}` `git replace {{[-d|--delete]}} {{object}}`
- Edit an objects content interactively: - Edit an object's content interactively:
`git replace --edit {{object}}` `git replace --edit {{object}}`

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
--- ---
# home-manager # home-manager
> Manage a per-user environment using Nix, allowing declarative configuration of the users home. > Manage a per-user environment using Nix, allowing declarative configuration of the user's home.
> More information: <https://github.com/nix-community/home-manager>. > More information: <https://github.com/nix-community/home-manager>.
- Build the configuration defined in `~/.config/nixpkgs/home.nix` without applying it: - Build the configuration defined in `~/.config/nixpkgs/home.nix` without applying it:

View File

@@ -20,7 +20,7 @@ source: https://github.com/tldr-pages/tldr.git
`ipcs -b` `ipcs -b`
- Show [c]reators user name and group name for all IPC facilities: - Show [c]reator's user name and group name for all IPC facilities:
`ipcs -c` `ipcs -c`

View File

@@ -14,8 +14,8 @@ source: https://github.com/tldr-pages/tldr.git
- Play the first 10 seconds of a specific file at 2500 Hz: - Play the first 10 seconds of a specific file at 2500 Hz:
`aplay --duration={{10}} --rate={{2500}} {{path/to/file}}` `aplay {{[-d|--duration]}} {{10}} {{[-r|--rate]}} {{2500}} {{path/to/file}}`
- Play the raw file as a 22050 Hz, mono, 8-bit, Mu-Law `.au` file: - Play the raw file as a 22050 Hz, mono, 8-bit, Mu-Law `.au` file:
`aplay --channels={{1}} --file-type {{raw}} --rate={{22050}} --format={{mu_law}} {{path/to/file}}` `aplay {{[-c|--channels]}} {{1}} {{[-t|--file-type]}} {{raw}} {{[-r|--rate]}} {{22050}} {{[-f|--format]}} {{mu_law}} {{path/to/file}}`

View File

@@ -6,11 +6,11 @@ source: https://github.com/tldr-pages/tldr.git
# checkinstall # checkinstall
> Track the local installation of a software package, and produce a binary package which can be used with a system's native package manager. > Track the local installation of a software package, and produce a binary package which can be used with a system's native package manager.
> More information: <https://checkinstall.izto.org>. > More information: <https://checkinstall.izto.org/docs.php>.
- Create and install a package with default settings: - Create and install a package with default settings:
`sudo checkinstall --default` `sudo checkinstall {{[-y|--default]}}`
- Create a package but don't install it: - Create a package but don't install it:

View File

@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
- List all video devices: - List all video devices:
`v4l2-ctl --list-devices` `v4l2-ctl {{[-A|--list-devices]}}`
- List supported video formats and resolutions of default video device `/dev/video0`: - List supported video formats and resolutions of default video device `/dev/video0`:

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
--- ---
# wireplumber # wireplumber
> A modular session/policy manager for PipeWire and a GObject-based high-level library that wraps PipeWires API. > A modular session/policy manager for PipeWire and a GObject-based high-level library that wraps PipeWire's API.
> See also: `wpctl`, `pipewire`. > See also: `wpctl`, `pipewire`.
> More information: <https://pipewire.pages.freedesktop.org/wireplumber/>. > More information: <https://pipewire.pages.freedesktop.org/wireplumber/>.

View File

@@ -14,19 +14,19 @@ source: https://github.com/tldr-pages/tldr.git
- Send a WoL packet to a device in another subnet based on its IP: - Send a WoL packet to a device in another subnet based on its IP:
`wol --ipaddr={{ip_address}} {{mac_address}}` `wol {{[-i|--ipaddr]}} {{ip_address}} {{mac_address}}`
- Send a WoL packet to a device in another subnet based on its hostname: - Send a WoL packet to a device in another subnet based on its hostname:
`wol --host={{hostname}} {{mac_address}}` `wol {{[-h|--host]}} {{hostname}} {{mac_address}}`
- Send a WoL packet to a specific port on a host: - Send a WoL packet to a specific port on a host:
`wol --port={{port_number}} {{mac_address}}` `wol {{[-p|--port]}} {{port_number}} {{mac_address}}`
- Read hardware addresses, IP addresses/hostnames, optional ports and SecureON passwords from a file: - Read hardware addresses, IP addresses/hostnames, optional ports and SecureON passwords from a file:
`wol --file={{path/to/file}}` `wol {{[-f|--file]]} {{path/to/file}}`
- Turn on verbose output: - Turn on verbose output:

View File

@@ -9,7 +9,7 @@ source: https://github.com/tldr-pages/tldr.git
> Reports vulnerabilities and suggests remediation. > Reports vulnerabilities and suggests remediation.
> More information: <https://docs.npmjs.com/cli/npm-audit>. > More information: <https://docs.npmjs.com/cli/npm-audit>.
- Scan the projects dependencies for known vulnerabilities: - Scan the project's dependencies for known vulnerabilities:
`npm audit` `npm audit`

View File

@@ -22,20 +22,20 @@ source: https://github.com/tldr-pages/tldr.git
- Run HTTP [p]rotocol [t]ype templates of high and critical severity, [e]xporting results to [m]arkdown files inside a specific directory: - Run HTTP [p]rotocol [t]ype templates of high and critical severity, [e]xporting results to [m]arkdown files inside a specific directory:
`nuclei {{[-s|-severity]}} high,critical {{[-pt|-type]}} http {{[-u|-target]}} {{http://scanme.sh}} {{[-me|-markdown-export]}} {{markdown_directory}}` `nuclei {{[-s|-severity]}} high,critical {{[-pt|-type]}} http {{[-u|-target]}} {{http://example.com}} {{[-me|-markdown-export]}} {{markdown_directory}}`
- Run all templates using a different [r]ate [l]imit and maximum [b]ulk [s]ize with silent output (only showing the findings): - Run all templates using a different [r]ate [l]imit and maximum [b]ulk [s]ize with silent output (only showing the findings):
`nuclei {{[-rl|-rate-limit]}} {{150}} {{[-bs|-bulk-size]}} {{25}} {{[-c|-concurrency]}} {{25}} -silent {{[-u|-target]}} {{http://scanme.sh}}` `nuclei {{[-rl|-rate-limit]}} {{150}} {{[-bs|-bulk-size]}} {{25}} {{[-c|-concurrency]}} {{25}} -silent {{[-u|-target]}} {{http://example.com}}`
- Run the WordPress [w]orkflow against a WordPress site: - Run the WordPress [w]orkflow against a WordPress site:
`nuclei {{[-w|-workflows]}} {{path/to/nuclei-templates/workflows/wordpress-workflow.yaml}} {{[-u|-target]}} {{https://sample.wordpress.site}}` `nuclei {{[-w|-workflows]}} {{path/to/nuclei-templates/workflows/wordpress-workflow.yaml}} {{[-u|-target]}} {{https://example.com}}`
- Run one or more specific [t]emplates or directory with [t]emplates with [v]erbose output in `stderr` and [o]utput detected issues/vulnerabilities to a file: - Run one or more specific [t]emplates or directory with [t]emplates with [v]erbose output in `stderr` and [o]utput detected issues/vulnerabilities to a file:
`nuclei {{[-t|-templates]}} {{path/to/nuclei-templates/http}} {{[-u|-target]}} {{http://scanme.sh}} {{[-v|-verbose]}} {{[-o|-output]}} {{results}}` `nuclei {{[-t|-templates]}} {{path/to/nuclei-templates/http}} {{[-u|-target]}} {{http://example.com}} {{[-v|-verbose]}} {{[-o|-output]}} {{results}}`
- Run scan based on one or more [t]emplate [c]onditions: - Run scan based on one or more [t]emplate [c]onditions:
`nuclei {{[-tc|-template-condition]}} "{{contains(tags, 'xss') && contains(tags, 'cve')}}" {{[-u|-target]}} {{https://vulnerable.website}}` `nuclei {{[-tc|-template-condition]}} "{{contains(tags, 'xss') && contains(tags, 'cve')}}" {{[-u|-target]}} {{https://example.com}}`

View File

@@ -10,11 +10,11 @@ source: https://github.com/tldr-pages/tldr.git
- Do a dry-run renaming a directory of PNGs with a literal string replacement: - Do a dry-run renaming a directory of PNGs with a literal string replacement:
`repren --dry-run --rename --literal --from '{{find_string}}' --to '{{replacement_string}}' {{*.png}}` `repren {{[-n|--dry-run]}} --rename --literal --from '{{find_string}}' --to '{{replacement_string}}' {{*.png}}`
- Do a dry-run renaming a directory of JPEGs with a regular expression: - Do a dry-run renaming a directory of JPEGs with a regular expression:
`repren --rename --dry-run --from '{{regular_expression}}' --to '{{replacement_string}}' {{*.jpg}} {{*.jpeg}}` `repren --rename {{[-n|--dry-run]}} --from '{{regular_expression}}' --to '{{replacement_string}}' {{*.jpg}} {{*.jpeg}}`
- Do a find-and-replace on the contents of a directory of CSV files: - Do a find-and-replace on the contents of a directory of CSV files:
@@ -22,8 +22,8 @@ source: https://github.com/tldr-pages/tldr.git
- Do both a find-and-replace and a rename operation at the same time, using a pattern file: - Do both a find-and-replace and a rename operation at the same time, using a pattern file:
`repren --patterns {{path/to/patfile.ext}} --full {{*.txt}}` `repren {{[-p|--patterns]}} {{path/to/patfile.ext}} --full {{*.txt}}`
- Do a case-insensitive rename: - Do a case-insensitive rename:
`repren --rename --insensitive --patterns {{path/to/patfile.ext}} *` `repren --rename {{[-i|--insensitive]}} {{[-p|--patterns]}} {{path/to/patfile.ext}} *`

View File

@@ -17,7 +17,7 @@ source: https://github.com/tldr-pages/tldr.git
`secretsdump.py -hashes {{LM_Hash}}:{{NT_Hash}} {{domain}}/{{username}}@{{target}}` `secretsdump.py -hashes {{LM_Hash}}:{{NT_Hash}} {{domain}}/{{username}}@{{target}}`
- Dump credentials from Active Directorys NTDS.dit file: - Dump credentials from Active Directory's NTDS.dit file:
`secretsdump.py -just-dc {{domain}}/{{username}}:{{password}}@{{target}}` `secretsdump.py -just-dc {{domain}}/{{username}}:{{password}}@{{target}}`

View File

@@ -16,24 +16,24 @@ source: https://github.com/tldr-pages/tldr.git
- Run a speed test and specify the unit of the output: - Run a speed test and specify the unit of the output:
`speedtest --unit={{auto-decimal-bits|auto-decimal-bytes|auto-binary-bits|auto-binary-bytes}}` `speedtest {{[-u|--unit]}} {{auto-decimal-bits|auto-decimal-bytes|auto-binary-bits|auto-binary-bytes}}`
- Run a speed test and specify the output format: - Run a speed test and specify the output format:
`speedtest --format={{human-readable|csv|tsv|json|jsonl|json-pretty}}` `speedtest {{[-f|--format]}} {{human-readable|csv|tsv|json|jsonl|json-pretty}}`
- Run a speed test and specify the number of decimal points to use (0 to 8, defaults to 2): - Run a speed test and specify the number of decimal points to use (0 to 8, defaults to 2):
`speedtest --precision={{precision}}` `speedtest {{[-P|--precision]}} {{precision}}`
- Run a speed test and print its progress (only available for output format `human-readable` and `json`): - Run a speed test and print its progress (only available for output format `human-readable` and `json`):
`speedtest --progress={{yes|no}}` `speedtest {{[-p|--progress]}} {{yes|no}}`
- List all `speedtest.net` servers, sorted by distance: - List all `speedtest.net` servers, sorted by distance:
`speedtest --servers` `speedtest {{[-L|--servers]}}`
- Run a speed test to a specific `speedtest.net` server: - Run a speed test to a specific `speedtest.net` server:
`speedtest --server-id={{server_id}}` `speedtest {{[-s|--server-id]}} {{server_id}}`

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
--- ---
# unlzma # unlzma
> This command is an alias of `xz --format=lzma --decompress`. > This command is an alias of `xz --format lzma --decompress`.
- View documentation for the original command: - View documentation for the original command:

View File

@@ -20,7 +20,7 @@ source: https://github.com/tldr-pages/tldr.git
`zgrep {{[-c|--count]}} {{pattern}} {{path/to/compressed/file}}` `zgrep {{[-c|--count]}} {{pattern}} {{path/to/compressed/file}}`
- Display the lines which dont have the pattern present (Invert the search function): - Display the lines which don't have the pattern present (Invert the search function):
`zgrep {{[-v|--invert-match]}} {{pattern}} {{path/to/compressed/file}}` `zgrep {{[-v|--invert-match]}} {{pattern}} {{path/to/compressed/file}}`