diff --git a/tldr/gallery-dl b/tldr/gallery-dl index c95ff32e..bf3dc539 100644 --- a/tldr/gallery-dl +++ b/tldr/gallery-dl @@ -12,6 +12,10 @@ source: https://github.com/tldr-pages/tldr.git `gallery-dl "{{url}}"` +- Save images to a specific directory: + +`gallery-dl --destination {{path/to/directory}} "{{url}}"` + - Retrieve pre-existing cookies from your web browser (useful for sites that require login): `gallery-dl --cookies-from-browser {{browser}} "{{url}}"` diff --git a/tldr/lazydocker b/tldr/lazydocker new file mode 100644 index 00000000..2d780557 --- /dev/null +++ b/tldr/lazydocker @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# lazydocker + +> A terminal UI for managing Docker containers, images, volumes, and more. +> More information: . + +- Open Lazydocker: + +`lazydocker` + +- Display the current default configuration: + +`lazydocker --config` + +- Run Lazydocker in debug mode: + +`lazydocker --debug` + +- Specify an alternate Docker Compose file: + +`lazydocker --file {{path/to/docker-compose.yml}}` + +- Display help: + +`lazydocker --help` + +- Display version: + +`lazydocker --version` diff --git a/tldr/let b/tldr/let new file mode 100644 index 00000000..2f333e73 --- /dev/null +++ b/tldr/let @@ -0,0 +1,26 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# let + +> Evaluate arithmetic expressions in shell. +> Supports variables, operators, and conditional expressions. +> More information: . + +- Evaluate a simple arithmetic expression: + +`let "{{result = a + b}}"` + +- Use post-increment and assignment in an expression: + +`let "{{x++}}"` + +- Use conditional operator in an expression: + +`let "{{result = (x > 10) ? x : 0}}"` + +- Display help: + +`let --help` diff --git a/tldr/linux/exch b/tldr/linux/exch new file mode 100644 index 00000000..27187f4b --- /dev/null +++ b/tldr/linux/exch @@ -0,0 +1,13 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# exch + +> Swap the filepaths and filenames of two files. +> More information: . + +- Swap filepaths: + +`exch {{path/to/file1}} {{path/to/file2}}` diff --git a/tldr/linux/lsfd b/tldr/linux/lsfd new file mode 100644 index 00000000..cad7ed5f --- /dev/null +++ b/tldr/linux/lsfd @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# lsfd + +> List open files and the corresponding processes in Linux. +> More information: . + +- List all open file descriptors: + +`lsfd` + +- List all files kept open by a specific program: + +`lsfd -Q 'PID == {{process_ID}}'` + +- Check what program has a specific file open: + +`lsfd -Q "NAME == '{{/path/to/file}}'"` + +- List open IPv4 or IPv6 sockets: + +`lsfd -i{{4|6}}` diff --git a/tldr/linux/pacman-q b/tldr/linux/pacman-q new file mode 100644 index 00000000..1e339a67 --- /dev/null +++ b/tldr/linux/pacman-q @@ -0,0 +1,12 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# pacman -Q + +> This command is an alias of `pacman --query`. + +- View documentation for the original command: + +`tldr pacman query` diff --git a/tldr/linux/pacman-query b/tldr/linux/pacman-query index af9f5f11..e55fd026 100644 --- a/tldr/linux/pacman-query +++ b/tldr/linux/pacman-query @@ -9,34 +9,34 @@ source: https://github.com/tldr-pages/tldr.git > See also: `pacman`. > More information: . -- List installed packages and versions: +- [Q]uery the local package database and list installed packages and versions: -`pacman --query` +`pacman -Q` -- List only packages and versions that were explicitly installed: +- List only packages and versions that were [e]xplicitly installed: -`pacman --query --explicit` +`pacman -Qe` -- Find which package owns a file: +- Find which package [o]wns a file: -`pacman --query --owns {{filename}}` +`pacman -Qo {{filename}}` -- Display information about an installed package: +- Display information about an [i]nstalled package: -`pacman --query --info {{package}}` +`pacman -Qi {{package}}` -- List files owned by a package: +- Display the [l]ist of files owned by a specific package: -`pacman --query --list {{package}}` +`pacman -Ql {{package}}` -- List orphan packages (installed as dependencies but not required by any package): +- List orphan packages (installed as [d]ependencies but unrequired ([t]) by any package and print in [q]uiet mode (only package name is displayed)): -`pacman --query --unrequired --deps --quiet` +`pacman -Qdtq` -- List installed packages not found in the repositories: +- List installed packages foreign ([m]) to the repository database: -`pacman --query --foreign` +`pacman -Qm` -- List outdated packages: +- List packages that can be [u]pgraded: -`pacman --query --upgrades` +`pacman -Qu` diff --git a/tldr/linux/pg b/tldr/linux/pg new file mode 100644 index 00000000..7bed5cc8 --- /dev/null +++ b/tldr/linux/pg @@ -0,0 +1,13 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# pg + +> View files one page at a time. +> More information: . + +- View a file: + +`pg {{path/to/file}}` diff --git a/tldr/osx/autoraise b/tldr/osx/autoraise new file mode 100644 index 00000000..3df8212c --- /dev/null +++ b/tldr/osx/autoraise @@ -0,0 +1,13 @@ +--- +syntax: markdown +tags: [tldr, osx] +source: https://github.com/tldr-pages/tldr.git +--- +# AutoRaise + +> Automatically raise and/or focus a window when hovering over it with the mouse. +> More information: . + +- Run AutoRaise in the background: + +`autoraise &` diff --git a/tldr/osx/bclm b/tldr/osx/bclm new file mode 100644 index 00000000..0aff7fbe --- /dev/null +++ b/tldr/osx/bclm @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, osx] +source: https://github.com/tldr-pages/tldr.git +--- +# bclm + +> Set a custom charge limit on MacBooks. +> More information: . + +- Set the charge limit to about 80% (for Intel machines, the battery charge level may be slightly lower than the set value): + +`sudo bclm write {{77}}` + +- Read the current charge limit: + +`bclm read` + +- Keep the charge limit after rebooting/smc reset: + +`sudo bclm persist` + +- Remove the persistent charge limit: + +`sudo bclm unpersist` diff --git a/tldr/set b/tldr/set index cecf8740..b2f5113d 100644 --- a/tldr/set +++ b/tldr/set @@ -35,3 +35,7 @@ source: https://github.com/tldr-pages/tldr.git - Exit the shell when (some) commands fail: `set -e` + +- Reset all shell parameters and assign new ones: + +`set -- {{argument1 argument2...}}` diff --git a/tldr/v b/tldr/v new file mode 100644 index 00000000..27af075a --- /dev/null +++ b/tldr/v @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# v + +> A tool for managing V source code. +> More information: . + +- Compile a file and output its executable: + +`v {{path/to/file.v}}` + +- Compile the current project or directory: + +`v .` + +- Compile a file and run it: + +`v run {{path/to/file.v}}` + +- Compile a file and run it, output its executable: + +`v crun {{path/to/file.v}}` + +- Re-compile on every modification to a file: + +`v watch {{path/to/file.v}}` + +- Re-run on every modification to a file: + +`v watch run {{path/to/file.v}}` + +- Open the v repl: + +`v repl` + +- Format a file and [w]rite to it: + +`v fmt -w {{path/to/file.v}}` diff --git a/tldr/{ b/tldr/{ new file mode 100644 index 00000000..9a71fbd5 --- /dev/null +++ b/tldr/{ @@ -0,0 +1,41 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# Curly brace + +> Multipurpose shell syntax. +> More information: . + +- Isolate variable names: + +`echo ${HOME}work` + +- Brace expand sequences: + +`echo {1..3} {a..c}{dir1,dir2,dir3}` + +- Check if `variable` is set before returning text: + +`echo ${variable:+variable is set and contains $variable}` + +- Set default values in case `variable` is unset: + +`echo ${variable:-default}` + +- Return `variable` length in characters: + +`echo ${#variable}` + +- Return a string slice: + +`echo ${variable:3:7}` + +- Recursively expand a `variable`: + +`echo ${!variable}` + +- Capitalize all the characters: + +`echo ${variable^^}`