diff --git a/tldr/conda-activate b/tldr/conda-activate new file mode 100644 index 00000000..1f0ce371 --- /dev/null +++ b/tldr/conda-activate @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# conda activate + +> Activate a conda environment. +> See also: `conda deactivate` to deactivate a conda environment. +> More information: . + +- Activate an existing environment named `myenv`: + +`conda activate myenv` + +- Activate an existing environment located at custom path: + +`conda activate {{path/to/myenv}}` + +- Stack `myenv` environment on top of a previous environment making libraries/commands/variables from both accessible: + +`conda activate --stack myenv` + +- Start a clean environment `myenv` without stacking it making previous environment libraries/commands/variables not accessible: + +`conda activate --no-stack myenv` + +- Display help: + +`conda activate {{[-h|--help]}}` diff --git a/tldr/conda-clean b/tldr/conda-clean new file mode 100644 index 00000000..bf2f8009 --- /dev/null +++ b/tldr/conda-clean @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# conda clean + +> Delete temporary or unused files: index cache, lock files, unused cache packages, tarballs, and log files. +> More information: . + +- Delete all temporary or unused files verbosely and say yes to all confirmations: + +`conda clean {{[-avy|--all --verbose --yes]}}` + +- Delete only index cache, tarballs, and log files: + +`conda clean {{[-itl|--index-cache --tarballs --logfiles]}}` + +- Delete only temporary [c]ache files that could not be deleted earlier due to being in use: + +`conda clean {{[-c|--tempfiles]}} {{path/to/tempfiles}}` + +- Delete only unused packages. Might delete packages installed with softlinks: + +`conda clean {{[-p|--packages]}}` + +- Force delete all writable packages. More broad than the `--all` option. Will delete packages installed with softlinks: + +`conda clean {{[-f|--force-pkgs-dirs]}}` + +- Display help: + +`conda clean {{[-h|--help]}}` diff --git a/tldr/conda-compare b/tldr/conda-compare new file mode 100644 index 00000000..768063c5 --- /dev/null +++ b/tldr/conda-compare @@ -0,0 +1,25 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# conda compare + +> Compare packages between conda environments. +> More information: . + +- Compare packages in the current directory to packages from the file `file.yml`: + +`conda compare file.yml` + +- Compare packages in environment named `myenv` to packages from the file `file.yml`: + +`conda compare {{[-n|--name]}} myenv {{path/to/file.yml}}` + +- Compare packages in environment `myenv` at custom path (i.e. prefix) to packages from the file `file.yml`: + +`conda compare {{[-p|--prefix]}} {{path/to/myenv}} {{path/to/file.yml}}` + +- Display help: + +`conda create {{[-h|--help]}}` diff --git a/tldr/conda-create b/tldr/conda-create index aa7c540d..3678ffa8 100644 --- a/tldr/conda-create +++ b/tldr/conda-create @@ -8,14 +8,22 @@ source: https://github.com/tldr-pages/tldr.git > Create new conda environments. > More information: . -- Create a new environment named `py39`, and install Python 3.9 and NumPy v1.11 or above in it: +- Create a new environment named `py39`, install Python 3.9, NumPy v1.11 or above in it, and the latest stable version of SciPy. Say yes to all confirmations: -`conda create {{[-y|--yes]}} {{[-n|--name]}} {{py39}} python={{3.9}} "{{numpy>=1.11}}"` +`conda create {{[-ny|--name --yes]}} {{py39}} python={{3.9}} "{{numpy>=1.11 scipy}}"` -- Make exact copy of an environment: +- Create a new environment named `myenv` and install packages listed in files: -`conda create --clone {{py39}} {{[-n|--name]}} {{py39-copy}}` +`conda create {{[-n|--name]}} myenv --file {{file1.yml}} --file {{file2.yml}}` -- Create a new environment with a specified name and install a given package: +- Create a new environment named `myenv` at custom path (i.e. prefix): -`conda create {{[-n|--name]}} {{env_name}} {{package}}` +`conda create {{[-p|--prefix]}} {{path/to/myenv}}` + +- Make exact copy of an environment named `py39`: + +`conda create --clone py39 {{[-n|--name]}} {{py39-copy}}` + +- Display help: + +`conda create {{[-h|--help]}}` diff --git a/tldr/createuser b/tldr/createuser new file mode 100644 index 00000000..18ca1dd3 --- /dev/null +++ b/tldr/createuser @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, common] +source: https://github.com/tldr-pages/tldr.git +--- +# createuser + +> Create a PostgreSQL user (role). +> More information: . + +- Create a user interactively: + +`createuser --interactive {{username}}` + +- Create a user with no special rights: + +`createuser {{username}}` + +- Create a superuser: + +`createuser {{[-s|--superuser]}} {{username}}` + +- Create a user allowed to create databases, manage roles, and prompt for a password: + +`createuser {{[-d|--createdb]}} {{[-r|--createrole]}} {{[-P|--pwprompt]}} {{username}}` + +- Create a user without the ability to create databases or manage roles: + +`createuser {{[-D|--no-createdb]}} {{[-R|--no-createrole]}} {{username}}` diff --git a/tldr/git-show b/tldr/git-show index 29cef525..f1763159 100644 --- a/tldr/git-show +++ b/tldr/git-show @@ -16,6 +16,10 @@ source: https://github.com/tldr-pages/tldr.git `git show {{commit|tag|branch}}` +- Show only the list of added, renamed or deleted files: + +`git show --summary {{commit}}` + - Show information about the 3rd commit from the HEAD of a branch: `git show {{branch}}~{{3}}` @@ -32,10 +36,6 @@ source: https://github.com/tldr-pages/tldr.git `git show --name-only {{commit}}` -- Show only the list of added, renamed or deleted files: - -`git show --summary {{commit}}` - - Show the contents of a file as it was at a given revision (e.g. branch, tag or commit): `git show {{revision}}:{{path/to/file}}` diff --git a/tldr/git-subtree b/tldr/git-subtree index 5c53bfd5..4df7921f 100644 --- a/tldr/git-subtree +++ b/tldr/git-subtree @@ -5,25 +5,25 @@ source: https://github.com/tldr-pages/tldr.git --- # git subtree -> Manage project dependencies as subprojects. +> Merge subtrees together or split repository into subtrees. > More information: . -- Add a Git repository as a subtree: +- Add a Git repository as a subtree and squash the commits together: -`git subtree add {{[-P|--prefix]}} {{path/to/directory}}/ --squash {{repository_url}} {{branch_name}}` +`git subtree add {{[-P|--prefix]}} {{path/to/directory}} --squash {{repository_url}} {{branch_name}}` - Update subtree repository to its latest commit: -`git subtree pull {{[-P|--prefix]}} {{path/to/directory}}/ {{repository_url}} {{branch_name}}` +`git subtree pull {{[-P|--prefix]}} {{path/to/directory}} {{repository_url}} {{branch_name}}` - Merge recent changes up to the latest subtree commit into the subtree: -`git subtree merge {{[-P|--prefix]}} {{path/to/directory}}/ --squash {{repository_url}} {{branch_name}}` +`git subtree merge {{[-P|--prefix]}} {{path/to/directory}} --squash {{repository_url}} {{branch_name}}` - Push commits to a subtree repository: -`git subtree push {{[-P|--prefix]}} {{path/to/directory}}/ {{repository_url}} {{branch_name}}` +`git subtree push {{[-P|--prefix]}} {{path/to/directory}} {{repository_url}} {{branch_name}}` - Extract a new project history from the history of a subtree: -`git subtree split {{[-P|--prefix]}} {{path/to/directory}}/ {{repository_url}} {{[-b|--branch]}} {{branch_name}}` +`git subtree split {{[-P|--prefix]}} {{path/to/directory}} {{repository_url}} {{[-b|--branch]}} {{branch_name}}` diff --git a/tldr/linux/lvmpolld b/tldr/linux/lvmpolld new file mode 100644 index 00000000..9f81412c --- /dev/null +++ b/tldr/linux/lvmpolld @@ -0,0 +1,33 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# lvmpolld + +> LVM poll daemon that supervises long-running LVM operations. +> More information: . + +- Start the daemon in the foreground: + +`lvmpolld {{[-f|--foreground]}}` + +- Start in the foreground with debug logging: + +`lvmpolld {{[-f|--foreground]}} {{[-l|--log]}} debug` + +- Set the idle shutdown timeout (seconds): + +`lvmpolld {{[-t|--timeout]}} {{300}}` + +- Use a custom socket path: + +`lvmpolld {{[-s|--socket]}} {{/tmp/lvmpolld.socket}}` + +- Use a custom PID file: + +`lvmpolld {{[-p|--pidfile]}} {{/tmp/lvmpolld.pid}}` + +- Dump the current state: + +`lvmpolld --dump` diff --git a/tldr/nodemon b/tldr/nodemon index 80e6e51a..e63c4361 100644 --- a/tldr/nodemon +++ b/tldr/nodemon @@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git # nodemon > Watch files and automatically restart a node application when changes are detected. -> More information: . +> More information: . - Execute the specified file and watch a specific file for changes: @@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git - Ignore specific files: -`nodemon --ignore {{path/to/file_or_directory}}` +`nodemon {{[-i|--ignore]}} {{path/to/file_or_directory}}` - Pass arguments to the node application: @@ -30,8 +30,8 @@ source: https://github.com/tldr-pages/tldr.git - Run an arbitrary non-node script: -`nodemon --exec "{{command_to_run_script}} {{options}}" {{path/to/script}}` +`nodemon {{[-x|--exec]}} "{{command_to_run_script}} {{options}}" {{path/to/script}}` - Run a Python script: -`nodemon --exec "python {{options}}" {{path/to/file.py}}` +`nodemon {{[-x|--exec]}} "python {{options}}" {{path/to/file.py}}`