Update cheatsheets

This commit is contained in:
ivuorinen
2025-12-03 12:55:58 +00:00
parent e1f4a4ffa5
commit 1079e2c07a
12 changed files with 89 additions and 17 deletions

33
tldr/bun-pm-pkg Normal file
View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# bun pm pkg
> Manage package.json data with `get`, `set`, `delete`, and `fix` operations.
> More information: <https://bun.com/docs/pm/cli/pm#pkg>.
- Get all properties from `package.json`:
`bun pm pkg get`
- Get a single property:
`bun pm pkg get {{property}}`
- Get multiple properties:
`bun pm pkg get {{property1 property2 property3 ...}}`
- Set a property:
`bun pm pkg set {{property}}="{{value}}"`
- Delete a property:
`bun pm pkg delete {{property}}`
- Automatically fix common issues in `package.json`:
`bun pm pkg fix`

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# CUPS
> Open source printing system.
> CUPS isn't a single command, but a set of commands.
> CUPS isn't a command, but a set of commands.
> More information: <https://www.cups.org/index.html>.
- View documentation for running the CUPS daemon:

View File

@@ -10,15 +10,15 @@ source: https://github.com/tldr-pages/tldr.git
- Create a context using a specific Docker endpoint:
`docker context create {{my_context}} --docker "host={{tcp://remote-host:2375}}"`
`docker context create {{context_name}} --docker "host={{tcp://remote-host:2375}}"`
- Create a context based on the `$DOCKER_HOST` environment variable:
`docker context create {{my_context}}`
`docker context create {{context_name}}`
- Switch to a context:
`docker context use {{my_context}}`
`docker context use {{context_name}}`
- List all contexts:

View File

@@ -8,18 +8,18 @@ source: https://github.com/tldr-pages/tldr.git
> Utility to tail multiple Kubernetes pod logs at the same time.
> More information: <https://github.com/johanhaleby/kubetail>.
- Tail the logs of multiple pods (whose name starts with "my_app") in one go:
- Tail the logs of multiple pods (whose name starts with `app_name`) in one go:
`kubetail {{my_app}}`
`kubetail {{app_name}}`
- Tail only a specific container from multiple pods:
`kubetail {{my_app}} {{[-c|--container]}} {{my_container}}`
`kubetail {{app_name}} {{[-c|--container]}} {{container_name}}`
- Tail multiple containers from multiple pods:
`kubetail {{my_app}} {{[-c|--container]}} {{my_container_1}} {{[-c|--container]}} {{my_container_2}}`
`kubetail {{app_name}} {{[-c|--container]}} {{container_name_1}} {{[-c|--container]}} {{container_name_2}}`
- Tail multiple applications at the same time separate them by comma:
`kubetail {{my_app_1,my_app_2,...}}`
`kubetail {{app_name_1,app_name_2,...}}`

View File

@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# distrobox
> Use any Linux distribution inside your terminal in a container. Install & use packages inside it while tightly integrating with the host OS, sharing storage (`home` directory) and hardware.
> `distrobox` isn't a command, but a set of commands.
> Note: It uses Podman or Docker to create your containers.
> More information: <https://github.com/89luca89/distrobox>.

View File

@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# xbps
> The X Binary Package System is the package manager used by Void Linux.
> `xbps` isn't a command, but a set of commands.
> For equivalent commands in other package managers, see <https://wiki.archlinux.org/title/Pacman/Rosetta>.
> More information: <https://docs.voidlinux.org/xbps/index.html>.

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# moreutils
> A collection of UNIX tools.
> Note: `moreutils` isn't a command, but a set of commands.
> `moreutils` isn't a command, but a set of commands.
> More information: <https://joeyh.name/code/moreutils/>.
- View documentation for pages related to standard streams:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# regex
> Regular expressions (`regex`) are patterns used to match, search, and manipulate text.
> Not a direct command, but syntax to be used with other commands.
> `regex` isn't a command, but syntax to be used with other commands.
> More information: <https://cheatography.com/davechild/cheat-sheets/regular-expressions/>.
- Match any single character:

View File

@@ -10,11 +10,11 @@ source: https://github.com/tldr-pages/tldr.git
- Upload a new site to surge.sh:
`surge {{path/to/my_project}}`
`surge {{path/to/project}}`
- Deploy site to custom domain (note that the DNS records must point to the surge.sh subdomain):
`surge {{path/to/my_project}} {{example.com}}`
`surge {{path/to/project}} {{example.com}}`
- List your surge projects:

37
tldr/svg2png Normal file
View File

@@ -0,0 +1,37 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# svg2png
> Render an SVG image to a PNG image using cairo.
> More information: <https://cairographics.org/>.
- Convert an SVG file to PNG:
`svg2png {{path/to/file.svg}} {{path/to/output.png}}`
- Convert an SVG file to PNG with a specific width (preserving aspect ratio):
`svg2png {{[-w|--width]}} {{800}} {{path/to/file.svg}} {{path/to/output.png}}`
- Convert an SVG file to PNG with a specific height (preserving aspect ratio):
`svg2png {{[-h|--height]}} {{600}} {{path/to/file.svg}} {{path/to/output.png}}`
- Convert an SVG file to PNG with both width and height (image centered in space):
`svg2png {{[-w|--width]}} {{800}} {{[-h|--height]}} {{600}} {{path/to/file.svg}} {{path/to/output.png}}`
- Convert an SVG file to PNG scaled by a factor:
`svg2png {{[-s|--scale]}} {{2.0}} {{path/to/file.svg}} {{path/to/output.png}}`
- Convert an SVG from `stdin` to PNG on `stdout`:
`cat {{path/to/file.svg}} | svg2png - - > {{path/to/output.png}}`
- Flip the output image horizontally or vertically:
`svg2png --flipx {{path/to/file.svg}} {{path/to/output.png}}`

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# transmission
> A simple torrent client.
> Transmission isn't a command, but a set of commands. See the pages below.
> Transmission isn't a command, but a set of commands.
> More information: <https://transmissionbt.com/>.
- View documentation for running Transmission's daemon:

View File

@@ -11,11 +11,11 @@ source: https://github.com/tldr-pages/tldr.git
- Apply changes from the patch file to the original file:
`wiggle {{path/to/my_patch.patch}}`
`wiggle {{path/to/file.patch}}`
- Apply changes to the output file:
`wiggle {{path/to/my_patch.patch}} {{[-o|--output]}} {{path/to/output_file.txt}}`
`wiggle {{path/to/file.patch}} {{[-o|--output]}} {{path/to/output_file.txt}}`
- Take any changes in `file.rej` that could not have been applied and merge them into a file:
@@ -23,7 +23,7 @@ source: https://github.com/tldr-pages/tldr.git
- Extract one branch of a patch or merge file:
`wiggle {{[-x|--extract]}} {{path/to/my_patch.patch}}`
`wiggle {{[-x|--extract]}} {{path/to/file.patch}}`
- Apply a patch and save the compared words to the output file: