From 5c637b8c84d703b7245fd11f1a40f512673ca313 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Fri, 28 Nov 2025 00:20:13 +0000 Subject: [PATCH] Update cheatsheets --- tldr/kubectl-cordon | 30 ++++++++++++++++++++++++++++ tldr/kubectl-uncordon | 30 ++++++++++++++++++++++++++++ tldr/linux/bmon | 2 +- tldr/linux/envycontrol | 2 +- tldr/linux/fscrypt | 2 +- tldr/linux/gamescope | 2 +- tldr/linux/goldeneye.py | 12 ++++++------ tldr/linux/guake | 2 +- tldr/linux/handlr | 2 +- tldr/linux/hardinfo | 2 +- tldr/linux/imgp | 2 +- tldr/linux/impala | 2 +- tldr/linux/lxterminal | 2 +- tldr/linux/mangohud | 2 +- tldr/linux/nethogs | 2 +- tldr/linux/netselect | 2 +- tldr/linux/nitch | 2 +- tldr/linux/nsnake | 2 +- tldr/linux/paru | 2 +- tldr/linux/patool | 2 +- tldr/linux/paxs | 2 +- tldr/linux/playerctl | 2 +- tldr/linux/pokego | 4 ++-- tldr/linux/pridecat | 2 +- tldr/linux/qrcp | 2 +- tldr/linux/reptyr | 2 +- tldr/linux/rtorrent | 2 +- tldr/linux/slop | 2 +- tldr/linux/swww | 2 +- tldr/linux/timeshift | 2 +- tldr/linux/yay | 2 +- tldr/linux/ydotool | 2 +- tldr/linux/yetris | 2 +- tldr/openssl | 28 +++++++++++++++++++++++---- tldr/osx/bclm | 2 +- tldr/osx/mysides | 2 +- tldr/osx/spotify | 2 +- tldr/osx/tag | 2 +- tldr/osx/xcodes | 2 +- tldr/osx/xcodes-runtimes | 2 +- tldr/osx/xctool | 2 +- tldr/putty | 42 ++++++++++++++++++++++++++++++++++++++++ tldr/scdoc | 17 ++++++++++++++++ tldr/vegeta | 2 +- 44 files changed, 188 insertions(+), 49 deletions(-) create mode 100644 tldr/kubectl-cordon create mode 100644 tldr/kubectl-uncordon create mode 100644 tldr/putty create mode 100644 tldr/scdoc diff --git a/tldr/kubectl-cordon b/tldr/kubectl-cordon new file mode 100644 index 00000000..171a0bdc --- /dev/null +++ b/tldr/kubectl-cordon @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# kubectl cordon + +> Mark a node as unschedulable, preventing new pods from being assigned to it. +> See also: `kubectl uncordon`. +> More information: . + +- Mark a node as unschedulable: + +`kubectl cordon {{node_name}}` + +- Mark multiple nodes as unschedulable: + +`kubectl cordon {{node_name1 node_name2 ...}}` + +- Mark a node as unschedulable in a specific context: + +`kubectl cordon {{node_name}} --context {{context_name}}` + +- Mark nodes matching a label selector as unschedulable: + +`kubectl cordon {{[-l|--selector]}} {{label_key}}={{label_value}}` + +- Preview the changes without actually cordoning the nodes (dry run): + +`kubectl cordon {{node_name}} --dry-run={{none|server|client}}` diff --git a/tldr/kubectl-uncordon b/tldr/kubectl-uncordon new file mode 100644 index 00000000..55ed9c3c --- /dev/null +++ b/tldr/kubectl-uncordon @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# kubectl uncordon + +> Mark a node as schedulable, allowing new pods to be assigned to it. +> See also: `kubectl cordon`. +> More information: . + +- Mark a node as schedulable: + +`kubectl uncordon {{node_name}}` + +- Mark multiple nodes as schedulable: + +`kubectl uncordon {{node_name1 node_name2 ...}}` + +- Mark a node as schedulable in a specific context: + +`kubectl uncordon {{node_name}} --context {{context_name}}` + +- Mark nodes matching a label selector as schedulable: + +`kubectl uncordon {{[-l|--selector]}} {{label_key}}={{label_value}}` + +- Preview the changes without actually uncordoning the nodes (dry run): + +`kubectl uncordon {{node_name}} --dry-run={{none|server|client}}` diff --git a/tldr/linux/bmon b/tldr/linux/bmon index 9d6c3e60..b21d71b4 100644 --- a/tldr/linux/bmon +++ b/tldr/linux/bmon @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # bmon > Monitor bandwidth and capture network related statistics. -> More information: . +> More information: . - Display the list of all the interfaces: diff --git a/tldr/linux/envycontrol b/tldr/linux/envycontrol index 56264eb4..4401cc27 100644 --- a/tldr/linux/envycontrol +++ b/tldr/linux/envycontrol @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # envycontrol > GPU switching utility for Nvidia Optimus laptops. -> More information: . +> More information: . - Switch between different GPU modes: diff --git a/tldr/linux/fscrypt b/tldr/linux/fscrypt index 0f2726c5..f1f35b3d 100644 --- a/tldr/linux/fscrypt +++ b/tldr/linux/fscrypt @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # fscrypt > Go tool for managing Linux filesystem encryption. -> More information: . +> More information: . - Prepare the root filesystem for use with `fscrypt`: diff --git a/tldr/linux/gamescope b/tldr/linux/gamescope index f0bff8fe..0faecce3 100644 --- a/tldr/linux/gamescope +++ b/tldr/linux/gamescope @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > A micro-compositor used as a game layer. > See also: `cage`. -> More information: . +> More information: . - Run a program with gamescope on the terminal: diff --git a/tldr/linux/goldeneye.py b/tldr/linux/goldeneye.py index 81605cd6..303d637d 100644 --- a/tldr/linux/goldeneye.py +++ b/tldr/linux/goldeneye.py @@ -6,24 +6,24 @@ source: https://github.com/tldr-pages/tldr.git # goldeneye.py > A HTTP DoS test tool. -> More information: . +> More information: . - Test a specific website: -`./goldeneye.py {{url}}` +`{{path/to/}}goldeneye.py {{url}}` - Test a specific website with 100 user agents and 200 concurrent sockets: -`./goldeneye.py {{url}} --useragents 100 --sockets 200` +`{{path/to/}}goldeneye.py {{url}} {{[-u|--useragents]}} 100 {{[-s|--sockets]}} 200` - Test a specific website without verifying the SSL certificate: -`./goldeneye.py {{url}} --nosslcheck` +`{{path/to/}}goldeneye.py {{url}} {{[-n|--nosslcheck]}}` - Test a specific website in debug mode: -`./goldeneye.py {{url}} --debug` +`{{path/to/}}goldeneye.py {{url}} {{-d|--debug}}` - Display help: -`./goldeneye.py --help` +`{{path/to/}}goldeneye.py {{[-h|--help]}}` diff --git a/tldr/linux/guake b/tldr/linux/guake index 4f54f4d3..6d8d2302 100644 --- a/tldr/linux/guake +++ b/tldr/linux/guake @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > A drop-down terminal for GNOME. > See also: `yakuake`. -> More information: . +> More information: . - Toggle Guake visibility: diff --git a/tldr/linux/handlr b/tldr/linux/handlr index 34f83bd0..59c27a42 100644 --- a/tldr/linux/handlr +++ b/tldr/linux/handlr @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # handlr > Manage your default applications. -> More information: . +> More information: . - Open a URL in the default application: diff --git a/tldr/linux/hardinfo b/tldr/linux/hardinfo index 332ca740..14d4db6c 100644 --- a/tldr/linux/hardinfo +++ b/tldr/linux/hardinfo @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # hardinfo > Show hardware information in GUI window. -> More information: . +> More information: . - Start `hardinfo`: diff --git a/tldr/linux/imgp b/tldr/linux/imgp index db779887..66028e05 100644 --- a/tldr/linux/imgp +++ b/tldr/linux/imgp @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # imgp > Resize and rotate JPEG and PNG images. -> More information: . +> More information: . - Convert single images and/or whole directories containing valid image formats: diff --git a/tldr/linux/impala b/tldr/linux/impala index 26b183e6..23337a32 100644 --- a/tldr/linux/impala +++ b/tldr/linux/impala @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # impala > Manage Wi-Fi networks through a TUI. -> More information: . +> More information: . - Launch `impala` in station mode: diff --git a/tldr/linux/lxterminal b/tldr/linux/lxterminal index e7bb4d3b..efe9e1c7 100644 --- a/tldr/linux/lxterminal +++ b/tldr/linux/lxterminal @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # lxterminal > Terminal emulator for LXDE. -> More information: . +> More information: . - Open an LXTerminal window: diff --git a/tldr/linux/mangohud b/tldr/linux/mangohud index d6441759..3d7b63e9 100644 --- a/tldr/linux/mangohud +++ b/tldr/linux/mangohud @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # mangohud > Display a monitoring HUD on top of a Vulkan or OpenGL graphical application. -> More information: . +> More information: . - Use `mangohud` on top of an application: diff --git a/tldr/linux/nethogs b/tldr/linux/nethogs index 9d3cefb9..4c8a7f8f 100644 --- a/tldr/linux/nethogs +++ b/tldr/linux/nethogs @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # nethogs > Monitor bandwidth usage per process. -> More information: . +> More information: . - Start NetHogs as root (default device is `eth0`): diff --git a/tldr/linux/netselect b/tldr/linux/netselect index 6545899d..fe84eb17 100644 --- a/tldr/linux/netselect +++ b/tldr/linux/netselect @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # netselect > Speed test for choosing a fast network server. -> More information: . +> More information: . - Choose the server with the lowest latency: diff --git a/tldr/linux/nitch b/tldr/linux/nitch index 47094bde..42fb0568 100644 --- a/tldr/linux/nitch +++ b/tldr/linux/nitch @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # nitch > A small and incredibly fast system fetch written fully in Nim. -> More information: . +> More information: . - Display system information (hostname, kernel, uptime, etc.): diff --git a/tldr/linux/nsnake b/tldr/linux/nsnake index 5e917dd3..0a9e92ea 100644 --- a/tldr/linux/nsnake +++ b/tldr/linux/nsnake @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # nsnake > Snake game in the terminal. -> More information: . +> More information: . - Start a snake game: diff --git a/tldr/linux/paru b/tldr/linux/paru index 035f8e9b..dce8ef79 100644 --- a/tldr/linux/paru +++ b/tldr/linux/paru @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > An AUR helper and pacman wrapper. > See also: `pacman`, `yay`. -> More information: . +> More information: . - Interactively search for and install a package: diff --git a/tldr/linux/patool b/tldr/linux/patool index eef25abf..471bbf9b 100644 --- a/tldr/linux/patool +++ b/tldr/linux/patool @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Archive file manager. > Various archive formats can be created, extracted, tested, listed, searched, repacked, and compared. -> More information: . +> More information: . - Extract an archive: diff --git a/tldr/linux/paxs b/tldr/linux/paxs index d3b19ba1..713d2436 100644 --- a/tldr/linux/paxs +++ b/tldr/linux/paxs @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Manage packages across Yay, Flatpak, and Snap. > Supports searching, installing, removing, and upgrading packages. -> More information: . +> More information: . - Search for a package: diff --git a/tldr/linux/playerctl b/tldr/linux/playerctl index 277d85d3..8a1e7251 100644 --- a/tldr/linux/playerctl +++ b/tldr/linux/playerctl @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # playerctl > Control media players via MPRIS. -> More information: . +> More information: . - Toggle play: diff --git a/tldr/linux/pokego b/tldr/linux/pokego index 8c23dcef..997fd886 100644 --- a/tldr/linux/pokego +++ b/tldr/linux/pokego @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Display Pokémon sprites in color directly in your terminal. > Inspired by Phoney badger's `pokemon-colorscripts` but offers enhanced speed and efficiency. -> More information: . +> More information: . - Print a specific Pokémon: @@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git - Print a specific shiny Pokémon: -`pokego --name spheal -shiny` +`pokego --name spheal {{[-s|-shiny]}}` - Print an alternative form of a Pokémon: diff --git a/tldr/linux/pridecat b/tldr/linux/pridecat index 11e61fc0..8b8422f6 100644 --- a/tldr/linux/pridecat +++ b/tldr/linux/pridecat @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # pridecat > Like cat but more colorful. -> More information: . +> More information: . - Print the contents of a file in pride colors to `stdout`: diff --git a/tldr/linux/qrcp b/tldr/linux/qrcp index a3a0be6a..eb053fdb 100644 --- a/tldr/linux/qrcp +++ b/tldr/linux/qrcp @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # qrcp > A file transfer tool. -> More information: . +> More information: . - Send a file or directories: diff --git a/tldr/linux/reptyr b/tldr/linux/reptyr index d26691b0..dde18dac 100644 --- a/tldr/linux/reptyr +++ b/tldr/linux/reptyr @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Move a running process to a new terminal. > Best used when you forget to start a long running task in `screen`. -> More information: . +> More information: . - Move a running process to your current terminal: diff --git a/tldr/linux/rtorrent b/tldr/linux/rtorrent index 9c6949dc..d60f143d 100644 --- a/tldr/linux/rtorrent +++ b/tldr/linux/rtorrent @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # rtorrent > Download torrents. -> More information: . +> More information: . - Add a torrent file or magnet to be downloaded: diff --git a/tldr/linux/slop b/tldr/linux/slop index deb38171..585a761a 100644 --- a/tldr/linux/slop +++ b/tldr/linux/slop @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # slop > Get a selection of the screen. -> More information: . +> More information: . - Wait for the user to make a selection and output its geometry to `stdout`: diff --git a/tldr/linux/swww b/tldr/linux/swww index 0feafa89..43e34945 100644 --- a/tldr/linux/swww +++ b/tldr/linux/swww @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Efficient animated wallpaper daemon for Wayland. > See also: `swww-daemon`. -> More information: . +> More information: . - Set wallpaper: diff --git a/tldr/linux/timeshift b/tldr/linux/timeshift index f7351707..652eb474 100644 --- a/tldr/linux/timeshift +++ b/tldr/linux/timeshift @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # timeshift > System restore utility. -> More information: . +> More information: . - List snapshots: diff --git a/tldr/linux/yay b/tldr/linux/yay index 3071dfd6..2211ef68 100644 --- a/tldr/linux/yay +++ b/tldr/linux/yay @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Yet Another Yogurt: build and install packages from the Arch User Repository. > See also: `pacman`. -> More information: . +> More information: . - Interactively search and install packages from the repos and AUR: diff --git a/tldr/linux/ydotool b/tldr/linux/ydotool index 8bf4db49..794e6e6a 100644 --- a/tldr/linux/ydotool +++ b/tldr/linux/ydotool @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # ydotool > Control keyboard and mouse inputs via commands in a way that is display server agnostic. -> More information: . +> More information: . - Start the ydotool daemon in the background: diff --git a/tldr/linux/yetris b/tldr/linux/yetris index d2ae0081..339dd405 100644 --- a/tldr/linux/yetris +++ b/tldr/linux/yetris @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # yetris > Clone of the game Tetris in the terminal. -> More information: . +> More information: . - Start a Tetris game: diff --git a/tldr/openssl b/tldr/openssl index 0f718baf..5c25c4fe 100644 --- a/tldr/openssl +++ b/tldr/openssl @@ -9,14 +9,34 @@ source: https://github.com/tldr-pages/tldr.git > Some subcommands such as `req` have their own usage documentation. > More information: . +- Generate a private key and encrypt the output file using AES256: + +`openssl genpkey -algorithm {{rsa|ec}} -out {{private.key}} -aes256` + +- Generate the corresponding public key from private key `private.key` using `rsa`: + +`openssl rsa -in {{private.key}} -pubout -out {{public.key}}` + +- Generate a self-signed certificate valid for a specified number of days (`365`): + +`openssl req -new -x509 -key {{private.key}} -out {{certificate.crt}} -days {{365}}` + +- Convert certificate to `pem` or `der` format: + +`openssl x509 -in {{certificate.crt}} -out {{certificate.pem|certificate.der}} -outform {{pem|der}}` + +- Check certificate details: + +`openssl x509 -in {{certificate.crt}} -text -noout` + +- Generate a certificate signing request (CSR): + +`openssl req -new -key {{private.key}} -out {{request.csr}}` + - Display help: `openssl help` -- Display help for a specific subcommand: - -`openssl help {{x509}}` - - Display version: `openssl version` diff --git a/tldr/osx/bclm b/tldr/osx/bclm index 78e0ec46..f88cd483 100644 --- a/tldr/osx/bclm +++ b/tldr/osx/bclm @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # bclm > Set a custom charge limit on MacBooks. -> More information: . +> More information: . - Set the charge limit to about 80% (for Intel machines, the battery charge level may be slightly lower than the set value): diff --git a/tldr/osx/mysides b/tldr/osx/mysides index ed4026a9..80f1769e 100644 --- a/tldr/osx/mysides +++ b/tldr/osx/mysides @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # mysides > Add, list and remove finder favorites. -> More information: . +> More information: . - List sidebar favorites: diff --git a/tldr/osx/spotify b/tldr/osx/spotify index ae9e1dad..53caba18 100644 --- a/tldr/osx/spotify +++ b/tldr/osx/spotify @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # spotify > A command-line interface to Spotify. -> More information: . +> More information: . - Find a song by name and play it: diff --git a/tldr/osx/tag b/tldr/osx/tag index efbaec98..86a528da 100644 --- a/tldr/osx/tag +++ b/tldr/osx/tag @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # tag > Edit tags on Mac OS X files (10.9 Mavericks and above). -> More information: . +> More information: . - Add tags to a file: diff --git a/tldr/osx/xcodes b/tldr/osx/xcodes index 24626913..f62fbaa9 100644 --- a/tldr/osx/xcodes +++ b/tldr/osx/xcodes @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Download, install and manage multiple Xcode versions. > See also: `xcodes runtimes`. -> More information: . +> More information: . - List all installed Xcode versions: diff --git a/tldr/osx/xcodes-runtimes b/tldr/osx/xcodes-runtimes index d2f2525d..98d57abc 100644 --- a/tldr/osx/xcodes-runtimes +++ b/tldr/osx/xcodes-runtimes @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # xcodes runtimes > Manage Xcode Simulator runtimes. -> More information: . +> More information: . - Display all available Simulator runtimes: diff --git a/tldr/osx/xctool b/tldr/osx/xctool index 36b4f9ed..3802a77b 100644 --- a/tldr/osx/xctool +++ b/tldr/osx/xctool @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # xctool > Build Xcode projects. -> More information: . +> More information: . - Build a single project without any workspace: diff --git a/tldr/putty b/tldr/putty new file mode 100644 index 00000000..f66b22e5 --- /dev/null +++ b/tldr/putty @@ -0,0 +1,42 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# putty + +> SSH, Telnet, and Rlogin client for connecting to remote servers. +> Note: On Linux, the native `ssh` client is often more convenient. PuTTY is more commonly used on Windows. +> More information: . + +- Connect to a remote host via SSH: + +`putty -ssh {{username}}@{{hostname_or_ip}}` + +- Connect to a remote host on a specific [P]ort: + +`putty -ssh {{username}}@{{hostname_or_ip}} -P {{port}}` + +- Load a saved session: + +`putty -load {{session_name}}` + +- Connect with a private key for authentication: + +`putty -ssh {{username}}@{{hostname_or_ip}} -i {{path/to/private_key.ppk}}` + +- Connect via Telnet: + +`putty -telnet {{hostname_or_ip}}` + +- Enable [X]11 forwarding: + +`putty -ssh {{username}}@{{hostname_or_ip}} -X` + +- Set up [L]ocal port forwarding: + +`putty -ssh {{username}}@{{hostname_or_ip}} -L {{local_port}}:{{destination_host}}:{{destination_port}}` + +- Display help: + +`putty -help` diff --git a/tldr/scdoc b/tldr/scdoc new file mode 100644 index 00000000..e664a872 --- /dev/null +++ b/tldr/scdoc @@ -0,0 +1,17 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# scdoc + +> Generate `man` manual pages. +> More information: . + +- Generate man pages from a scdoc (`.scd`) file: + +`scdoc < {{path/to/file.scd}} > {{path/to/file.1}}` + +- Generate man pages from a scdoc file and display the generated troff (man) source: + +`scdoc < {{path/to/file.scd}} | {{less}}` diff --git a/tldr/vegeta b/tldr/vegeta index a0c0617b..3f33803c 100644 --- a/tldr/vegeta +++ b/tldr/vegeta @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > A utility and a library for HTTP load testing. > See also: `ab`. -> More information: . +> More information: . - Launch an attack lasting 30 seconds: