Update cheatsheets

This commit is contained in:
ivuorinen
2024-12-06 00:18:56 +00:00
parent 77dfd9ece3
commit 183ddc3482
16 changed files with 18 additions and 18 deletions

View File

@@ -35,4 +35,4 @@ source: https://github.com/tldr-pages/tldr.git
- Install certificate files into the specified locations (useful for automatic certificate renewal):
`acme.sh --install-cert -d {{example.com}} --key-file {{/path/to/example.com.key}} --fullchain-file {{/path/to/example.com.cer}} --reloadcmd {{"systemctl force-reload nginx"}}`
`acme.sh --install-cert -d {{example.com}} --key-file {{/path/to/example.com.key}} --fullchain-file {{/path/to/example.com.cer}} --reloadcmd "{{systemctl force-reload nginx}}"`

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# chmod
> Change the access permissions of a file or directory.
> More information: <https://www.gnu.org/software/coreutils/chmod>.
> More information: <https://www.gnu.org/software/coreutils/manual/html_node/chmod-invocation.html>.
- Give the [u]ser who owns a file the right to e[x]ecute it:

View File

@@ -26,7 +26,7 @@ source: https://github.com/tldr-pages/tldr.git
- Reset to default text editor:
`gh config set editor {{""}}`
`gh config set editor ""`
- Disable interactive prompts:

View File

@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
- Specify a copyright holder named Bobby Tables:
`licensor {{MIT}} {{"Bobby Tables"}} > {{LICENSE}}`
`licensor {{MIT}} "{{Bobby Tables}}" > {{LICENSE}}`
- Specify licence exceptions with a WITH expression:

View File

@@ -34,4 +34,4 @@ source: https://github.com/tldr-pages/tldr.git
- Configure KRunner to open with the Meta (Command/Windows) global hotkey:
`kwriteconfig5 --file {{~/.config/kwinrc}} --group {{ModifierOnlyShortcuts}} --key {{Meta}} {{"org.kde.kglobalaccel,/component/krunner_desktop,org.kde.kglobalaccel.Component,invokeShortcut,_launch"}}`
`kwriteconfig5 --file {{~/.config/kwinrc}} --group {{ModifierOnlyShortcuts}} --key {{Meta}} "{{org.kde.kglobalaccel,/component/krunner_desktop,org.kde.kglobalaccel.Component,invokeShortcut,_launch}}"`

View File

@@ -18,4 +18,4 @@ source: https://github.com/tldr-pages/tldr.git
- Set the wallpaper to a static [c]olor:
`swaybg --color {{"#rrggbb"}}`
`swaybg --color "{{#rrggbb}}"`

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Send data through a named pipe and send the command to the background:
`echo {{"Hello World"}} > {{path/to/pipe}} &`
`echo "{{Hello World}}" > {{path/to/pipe}} &`
- Receive data through a named pipe:

View File

@@ -38,4 +38,4 @@ source: https://github.com/tldr-pages/tldr.git
- Run scan based on one or more [t]emplate [c]onditions:
`nuclei -tc {{"contains(tags, 'xss') && contains(tags, 'cve')"}} -u {{https://vulnerable.website}}`
`nuclei -tc "{{contains(tags, 'xss') && contains(tags, 'cve')}}" -u {{https://vulnerable.website}}`

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- Create a completion:
`openai api completions.create --model {{ada}} --prompt {{"Hello world"}}`
`openai api completions.create --model {{ada}} --prompt "{{Hello world}}"`
- Create a chat completion:
@@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git
- Generate images via DALL·E API:
`openai api image.create --prompt {{"two dogs playing chess, cartoon"}} --num-images {{1}}`
`openai api image.create --prompt "{{two dogs playing chess, cartoon}}" --num-images {{1}}`

View File

@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
- Assign multiple values to multiple variables:
`read {{_ variable1 _ variable2}} <<< {{"The surname is Bond"}}`
`read {{_ variable1 _ variable2}} <<< "{{The surname is Bond}}"`
- Do not let backslash (\) act as an escape character:

View File

@@ -34,4 +34,4 @@ source: https://github.com/tldr-pages/tldr.git
- Display text with formatting tags, custom alignment, and line width:
`rich --print {{"Hello [green on black]Stylized[/green on black] [bold]World[/bold]"}} --{{left|center|right}} --width {{10}}`
`rich --print "{{Hello [green on black]Stylized[/green on black] [bold]World[/bold]}}" --{{left|center|right}} --width {{10}}`

View File

@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
- Test with multiple ranges:
`semver {{1.2.3}} --range {{">=1.0"}} {{"<2.0"}}`
`semver {{1.2.3}} --range "{{>=1.0}}" "{{<2.0}}"`
- Test multiple version strings and return only the ones that match:

View File

@@ -38,4 +38,4 @@ source: https://github.com/tldr-pages/tldr.git
- Generate output with a SARIF template:
`trivy image --format {{template}} --template {{"@sarif.tpl"}} -o {{path/to/report.sarif}} {{image:tag}}`
`trivy image --format {{template}} --template "{{@sarif.tpl}}" -o {{path/to/report.sarif}} {{image:tag}}`

View File

@@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git
- Create a virtual machine and kickstart an automated deployment based on Fedora 35 using only remote resources (no ISO required):
`virt-install --name {{vm_name}} --memory {{2048}} --disk path={{path/to/image.qcow2}},size={{20}} --location={{https://download.fedoraproject.org/pub/fedora/linux/releases/35/Everything/x86_64/os/}} --extra-args={{"inst.ks=https://path/to/valid/kickstart.org"}}`
`virt-install --name {{vm_name}} --memory {{2048}} --disk path={{path/to/image.qcow2}},size={{20}} --location={{https://download.fedoraproject.org/pub/fedora/linux/releases/35/Everything/x86_64/os/}} --extra-args="{{inst.ks=https://path/to/valid/kickstart.org}}"`

View File

@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
- Use a custom [H]eader to fuzz subdomains while [h]iding specific response [c]odes and word counts. Increase the [t]hreads to 100 and include the target ip/domain:
`wfuzz -w {{path/to/file}} -H {{"Host: FUZZ.example.com"}} --hc {{301}} --hw {{222}} -t {{100}} {{example.com}}`
`wfuzz -w {{path/to/file}} -H "{{Host: FUZZ.example.com}}" --hc {{301}} --hw {{222}} -t {{100}} {{example.com}}`
- Brute force Basic Authentication using a list of usernames and passwords from files for each FUZ[z] keyword, [h]iding response [c]odes of unsuccessful attempts:
@@ -30,7 +30,7 @@ source: https://github.com/tldr-pages/tldr.git
- Provide wordlist directly from the command-line and use POST request for fuzzing:
`wfuzz -z list,{{word1-word2-...}} {{https://api.example.com}} -d {{"id=FUZZ&showwallet=true"}}`
`wfuzz -z list,{{word1-word2-...}} {{https://api.example.com}} -d "{{id=FUZZ&showwallet=true}}"`
- Provide wordlists from a file applying base64 and md5 encoding on them (`wfuzz -e encoders` lists all available encoders):

View File

@@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
- Render markdown to console from string:
`{{"# Markdown content"}} | Show-Markdown`
`"{{# Markdown content}}" | Show-Markdown`
- Open Markdown file in a browser: