Update cheatsheets

This commit is contained in:
ivuorinen
2025-12-03 00:20:54 +00:00
parent 922b1aa234
commit 848b78740c
27 changed files with 237 additions and 33 deletions

33
tldr/add-computer.py Normal file
View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# addcomputer.py
> Add a computer account to domain.
> More information: <https://github.com/fortra/impacket>.
- Add a computer with a specific name and password:
`addcomputer.py -computer-name {{COMPUTER_NAME$}} -computer-pass {{computer_password}} {{domain}}/{{username}}:{{password}}`
- Only set a new password on an existing computer:
`addcomputer.py -no-add -computer-name {{COMPUTER_NAME$}} -computer-pass {{computer_password}} {{domain}}/{{username}}:{{password}}`
- Delete an existing computer account:
`addcomputer.py -delete -computer-name {{COMPUTER_NAME$}} {{domain}}/{{username}}:{{password}}`
- Add computer using Kerberos authentication:
`addcomputer.py -k -no-pass {{domain}}/{{username}}@{{hostname}}`
- Add computer via LDAPS (port 636) instead of SAMR (port 445):
`addcomputer.py -method LDAPS -port 636 {{domain}}/{{username}}:{{password}}`
- Specify exact domain controller when multiple DCs exist:
`addcomputer.py -dc-host {{hostname}} {{domain}}/{{username}}:{{password}}`

View File

@@ -27,12 +27,12 @@ source: https://github.com/tldr-pages/tldr.git
- Create a new project, overwriting the destination directory if it exists:
`bun create {{template}} {{path/to/destination} --force`
`bun create {{template}} {{path/to/destination}} --force`
- Create a new project without initializing a Git repository automatically:
`bun create {{template}} {{path/to/destination} --no-git`
`bun create {{template}} {{path/to/destination}} --no-git`
- Create a new project without installing dependencies automatically:
`bun create {{template}} {{path/to/destination} --no-install`
`bun create {{template}} {{path/to/destination}} --no-install`

42
tldr/bun-pm Normal file
View File

@@ -0,0 +1,42 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# bun pm
> A set of utilities for working with Bun's package manager.
> Some subcommands such as `pack`, `pkg` have their own usage documentation.
> More information: <https://bun.com/docs/pm/cli/pm>.
- Create a tarball of the current workspace:
`bun pm pack`
- Print the path to the `bin` directory:
`bun pm bin`
- List installed dependencies:
`bun pm ls`
- Print the npm registry username:
`bun pm whoami`
- Generate and print the hash of the current lockfile:
`bun pm hash`
- Print the path to Bun's global module cache:
`bun pm cache`
- Migrate another package manager's lockfile without installing anything:
`bun pm migrate`
- Get a property from `package.json`:
`bun pm pkg get {{property}}`

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Remove all untracked files:
`conda package {{[-r|--reset}}`
`conda package {{[-r|--reset]}}`
- Display all untracked files:

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
---
# crane registry
> This command serves a registry implementation on an automatically chosen port (:0), `$PORT` or --address.
> This command serves a registry implementation on an automatically chosen port (`:0`), `$PORT` or `--address`.
> The command blocks while the server accepts pushes and pulls and contents are can be stored in memory, and disk.
> More information: <https://github.com/google/go-containerregistry/blob/main/cmd/crane/doc/crane_registry_serve.md>.

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> Generate ASCII banners from user input.
> See also: `showfigfonts`.
> More information: <http://www.figlet.org/figlet-man.html>.
> More information: <https://www.figlet.org/figlet-man.html>.
- Generate by directly inputting text:

30
tldr/gcloud-components Normal file
View File

@@ -0,0 +1,30 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# gcloud components
> Manage Google Cloud CLI components.
> See also: `gcloud`.
> More information: <https://cloud.google.com/sdk/gcloud/reference/components>.
- View available components for installation:
`gcloud components list`
- Install one or more components (installs any dependencies as well):
`gcloud components install {{component_id1 component_id2 ...}}`
- Update all components to the latest version:
`gcloud components update`
- Update all components to a specific version:
`gcloud components update --version={{1.2.3}}`
- Update components without confirmation (useful for automation scripts):
`gcloud components update --quiet`

View File

@@ -19,11 +19,11 @@ source: https://github.com/tldr-pages/tldr.git
- Show commits made since 1 week ago:
`gitk --since="{{1 week ago}}"`
`gitk --since="1 week ago"`
- Show commits older than 1/1/2016:
- Show commits older than 1/1/2015:
`gitk --until="{{1/1/2015}}"`
`gitk --until="1/1/2015"`
- Show at most 100 changes in all branches:

12
tldr/impacket-addcomputer Normal file
View File

@@ -0,0 +1,12 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# impacket-addcomputer
> This command is an alias of `addcomputer.py`.
- View documentation for the original command:
`tldr addcomputer.py`

View File

@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
- Test a specific website in debug mode:
`{{path/to/}}goldeneye.py {{url}} {{-d|--debug}}`
`{{path/to/}}goldeneye.py {{url}} {{[-d|--debug]}}`
- Display help:

34
tldr/linux/hyprpaper Normal file
View File

@@ -0,0 +1,34 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# hyprpaper
> Wallpaper utility for Hyprland with the ability to dynamically change wallpapers.
> Controlled by the config file `~/.config/hypr/hyprpaper.conf`.
> More information: <https://github.com/hyprwm/hyprpaper>.
- Start the hyprpaper service:
`hyprpaper`
- Preload a wallpaper:
`hyprctl hyprpaper preload "{{path/to/image.png}}"`
- Switch wallpaper to a different preloaded image:
`hyprctl hyprpaper wallpaper "{{monitor}},{{path/to/image.png}}"`
- Preload a wallpaper, set that wallpaper, then unload all unused wallpapers:
`hyprctl hyprpaper reload "{{monitor}},{{path/to/image.png}}"`
- List the wallpapers that are currently preloaded (useful for dynamically preloading and unloading):
`hyprctl hyprpaper listloaded`
- List the active wallpapers hyprpaper is displaying, along with their associated monitor:
`hyprctl hyprpaper listactive`

View File

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

View File

@@ -24,6 +24,10 @@ source: https://github.com/tldr-pages/tldr.git
`sudo lxc-stop {{container_name}}`
- Write debug logs to a file:
`sudo lxc-start {{container_name}} {{[-l|--logpriority]}} DEBUG {{[-o|--logfile]}} {{path/to/logfile}}`
- Display help:
`lxc-start {{[-?|--help]}}`

View File

@@ -32,9 +32,9 @@ source: https://github.com/tldr-pages/tldr.git
`mount {{[-a|--all]}}`
- Mount a specific filesystem described in `/etc/fstab` (e.g. `/dev/sda1 /my_drive ext2 defaults 0 2`):
- Mount a specific filesystem described in `/etc/fstab` (e.g. `/dev/sda1 /path/to/mount_point ext2 defaults 0 2`):
`mount {{/my_drive}}`
`mount {{path/to/mount_point}}`
- Mount a directory to another directory:

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
---
# pacman --files
> Arch Linux package manager utility.
> Query the local files database.
> See also: `pacman`, `pkgfile`.
> More information: <https://manned.org/pacman.8>.

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
---
# pacman --query
> Arch Linux package manager utility.
> Query the local package database.
> See also: `pacman`.
> More information: <https://manned.org/pacman.8>.

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
---
# pacman --remove
> Arch Linux package manager utility.
> Remove packages from the system.
> See also: `pacman`.
> More information: <https://manned.org/pacman.8>.

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
---
# pacman --sync
> Arch Linux package manager utility.
> Synchronize packages from remote repositories.
> See also: `pacman`.
> More information: <https://manned.org/pacman.8>.

View File

@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
---
# pacman --upgrade
> Arch Linux package manager utility.
> Install packages manually from archive files.
> See also: `pacman`.
> More information: <https://manned.org/pacman.8>.

View File

@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
- Change user password:
`pveum {{[pa|passwd]}} {{[username}}@pve`
`pveum {{[pa|passwd]}} {{username}}@pve`
- Delete a user:

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> Handle RPMNEW, RPMSAVE and RPMORIG files left over by package upgrades.
> See also: `rpm`.
> More information: <https://manned.org/man/rpmconf.8>.
> More information: <https://manned.org/rpmconf.8>.
- List leftover files and interactively choose what to do with each of them:

View File

@@ -14,4 +14,4 @@ source: https://github.com/tldr-pages/tldr.git
- Specify the type of change to log:
`sudo rtmon {{[f|file}} {{link|address|route}}`
`sudo rtmon {{[f|file]}} {{link|address|route}}`

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# scrot
> Screen capture utility.
> More information: <https://github.com/resurrecting-open-source-projects/scrot>.
> More information: <https://manned.org/scrot>.
- Capture a screenshot and save it to the current directory with the current date as the filename:
@@ -14,24 +14,24 @@ source: https://github.com/tldr-pages/tldr.git
- Capture a screenshot and save it as `capture.png`:
`scrot {{capture.png}}`
`scrot capture.png`
- Capture a screenshot interactively:
`scrot --select`
`scrot {{[-s|--select]}}`
- Capture a screenshot interactively without exiting on keyboard input, press `<Esc>` to exit:
`scrot --select --ignorekeyboard`
`scrot {{[-is|--ignorekeyboard --select]}}`
- Capture a screenshot interactively delimiting the region with a colored line:
`scrot --select --line color={{x11_color|rgb_color}}`
`scrot {{[-s|--select]}} {{[-l|--line]}} color={{x11_color|rgb_color}}`
- Capture a screenshot from the currently focused window:
`scrot --focused`
`scrot {{[-u|--focused]}}`
- Display a countdown of 10 seconds before taking a screenshot:
`scrot --count --delay {{10}}`
`scrot {{[-c|--count]}} {{[-d|--delay]}} 10`

View File

@@ -10,24 +10,24 @@ source: https://github.com/tldr-pages/tldr.git
- Retrieve the X-Windows window ID of the running Firefox window(s):
`xdotool search --onlyvisible --name {{firefox}}`
`xdotool search --onlyvisible --name firefox`
- Perform a mouse `<RightClick>`:
`xdotool click {{3}}`
`xdotool click 3`
- Get the ID of the currently active window:
`xdotool getactivewindow`
- Focus on the window with ID of 12345:
- Focus on the window with a specific ID:
`xdotool windowfocus --sync {{12345}}`
- Type a message, with a 500ms delay for each letter:
`xdotool type --delay {{500}} "Hello world"`
`xdotool type --delay 500 "{{Hello world}}"`
- Press the `<Enter>` key:
`xdotool key {{KP_Enter}}`
`xdotool key KP_Enter`

18
tldr/poetry-search Normal file
View File

@@ -0,0 +1,18 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# poetry search
> Search for packages on a remote index.
> Note: PyPI no longer supports searching via the command-line, so this command may fail on the default repository.
> More information: <https://python-poetry.org/docs/cli/#search>.
- Search for a package:
`poetry search {{package_name}}`
- Search for multiple packages:
`poetry search {{package1 package2 ...}}`

23
tldr/setopt Normal file
View File

@@ -0,0 +1,23 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# setopt
> Set Z shell (`zsh`) options.
> Note: Zsh options are case-insensitive and underscores are ignored.
> See also: `unsetopt` to unset options.
> More information: <https://zsh.sourceforge.io/Doc/Release/Options.html>.
- List enabled options:
`setopt`
- Set an option:
`setopt {{option}}`
- Display all available options and their status:
`set -o`

View File

@@ -16,10 +16,18 @@ source: https://github.com/tldr-pages/tldr.git
`steamcmd +login {{username}} +app_update {{appid}} +quit`
- Define a custom install location:
`steamcmd +force_install_dir {{path/to/directory}} +login {{anonymous}} +app_update {{appid}} validate +quit`
- Install an application for a specific platform:
`steamcmd +@sSteamCmdForcePlatformType {{windows}} +login {{anonymous}} +app_update {{appid}} validate +quit`
- Run a script file:
`steamcmd +runscript {{script.txt}}`
- Clear cached login credentials for a user:
`steamcmd +login {{username}} +logout +quit`