mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-20 08:01:46 +00:00
Update cheatsheets
This commit is contained in:
41
tldr/bcftools
Normal file
41
tldr/bcftools
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# bcftools
|
||||
|
||||
> Tools for manipulating VCF and BCF files.
|
||||
> More information: <https://samtools.github.io/bcftools/bcftools.html>.
|
||||
|
||||
- View BCF file and convert to [v]CF on `stdout`:
|
||||
|
||||
`bcftools view {{path/to/input.bcf}} {{[-O|--output-type]}} v`
|
||||
|
||||
- Sort a VCF file variants by chromosome and position, output to a [b]CF file, and index the sorted output:
|
||||
|
||||
`bcftools sort {{path/to/input.vcf.gz}} {{[-O|--output-type]}} b {{[-o|--output]}} {{path/to/sorted.bcf}} {{[-W|--write-index]}}`
|
||||
|
||||
- Concatenate sorted VCF files that share the same samples to [z]ipped VCF on `stdout`:
|
||||
|
||||
`bcftools concat {{path/to/chr1.vcf.gz path/to/chr2.vcf.gz ...}} {{[-O|--output-type]}} z`
|
||||
|
||||
- Filter for low quality variants and annotate with "LowQual" tag in the FILTER column:
|
||||
|
||||
`bcftools filter {{[-e|--exclude]}} 'QUAL<20' {{[-s|--soft-filter]}} LowQual {{path/to/input.vcf.gz}}`
|
||||
|
||||
- Add annotated columns from a tabix-indexed table on `stdout`:
|
||||
|
||||
`bcftools annotate {{[-a|--annotations]}} {{path/to/annotations.tsv.gz}} {{[-c|--columns]}} CHROM,POS,REF,ALT,INFO/AF {{path/to/input.vcf.gz}}`
|
||||
|
||||
- Output variant [i]nter[sec]tion between VCF files using 4 threads:
|
||||
|
||||
`bcftools isec {{path/to/a.vcf.gz path/to/b.vcf.gz ...}} --threads 4 {{[-o|--output]}} {{path/to/intersection.vcf}}`
|
||||
|
||||
- Merge non-overlapping samples from VCF files without indices on `stdout`:
|
||||
|
||||
`bcftools merge {{path/to/cohort1.vcf.gz}} {{path/to/cohort2.vcf.gz}} --no-index`
|
||||
|
||||
- Create index for a bgzipped VCF file:
|
||||
|
||||
`bcftools index {{path/to/input.vcf.gz}}`
|
||||
@@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display help:
|
||||
|
||||
`docker {{[rm|container rm]}} {{[-h|--help]}}`
|
||||
`docker {{[rm|container rm]}} --help`
|
||||
|
||||
@@ -26,4 +26,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display help:
|
||||
|
||||
`docker {{[pull|image pull]}} {{[-h|--help]}}`
|
||||
`docker {{[pull|image pull]}} --help`
|
||||
|
||||
@@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Display help:
|
||||
|
||||
`docker {{[rmi|image rm]}}`
|
||||
`docker {{[rmi|image rm]}} --help`
|
||||
|
||||
30
tldr/dumpntlminfo.py
Normal file
30
tldr/dumpntlminfo.py
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# DumpNTLMInfo.py
|
||||
|
||||
> Perform NTLM authentication against a remote host without credentials and dump information leaked in the NTLMSSP message.
|
||||
> Part of the Impacket suite.
|
||||
> More information: <https://github.com/fortra/impacket>.
|
||||
|
||||
- Dump NTLM info from target (SMB, default port 445):
|
||||
|
||||
`DumpNTLMInfo.py {{target}}`
|
||||
|
||||
- Dump NTLM info using a specific IP:
|
||||
|
||||
`DumpNTLMInfo.py -target-ip {{target_ip}} {{target}}`
|
||||
|
||||
- Specify a custom port:
|
||||
|
||||
`DumpNTLMInfo.py -port {{port}} {{target}}`
|
||||
|
||||
- Dump NTLM info using RPC protocol (default port 135):
|
||||
|
||||
`DumpNTLMInfo.py -protocol RPC -port 135 {{target}}`
|
||||
|
||||
- Turn on debug output:
|
||||
|
||||
`DumpNTLMInfo.py -debug {{target}}`
|
||||
30
tldr/getst.py
Normal file
30
tldr/getst.py
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# getST.py
|
||||
|
||||
> Request a Kerberos Service Ticket (TGS).
|
||||
> Part of the Impacket suite.
|
||||
> More information: <https://github.com/fortra/impacket>.
|
||||
|
||||
- Request a service ticket for a specific SPN:
|
||||
|
||||
`getST.py {{domain}}/{{username}}:{{password}} -spn {{service}}/{{target}}`
|
||||
|
||||
- Request a ticket using NTLM hashes (pass-the-hash):
|
||||
|
||||
`getST.py -hashes {{LM_Hash}}:{{NT_Hash}} {{domain}}/{{username}} -spn {{service}}/{{target}}`
|
||||
|
||||
- Request a ticket using existing Kerberos ccache file:
|
||||
|
||||
`getST.py -no-pass -k {{domain}}/{{username}} -spn {{service}}/{{target}}`
|
||||
|
||||
- Impersonate another user via S4U2Self (requires delegation rights):
|
||||
|
||||
`getST.py -k -impersonate {{target_user}} {{domain}}/{{username}} -spn {{service}}/{{target}}`
|
||||
|
||||
- Force the ticket to be forwardable (Bronze Bit):
|
||||
|
||||
`getST.py -force-forwardable -k {{domain}}/{{username}} -spn {{service}}/{{target}}`
|
||||
41
tldr/haproxy
Normal file
41
tldr/haproxy
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# haproxy
|
||||
|
||||
> Fast and reliable HTTP reverse proxy and load balancer.
|
||||
> More information: <https://manned.org/haproxy>.
|
||||
|
||||
- Check configuration file for validity:
|
||||
|
||||
`haproxy -c -f {{path/to/haproxy.cfg}}`
|
||||
|
||||
- Start HAProxy with a configuration file:
|
||||
|
||||
`haproxy -f {{path/to/haproxy.cfg}}`
|
||||
|
||||
- Start in daemon mode:
|
||||
|
||||
`haproxy -D -f {{path/to/haproxy.cfg}}`
|
||||
|
||||
- Start in master-worker mode:
|
||||
|
||||
`haproxy -W -f {{path/to/haproxy.cfg}}`
|
||||
|
||||
- Start with debugging mode enabled (foreground, verbose output):
|
||||
|
||||
`haproxy -d -f {{path/to/haproxy.cfg}}`
|
||||
|
||||
- Reload configuration with graceful shutdown of old process:
|
||||
|
||||
`haproxy -f {{path/to/haproxy.cfg}} -sf {{pid}}`
|
||||
|
||||
- Set maximum number of simultaneous connections:
|
||||
|
||||
`haproxy -f {{path/to/haproxy.cfg}} -n {{maxconn}}`
|
||||
|
||||
- Reload with zero downtime by reusing sockets from old process:
|
||||
|
||||
`haproxy -f {{path/to/haproxy.cfg}} -x {{path/to/haproxy.sock}} -sf {{pid}}`
|
||||
29
tldr/hlsq
Normal file
29
tldr/hlsq
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# hlsq
|
||||
|
||||
> Display HLS manifests with color and basic filtering.
|
||||
> More information: <https://github.com/soldiermoth/hlsq/>.
|
||||
|
||||
- View an HLS manifest from a URL:
|
||||
|
||||
`{{curl --silent url}} | hlsq`
|
||||
|
||||
- View an HLS manifest from a file:
|
||||
|
||||
`{{cat path/to/file.m3u8}} | hlsq`
|
||||
|
||||
- Continuously refetch a URL and update the output:
|
||||
|
||||
`hlsq -watch -url {{url}}`
|
||||
|
||||
- Filter a multivariant playlist by an attribute's string value:
|
||||
|
||||
`{{cat path/to/file.m3u8}} | hlsq -query '{{type = SUBTITLES}}'`
|
||||
|
||||
- Filter a multivariant playlist by an attribute's numeric value:
|
||||
|
||||
`{{cat path/to/file.m3u8}} | hlsq -query '{{bandwidth > 1000000}}'`
|
||||
12
tldr/impacket-dumpntlminfo
Normal file
12
tldr/impacket-dumpntlminfo
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# impacket-DumpNTLMInfo
|
||||
|
||||
> This command is an alias of `DumpNTLMInfo.py`.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
`tldr DumpNTLMInfo.py`
|
||||
12
tldr/impacket-getst
Normal file
12
tldr/impacket-getst
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# impacket-getST
|
||||
|
||||
> This command is an alias of `getST.py`.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
`tldr getST.py`
|
||||
@@ -14,11 +14,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Wait for all pods with a certain [l]abel to be ready:
|
||||
|
||||
`kubectl wait --for condition=ready pod {{[-l|--selector]}} {{label_key}}={{label_value}}`
|
||||
`kubectl wait --for condition=ready {{[po|pods]}} {{[-l|--selector]}} {{label_key}}={{label_value}}`
|
||||
|
||||
- Wait for a pod to be deleted:
|
||||
|
||||
`kubectl wait --for delete pod {{pod_name}}`
|
||||
`kubectl wait --for delete {{[po|pods]}} {{pod_name}}`
|
||||
|
||||
- Wait for a job to complete, within 120 seconds (if the condition isn't met on time, the exit status will be unsuccessful):
|
||||
|
||||
|
||||
17
tldr/linux/spa-json-dump
Normal file
17
tldr/linux/spa-json-dump
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# spa-json-dump
|
||||
|
||||
> Convert a SPA JSON file to standard JSON.
|
||||
> More information: <https://docs.pipewire.org/page_man_spa-json-dump_1.html>.
|
||||
|
||||
- Convert a SPA JSON file to standard JSON:
|
||||
|
||||
`spa-json-dump {{path/to/file.conf}}`
|
||||
|
||||
- Convert SPA JSON from `stdin` to standard JSON:
|
||||
|
||||
`echo "{{spa_json_string}}" | spa-json-dump`
|
||||
@@ -10,8 +10,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Update the operating system:
|
||||
|
||||
`steamos-update`
|
||||
`sudo steamos-update`
|
||||
|
||||
- Check if there is an update available:
|
||||
|
||||
`steamos-update check`
|
||||
`sudo steamos-update check`
|
||||
|
||||
@@ -35,7 +35,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- List all service/socket/automount units filtering by running/failed state:
|
||||
|
||||
`systemctl list-units {{[-t|--type]}} {{service|socket|automount}} --state {{failed|running}}`
|
||||
`systemctl list-units {{[-t|--type]}} {{service|socket|automount|...}} --state {{failed|running}}`
|
||||
|
||||
- Show the contents & absolute path of a unit file or edit it:
|
||||
|
||||
|
||||
@@ -36,3 +36,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- List bookmarks:
|
||||
|
||||
`<:>blist<Enter>`
|
||||
|
||||
- Follow links:
|
||||
|
||||
`<f>{{link_number}}<Enter>`
|
||||
|
||||
38
tldr/raku
Normal file
38
tldr/raku
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# raku
|
||||
|
||||
> Rakudo Raku (formerly Perl 6) programming language interpreter.
|
||||
> See also: `perl`.
|
||||
> More information: <https://manned.org/raku>.
|
||||
|
||||
- Execute a Raku script:
|
||||
|
||||
`raku {{path/to/script.raku}}`
|
||||
|
||||
- Execute a single Raku command:
|
||||
|
||||
`raku -e "{{command}}"`
|
||||
|
||||
- Check syntax only (runs BEGIN and CHECK blocks):
|
||||
|
||||
`raku -c {{path/to/script.raku}}`
|
||||
|
||||
- Start a REPL (interactive shell):
|
||||
|
||||
`raku`
|
||||
|
||||
- Load a module before running the program:
|
||||
|
||||
`raku -M {{module_name}} {{path/to/script.raku}}`
|
||||
|
||||
- Add a path to the module search path:
|
||||
|
||||
`raku -I {{path/to/module_directory}} {{path/to/script.raku}}`
|
||||
|
||||
- Extract and display documentation from a script:
|
||||
|
||||
`raku --doc {{path/to/script.raku}}`
|
||||
37
tldr/smbclient
Normal file
37
tldr/smbclient
Normal file
@@ -0,0 +1,37 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# smbclient
|
||||
|
||||
> FTP-like client to access SMB/CIFS resources on servers.
|
||||
> More information: <https://manned.org/smbclient>.
|
||||
|
||||
- List available shares on a server anonymously:
|
||||
|
||||
`smbclient {{[-L|--list]}} {{server}} --no-pass`
|
||||
|
||||
- Connect to a share (will prompt for a password):
|
||||
|
||||
`smbclient //{{server}}/{{share}}`
|
||||
|
||||
- Connect to a share as a specific user:
|
||||
|
||||
`smbclient {{[-U|--user]}} {{domain/username}} //{{server}}/{{share}}`
|
||||
|
||||
- Connect to a share as a specific user with inline password:
|
||||
|
||||
`smbclient {{[-U|--user]}} {{domain/username%password}} //{{server}}/{{share}}`
|
||||
|
||||
- Connect to a share using a specific workgroup:
|
||||
|
||||
`smbclient {{[-W|--workgroup]}} {{domain}} {{[-U|--user]}} {{username}} //{{server}}/{{share}}`
|
||||
|
||||
- Download a file from a specific directory on a share:
|
||||
|
||||
`smbclient {{[-U|--user]}} {{domain/username}} //{{server}}/{{share}} {{[-D|--directory]}} {{path/to/directory}} {{[-c|--command]}} 'get {{filename}}'`
|
||||
|
||||
- Upload a file to a specific directory on a share:
|
||||
|
||||
`smbclient {{[-U|--user]}} {{domain/username}} //{{server}}/{{share}} {{[-D|--directory]}} {{path/to/directory}} {{[-c|--command]}} 'put {{path/to/local_file}}'`
|
||||
@@ -37,6 +37,6 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo {{[-i|--login]}} {{[-u|--user]}} {{user}}`
|
||||
|
||||
- List the allowed (and forbidden) commands for the invoking user:
|
||||
- List the allowed (and forbidden) commands for the invoking user in longer format:
|
||||
|
||||
`sudo {{[-ll|--list --list]}}`
|
||||
|
||||
Reference in New Issue
Block a user