Update cheatsheets

This commit is contained in:
ivuorinen
2025-05-11 00:21:25 +00:00
parent c39b4c5f19
commit 3bbcd70636
19 changed files with 93 additions and 39 deletions

View File

@@ -10,20 +10,20 @@ source: https://github.com/tldr-pages/tldr.git
- Display information about a package: - Display information about a package:
`dpkg-deb --info {{path/to/file.deb}}` `dpkg-deb {{[-I|--info]}} {{path/to/file.deb}}`
- Display the package's name and version on one line: - Display the package's name and version on one line:
`dpkg-deb --show {{path/to/file.deb}}` `dpkg-deb {{[-W|--show]}} {{path/to/file.deb}}`
- List the package's contents: - List the package's contents:
`dpkg-deb --contents {{path/to/file.deb}}` `dpkg-deb {{[-c|--contents]}} {{path/to/file.deb}}`
- Extract package's contents into a directory: - Extract package's contents into a directory:
`dpkg-deb --extract {{path/to/file.deb}} {{path/to/directory}}` `dpkg-deb {{[-x|--extract]}} {{path/to/file.deb}} {{path/to/directory}}`
- Create a package from a specified directory: - Create a package from a specified directory:
`dpkg-deb --build {{path/to/directory}}` `dpkg-deb {{[-b|--build]}} {{path/to/directory}}`

View File

@@ -10,20 +10,20 @@ source: https://github.com/tldr-pages/tldr.git
- List all installed packages: - List all installed packages:
`dpkg-query --list` `dpkg-query {{[-l|--list]}}`
- List installed packages matching a pattern: - List installed packages matching a pattern:
`dpkg-query --list '{{libc6*}}'` `dpkg-query {{[-l|--list]}} '{{libc6*}}'`
- List all files installed by a package: - List all files installed by a package:
`dpkg-query --listfiles {{libc6}}` `dpkg-query {{[-L|--listfiles]}} {{libc6}}`
- Show information about a package: - Show information about a package:
`dpkg-query --status {{libc6}}` `dpkg-query {{[-s|--status]}} {{libc6}}`
- Search for packages that own files matching a pattern: - Search for packages that own files matching a pattern:
`dpkg-query --search {{/etc/ld.so.conf.d}}` `dpkg-query {{[-S|--search]}} {{/etc/ld.so.conf.d}}`

View File

@@ -18,8 +18,8 @@ source: https://github.com/tldr-pages/tldr.git
- List all disks and storage controllers in tabular format: - List all disks and storage controllers in tabular format:
`sudo lshw -class disk -class storage -short` `sudo lshw {{[-c|-class]}} disk -class storage -short`
- Save all network interfaces to an HTML file: - Save all network interfaces to an HTML/XML/JSON file:
`sudo lshw -class network -html > {{interfaces.html}}` `sudo lshw {{[-c|-class]}} network -{{html|xml|json}} > interfaces{{.html|.xml|.json}}`

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# rofi # rofi
> An application launcher and window switcher. > An application launcher and window switcher.
> More information: <https://github.com/davatorium/rofi>. > More information: <https://github.com/davatorium/rofi#manpage>.
- Show the list of apps: - Show the list of apps:

View File

@@ -6,18 +6,18 @@ source: https://github.com/tldr-pages/tldr.git
# wofi # wofi
> An application launcher for wlroots-based Wayland compositors, similar to `rofi` and `dmenu`. > An application launcher for wlroots-based Wayland compositors, similar to `rofi` and `dmenu`.
> More information: <https://hg.sr.ht/~scoopta/wofi>. > More information: <https://manned.org/wofi>.
- Show the list of apps: - Show the list of apps:
`wofi --show drun` `wofi {{[-S|--show]}} drun`
- Show the list of all commands: - Show the list of all commands:
`wofi --show run` `wofi {{[-S|--show]}} run`
- Pipe a list of items to `stdin` and print the selected item to `stdout`: - Pipe a list of items to `stdin` and print the selected item to `stdout`:
`printf "{{Choice1 `printf "{{Choice1
Choice2 Choice2
Choice3}}" | wofi --dmenu` Choice3}}" | wofi {{[-d|--dmenu]}}`

View File

@@ -14,12 +14,12 @@ source: https://github.com/tldr-pages/tldr.git
- Print information about the Pulumi environment in JSON format: - Print information about the Pulumi environment in JSON format:
`pulumi about --json` `pulumi about {{[-j|--json]}}`
- Print information about the Pulumi environment of a specific stack: - Print information about the Pulumi environment of a specific stack:
`pulumi about --stack {{stack_name}}` `pulumi about {{[-s|--stack]}} {{stack_name}}`
- Display help: - Display help:
`pulumi about --help` `pulumi about {{[-h|--help]}}`

View File

@@ -14,8 +14,8 @@ source: https://github.com/tldr-pages/tldr.git
- Skip confirmation prompts, and proceed with cancellation anyway: - Skip confirmation prompts, and proceed with cancellation anyway:
`pulumi cancel --yes` `pulumi cancel {{[-y|--yes]}}`
- Display help: - Display help:
`pulumi cancel --help` `pulumi cancel {{[-h|--help]}}`

View File

@@ -10,11 +10,11 @@ source: https://github.com/tldr-pages/tldr.git
- View current configuration in JSON format: - View current configuration in JSON format:
`pulumi config --json` `pulumi config {{[-j|--json]}}`
- View configuration for a specified stack: - View configuration for a specified stack:
`pulumi config --stack {{stack_name}}` `pulumi config {{[-s|--stack]}} {{stack_name}}`
- Get the value of a configuration key: - Get the value of a configuration key:

View File

@@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git
- Destroy all resources in a specific stack: - Destroy all resources in a specific stack:
`pulumi destroy --stack {{stack}}` `pulumi destroy {{[-s|--stack]}} {{stack}}`
- Automatically approve and destroy resources after previewing: - Automatically approve and destroy resources after previewing:
`pulumi destroy --yes` `pulumi destroy {{[-y|--yes]}}`
- Exclude protected resources from being destroyed: - Exclude protected resources from being destroyed:

View File

@@ -34,4 +34,4 @@ source: https://github.com/tldr-pages/tldr.git
- Display help: - Display help:
`pulumi env --help` `pulumi env {{[-h|--help]}}`

View File

@@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git
- Use the specified secrets provider with the <pulumi.com> backend: - Use the specified secrets provider with the <pulumi.com> backend:
`pulumi new --secrets-provider={{passphrase}}` `pulumi new --secrets-provider {{passphrase}}`

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Show a preview of updates to a stack's resources in JSON format: - Show a preview of updates to a stack's resources in JSON format:
`pulumi preview --json` `pulumi preview {{[-j|--json]}}`
- Preview updates as a rich diff showing overall changes: - Preview updates as a rich diff showing overall changes:
@@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git
- Display help: - Display help:
`pulumi preview --help` `pulumi preview {{[-h|--help]}}`

View File

@@ -26,8 +26,8 @@ source: https://github.com/tldr-pages/tldr.git
- The name of the stack to operate on (defaults to the current stack): - The name of the stack to operate on (defaults to the current stack):
`pulumi refresh --stack {{stack_name}}` `pulumi refresh {{[-s|--stack]}} {{stack_name}}`
- Display help: - Display help:
`pulumi refresh --help` `pulumi refresh {{[-h|--help]}}`

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Show the stack state along with resource URNs: - Show the stack state along with resource URNs:
`pulumi stack --show-urns` `pulumi stack {{[-u|--show-urns]}}`
- List stacks in the current project: - List stacks in the current project:
@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
- List stacks across all projects: - List stacks across all projects:
`pulumi stack ls --all` `pulumi stack ls {{[-a|--all]}}`
- Select an active stack: - Select an active stack:

View File

@@ -30,4 +30,4 @@ source: https://github.com/tldr-pages/tldr.git
- Display help: - Display help:
`pulumi state --help` `pulumi state {{[-h|--help]}}`

View File

@@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git
- Automatically approve and perform the update after previewing it: - Automatically approve and perform the update after previewing it:
`pulumi up --yes` `pulumi up {{[-y|--yes]}}`
- Preview and deploy changes in a specific stack: - Preview and deploy changes in a specific stack:
`pulumi up --stack {{stack}}` `pulumi up {{[-s|--stack]}} {{stack}}`
- Don't display stack outputs: - Don't display stack outputs:

25
tldr/reuse Normal file
View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# reuse
> Tool for compliance with the REUSE recommendations.
> More information: <https://reuse.readthedocs.io/en/stable/man/index.html>.
- Lint for REUSE compliance for the current project (version control aware):
`reuse lint`
- Lint for REUSE compliance from the specified directory:
`reuse --root {{path/to/directory}} lint`
- Download a license by its SPDX identifier and place it in the LICENSES directory:
`reuse download {{spdx-identifier}}`
- Download all missing licenses detected in the project:
`reuse download --all`

29
tldr/sqlx Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# sqlx
> Command-line utility for SQLx, the Rust SQL toolkit.
> More information: <https://github.com/launchbadge/sqlx/blob/main/sqlx-cli/README.md>.
- Create the database specified in the DATABASE_URL environment variable:
`sqlx database create`
- Drop the specified database:
`sqlx database drop {{[-D|--database-url]}} {{database_url}}`
- Create a new pair of up and down migration files with the given description in the "migrations" directory:
`sqlx migrate add -r {{migration_description}}`
- Run all pending migrations for the specified database:
`sqlx migrate run {{[-D|--database-url]}} {{database_url}}`
- Revert the latest migration for the specified database:
`sqlx migrate revert {{[-D|--database-url]}} {{database_url}}`

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Re-run a command every 60 seconds: - Re-run a command every 60 seconds:
`watch {{[-n|--interval]}} {{60}} {{command}}` `watch {{[-n|--interval]}} 60 {{command}}`
- Monitor disk space, highlighting differences as they appear: - Monitor disk space, highlighting differences as they appear: