diff --git a/tldr/bcftools b/tldr/bcftools new file mode 100644 index 00000000..463bfcc8 --- /dev/null +++ b/tldr/bcftools @@ -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: . + +- 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}}` diff --git a/tldr/docker-container-rm b/tldr/docker-container-rm index 1e1a266b..517be207 100644 --- a/tldr/docker-container-rm +++ b/tldr/docker-container-rm @@ -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` diff --git a/tldr/docker-image-pull b/tldr/docker-image-pull index 514f215a..d05a229e 100644 --- a/tldr/docker-image-pull +++ b/tldr/docker-image-pull @@ -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` diff --git a/tldr/docker-image-rm b/tldr/docker-image-rm index 3209356a..e7ffc481 100644 --- a/tldr/docker-image-rm +++ b/tldr/docker-image-rm @@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git - Display help: -`docker {{[rmi|image rm]}}` +`docker {{[rmi|image rm]}} --help` diff --git a/tldr/dumpntlminfo.py b/tldr/dumpntlminfo.py new file mode 100644 index 00000000..94c3f737 --- /dev/null +++ b/tldr/dumpntlminfo.py @@ -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: . + +- 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}}` diff --git a/tldr/getst.py b/tldr/getst.py new file mode 100644 index 00000000..45a1e28b --- /dev/null +++ b/tldr/getst.py @@ -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: . + +- 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}}` diff --git a/tldr/haproxy b/tldr/haproxy new file mode 100644 index 00000000..b46af007 --- /dev/null +++ b/tldr/haproxy @@ -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: . + +- 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}}` diff --git a/tldr/hlsq b/tldr/hlsq new file mode 100644 index 00000000..77a44f3b --- /dev/null +++ b/tldr/hlsq @@ -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: . + +- 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}}'` diff --git a/tldr/impacket-dumpntlminfo b/tldr/impacket-dumpntlminfo new file mode 100644 index 00000000..e55d3e0d --- /dev/null +++ b/tldr/impacket-dumpntlminfo @@ -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` diff --git a/tldr/impacket-getst b/tldr/impacket-getst new file mode 100644 index 00000000..eeddca0f --- /dev/null +++ b/tldr/impacket-getst @@ -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` diff --git a/tldr/kubectl-wait b/tldr/kubectl-wait index eb1c8eaf..c07e5737 100644 --- a/tldr/kubectl-wait +++ b/tldr/kubectl-wait @@ -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): diff --git a/tldr/linux/spa-json-dump b/tldr/linux/spa-json-dump new file mode 100644 index 00000000..3893fc88 --- /dev/null +++ b/tldr/linux/spa-json-dump @@ -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: . + +- 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` diff --git a/tldr/linux/steamos-update b/tldr/linux/steamos-update index 0404ab68..395c6acc 100644 --- a/tldr/linux/steamos-update +++ b/tldr/linux/steamos-update @@ -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` diff --git a/tldr/linux/systemctl b/tldr/linux/systemctl index f6b99192..be924334 100644 --- a/tldr/linux/systemctl +++ b/tldr/linux/systemctl @@ -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: diff --git a/tldr/linux/zathura b/tldr/linux/zathura index 7420a413..61d12058 100644 --- a/tldr/linux/zathura +++ b/tldr/linux/zathura @@ -36,3 +36,7 @@ source: https://github.com/tldr-pages/tldr.git - List bookmarks: `<:>blist` + +- Follow links: + +`{{link_number}}` diff --git a/tldr/raku b/tldr/raku new file mode 100644 index 00000000..cf32b071 --- /dev/null +++ b/tldr/raku @@ -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: . + +- 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}}` diff --git a/tldr/smbclient b/tldr/smbclient new file mode 100644 index 00000000..a3204fe1 --- /dev/null +++ b/tldr/smbclient @@ -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: . + +- 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}}'` diff --git a/tldr/sudo b/tldr/sudo index da6520a4..2bfbcab6 100644 --- a/tldr/sudo +++ b/tldr/sudo @@ -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]}}`