From 2f7a186f62e0308c3e33ef0e72c403a13e755d8f Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Thu, 3 Oct 2024 00:17:01 +0000 Subject: [PATCH] Update cheatsheets --- tldr/az-disk | 30 ++++++++++++++++++++++++++ tldr/builtin | 13 ++++++++++++ tldr/colon | 2 +- tldr/linux/chntpw | 6 +++--- tldr/linux/dunstify | 2 +- tldr/linux/getfattr | 17 +++++++++++++++ tldr/linux/protonvpn | 38 +++++++++++++++++++++++++++++++++ tldr/linux/protonvpn-connect | 33 +++++++++++++++++++++++++++++ tldr/linux/setfattr | 21 ++++++++++++++++++ tldr/linux/sysdig | 38 +++++++++++++++++++++++++++++++++ tldr/minetest | 2 +- tldr/minetestserver | 2 +- tldr/onefetch | 41 ++++++++++++++++++++++++++++++++++++ tldr/yadm-config | 2 +- tldr/yadm-introspect | 26 +++++++++++++++++++++++ tldr/~ | 21 ++++++++++++++++++ 16 files changed, 286 insertions(+), 8 deletions(-) create mode 100644 tldr/az-disk create mode 100644 tldr/builtin create mode 100644 tldr/linux/getfattr create mode 100644 tldr/linux/protonvpn create mode 100644 tldr/linux/protonvpn-connect create mode 100644 tldr/linux/setfattr create mode 100644 tldr/linux/sysdig create mode 100644 tldr/onefetch create mode 100755 tldr/yadm-introspect create mode 100644 tldr/~ diff --git a/tldr/az-disk b/tldr/az-disk new file mode 100644 index 00000000..7780ac92 --- /dev/null +++ b/tldr/az-disk @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# az disk + +> Manage Azure Managed Disks. +> Part of `azure-cli` (also known as `az`). +> More information: . + +- Create a managed disk: + +`az disk create --resource-group {{resource_group}} --name {{disk_name}} --size-gb {{size_in_gb}}` + +- List managed disks in a resource group: + +`az disk list --resource-group {{resource_group}}` + +- Delete a managed disk: + +`az disk delete --resource-group {{resource_group}} --name {{disk_name}}` + +- Grant read or write access to a managed disk (for export): + +`az disk grant-access --resource-group {{resource_group}} --name {{disk_name}} --access-level {{Read|Write}} --duration-in-seconds {{seconds}}` + +- Update disk size: + +`az disk update --resource-group {{resource_group}} --name {{disk_name}} --size-gb {{new_size_in_gb}}` diff --git a/tldr/builtin b/tldr/builtin new file mode 100644 index 00000000..2dbb0f2c --- /dev/null +++ b/tldr/builtin @@ -0,0 +1,13 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# builtin + +> Execute shell builtins. +> More information: . + +- Run a shell builtin: + +`builtin {{command}}` diff --git a/tldr/colon b/tldr/colon index 09b690fa..491aa316 100644 --- a/tldr/colon +++ b/tldr/colon @@ -3,7 +3,7 @@ syntax: markdown tags: [tldr, common] source: https://github.com/tldr-pages/tldr.git --- -# colon +# Colon > Returns a successful exit status code of 0. > More information: . diff --git a/tldr/linux/chntpw b/tldr/linux/chntpw index b9982cee..83e48bdd 100644 --- a/tldr/linux/chntpw +++ b/tldr/linux/chntpw @@ -7,16 +7,16 @@ source: https://github.com/tldr-pages/tldr.git > A utility that can edit windows registry, reset user password, promote users to administrator by modifying the Windows SAM. > Boot target machine with live cd like Kali Linux and run with elevated privileges. -> More information: . +> More information: . - List all users in the SAM file: `chntpw -l {{path/to/sam_file}}` -- Edit [u]ser interactively: +- Edit user interactively: `chntpw -u {{username}} {{path/to/sam_file}}` -- Use chntpw [i]nteractively: +- Use chntpw interactively: `chntpw -i {{path/to/sam_file}}` diff --git a/tldr/linux/dunstify b/tldr/linux/dunstify index 85cf3f21..905b494f 100644 --- a/tldr/linux/dunstify +++ b/tldr/linux/dunstify @@ -23,4 +23,4 @@ source: https://github.com/tldr-pages/tldr.git - Display help: -`notify-send --help` +`dunstify --help` diff --git a/tldr/linux/getfattr b/tldr/linux/getfattr new file mode 100644 index 00000000..d37a8876 --- /dev/null +++ b/tldr/linux/getfattr @@ -0,0 +1,17 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# getfattr + +> Display file names and extended attributes. +> More information: . + +- Retrieve all extended attributes of a file and display them in a detailed format: + +`getfattr -d {{path/to/file}}` + +- Get a specific attribute of a file: + +`getfattr -n user.{{attribute_name}} {{path/to/file}}` diff --git a/tldr/linux/protonvpn b/tldr/linux/protonvpn new file mode 100644 index 00000000..3273ed71 --- /dev/null +++ b/tldr/linux/protonvpn @@ -0,0 +1,38 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# protonvpn + +> Unofficial third-party ProtonVPN client. +> See also: `protonvpn-connect`. +> More information: . + +- Initialize ProtonVPN profile: + +`protonvpn init` + +- Connect to ProtonVPN interactively: + +`protonvpn {{c|connect}}` + +- Display connection status: + +`protonvpn {{s|status}}` + +- Disconnect from ProtonVPN: + +`protonvpn {{d|disconnect}}` + +- Reconnect or connect to the last server used: + +`protonvpn {{r|reconnect}}` + +- Refresh OpenVPN configuration and server data: + +`protonvpn refresh` + +- Display help for a subcommand: + +`protonvpn {{subcommand}} --help` diff --git a/tldr/linux/protonvpn-connect b/tldr/linux/protonvpn-connect new file mode 100644 index 00000000..a786dc2d --- /dev/null +++ b/tldr/linux/protonvpn-connect @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# protonvpn connect + +> Connect to ProtonVPN. +> More information: . + +- Connect to ProtonVPN interactively: + +`protonvpn {{c|connect}}` + +- Connect to ProtonVPN using the fastest server available: + +`protonvpn {{c|connect}} {{-f|--fastest}}` + +- Connect to ProtonVPN using a specific server with a specific protocol: + +`protonvpn {{c|connect}} {{server_name}} -p {{udp|tcp}}` + +- Connect to ProtonVPN using a random server with a specific protocol: + +`protonvpn {{c|connect}} {{-r|--random}} -p {{udp|tcp}}` + +- Connect to ProtonVPN using the fastest Tor-supporting server: + +`protonvpn {{c|connect}} --tor` + +- Display help: + +`protonvpn connect --help` diff --git a/tldr/linux/setfattr b/tldr/linux/setfattr new file mode 100644 index 00000000..4b714ca0 --- /dev/null +++ b/tldr/linux/setfattr @@ -0,0 +1,21 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# setfattr + +> Set extended file attributes. +> More information: . + +- Set name of attribute for file: + +`setfattr -n user.{{attribute_name}} {{path/to/file}}` + +- Set a user-defined value of an extended attribute on a file: + +`setfattr -n user.{{attribute_name}} -v "{{value}}" {{path/to/file}}` + +- Remove a specific attribute of a file: + +`setfattr -x user.{{attribute_name}} {{path/to/file}}` diff --git a/tldr/linux/sysdig b/tldr/linux/sysdig new file mode 100644 index 00000000..c85eaf6e --- /dev/null +++ b/tldr/linux/sysdig @@ -0,0 +1,38 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# sysdig + +> System troubleshooting, analysis and exploration. +> Capture, filter and store systemcalls. +> More information: . + +- Capture all the events from the live system and print them to screen: + +`sysdig` + +- Capture all the events from the live system and save them to disk: + +`sysdig -w {{path/to/file}}.scap` + +- Read events from a file and print them to screen: + +`sysdig -r {{path/to/file}}.scap` + +- Filter and Print all the open system calls invoked by cat: + +`sysdig proc.name=cat and evt.type=open` + +- Register any found plugin and use dummy as input source passing to it open params: + +`sysdig -I dummy:'{{parameter}}'` + +- List the available chisels: + +`sysdig -cl` + +- Use the spy_ip chisel to look at the data exchanged with ip address: + +`sysdig -c spy_ip {{ip_address}}` diff --git a/tldr/minetest b/tldr/minetest index 8d596d1e..e2fee7a3 100644 --- a/tldr/minetest +++ b/tldr/minetest @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Multiplayer infinite-world block sandbox. > See also `minetestserver`, the server-only binary. -> More information: . +> More information: . - Start Minetest in client mode: diff --git a/tldr/minetestserver b/tldr/minetestserver index 7a959650..df00cddb 100644 --- a/tldr/minetestserver +++ b/tldr/minetestserver @@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git > Multiplayer infinite-world block sandbox server. > See also `minetest`, the graphical client. -> More information: . +> More information: . - Start the server: diff --git a/tldr/onefetch b/tldr/onefetch new file mode 100644 index 00000000..bce03f59 --- /dev/null +++ b/tldr/onefetch @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# onefetch + +> Display project information and code statistics for a local Git repository. +> More information: . + +- Display statistics for the Git repository in the current working directory: + +`onefetch` + +- Display statistics for the Git repository in the specified directory: + +`onefetch {{path/to/directory}}` + +- Ignore commits made by bots: + +`onefetch --no-bots` + +- Ignore merge commits: + +`onefetch --no-merges` + +- Don't print the ASCII art of the language logo: + +`onefetch --no-art` + +- Show `n` authors, languages, or file churns (default: 3, 6, and 3 respectively): + +`onefetch --number-of-{{authors|languages|file-churns}} {{n}}` + +- Ignore the specified files and directories: + +`onefetch {{-e|--exclude}} {{path/to/file_or_directory|regular_expression}}` + +- Only detect languages from the specified categories (default: programming and markup): + +`onefetch {{-T|--type}} {{programming|markup|prose|data}}` diff --git a/tldr/yadm-config b/tldr/yadm-config index 6535563c..93e652cf 100755 --- a/tldr/yadm-config +++ b/tldr/yadm-config @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # yadm-config > Pass options to `yadm`'s config file. Change the `.config` of the repository managed by `yadm`. -> See also: . +> More information: . - Set or update a `yadm`'s Git configuration: diff --git a/tldr/yadm-introspect b/tldr/yadm-introspect new file mode 100755 index 00000000..bc00af21 --- /dev/null +++ b/tldr/yadm-introspect @@ -0,0 +1,26 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# yadm-introspect + +> Look at data that is managed by `yadm`. +> The purpose of introspection is to support command line completion. +> More information: . + +- Output commands: + +`yadm introspect commands` + +- Output configs: + +`yadm introspect configs` + +- Output switches for the main `yadm` command: + +`yadm introspect switches` + +- Output repo: + +`yadm introspect repo` diff --git a/tldr/~ b/tldr/~ new file mode 100644 index 00000000..47aa8a8d --- /dev/null +++ b/tldr/~ @@ -0,0 +1,21 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# Tilde + +> Expand to a directory. +> More information: . + +- List the current user's home directory contents: + +`ls ~` + +- List the home directory contents of another user: + +`ls ~{{username}}` + +- List the contents of the previous directory you were in: + +`ls ~-`