Update cheatsheets

This commit is contained in:
ivuorinen
2024-10-03 00:17:01 +00:00
parent 6db54f9410
commit 2f7a186f62
16 changed files with 286 additions and 8 deletions

30
tldr/az-disk Normal file
View File

@@ -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: <https://learn.microsoft.com/cli/azure/disk>.
- 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}}`

13
tldr/builtin Normal file
View File

@@ -0,0 +1,13 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# builtin
> Execute shell builtins.
> More information: <https://manned.org/builtin.1>.
- Run a shell builtin:
`builtin {{command}}`

View File

@@ -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: <https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#colon>.

View File

@@ -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: <http://pogostick.net/~pnh/ntpasswd>.
> More information: <https://pogostick.net/~pnh/ntpasswd>.
- 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}}`

View File

@@ -23,4 +23,4 @@ source: https://github.com/tldr-pages/tldr.git
- Display help:
`notify-send --help`
`dunstify --help`

17
tldr/linux/getfattr Normal file
View File

@@ -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: <https://manned.org/getfattr>.
- 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}}`

38
tldr/linux/protonvpn Normal file
View File

@@ -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: <https://github.com/Rafficer/linux-cli-community>.
- 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`

View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# protonvpn connect
> Connect to ProtonVPN.
> More information: <https://github.com/Rafficer/linux-cli-community>.
- 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`

21
tldr/linux/setfattr Normal file
View File

@@ -0,0 +1,21 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# setfattr
> Set extended file attributes.
> More information: <https://manned.org/setfattr>.
- 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}}`

38
tldr/linux/sysdig Normal file
View File

@@ -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: <https://github.com/draios/sysdig/wiki>.
- 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}}`

View File

@@ -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: <https://wiki.minetest.net/Minetest>.
> More information: <https://wiki.minetest.org/Minetest>.
- Start Minetest in client mode:

View File

@@ -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: <https://wiki.minetest.net/Setting_up_a_server>.
> More information: <https://wiki.minetest.org/Setting_up_a_server>.
- Start the server:

41
tldr/onefetch Normal file
View File

@@ -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: <https://github.com/o2sh/onefetch/wiki>.
- 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}}`

View File

@@ -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: <https://github.com/TheLocehiliosan/yadm/blob/master/yadm.md#configuration>.
> More information: <https://github.com/TheLocehiliosan/yadm/blob/master/yadm.md#configuration>.
- Set or update a `yadm`'s Git configuration:

26
tldr/yadm-introspect Executable file
View File

@@ -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: <https://github.com/TheLocehiliosan/yadm/blob/master/yadm.md#commands>.
- 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`

21
tldr/~ Normal file
View File

@@ -0,0 +1,21 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# Tilde
> Expand to a directory.
> More information: <https://gnu.org/software/bash/manual/bash.html#Tilde-Expansion>.
- 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 ~-`