mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
Update cheatsheets
This commit is contained in:
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# behat
|
||||
|
||||
> A PHP framework for Behaviour-Driven Development.
|
||||
> More information: <https://behat.org>.
|
||||
> More information: <https://docs.behat.org/en/latest/user_guide/command_line_tool.html>.
|
||||
|
||||
- Initialize a new Behat project:
|
||||
|
||||
|
||||
2
tldr/cf
2
tldr/cf
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# cf
|
||||
|
||||
> Manage apps and services on Cloud Foundry.
|
||||
> More information: <https://docs.cloudfoundry.org>.
|
||||
> More information: <https://docs.cloudfoundry.org/cf-cli/getting-started.html>.
|
||||
|
||||
- Log in to the Cloud Foundry API:
|
||||
|
||||
|
||||
12
tldr/cloc
12
tldr/cloc
@@ -5,25 +5,21 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# cloc
|
||||
|
||||
> Count, and compute differences of, lines of source code and comments.
|
||||
> More information: <https://github.com/AlDanial/cloc#basic-use->.
|
||||
> Count lines of code.
|
||||
> More information: <https://github.com/AlDanial/cloc#options->.
|
||||
|
||||
- Count all the lines of code in a directory:
|
||||
|
||||
`cloc {{path/to/directory}}`
|
||||
|
||||
- Count all the lines of code in a directory, displaying a progress bar during the counting process:
|
||||
|
||||
`cloc --progress=1 {{path/to/directory}}`
|
||||
|
||||
- Compare 2 directory structures and count the differences between them:
|
||||
|
||||
`cloc --diff {{path/to/directory/one}} {{path/to/directory/two}}`
|
||||
`cloc --diff {{path/to/directory1}} {{path/to/directory2}}`
|
||||
|
||||
- Ignore files that are ignored by VCS, such as files specified in `.gitignore`:
|
||||
|
||||
`cloc --vcs git {{path/to/directory}}`
|
||||
|
||||
- Count all the lines of code in a directory, displaying the results for each file instead of each language:
|
||||
- Display the results for each file instead of each language:
|
||||
|
||||
`cloc --by-file {{path/to/directory}}`
|
||||
|
||||
25
tldr/conda-remove
Normal file
25
tldr/conda-remove
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# conda remove
|
||||
|
||||
> Remove packages from a conda environment.
|
||||
> More information: <https://docs.conda.io/projects/conda/en/latest/commands/remove.html>.
|
||||
|
||||
- Remove `scipy` from the currently active environment:
|
||||
|
||||
`conda remove scipy`
|
||||
|
||||
- Remove a list of packages from the specified environment:
|
||||
|
||||
`conda remove {{[-n|--name]}} {{environment_name}} {{package1 package2 ...}}`
|
||||
|
||||
- Remove all packages and the environment itself:
|
||||
|
||||
`conda remove {{[-n|--name]}} {{environment_name}} --all`
|
||||
|
||||
- Remove all packages, but keep the environment:
|
||||
|
||||
`conda remove {{[-n|--name]}} {{environment_name}} --all --keep-env`
|
||||
21
tldr/conda-repoquery
Normal file
21
tldr/conda-repoquery
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# conda repoquery
|
||||
|
||||
> Advanced search for packages in a conda repository.
|
||||
> More information: <https://docs.conda.io/projects/conda/en/latest/commands/repoquery/index.html>.
|
||||
|
||||
- Show available versions of the specified package:
|
||||
|
||||
`conda repoquery search {{package}}`
|
||||
|
||||
- Show dependencies of the specified package:
|
||||
|
||||
`conda repoquery depends {{package}}`
|
||||
|
||||
- Show packages that depend on the specified package:
|
||||
|
||||
`conda repoquery whoneeds {{package}}`
|
||||
21
tldr/conda-run
Normal file
21
tldr/conda-run
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# conda run
|
||||
|
||||
> Run an executable command in a conda environment.
|
||||
> More information: <https://docs.conda.io/projects/conda/en/latest/commands/run.html>.
|
||||
|
||||
- Run a command in the currently active environment:
|
||||
|
||||
`conda run {{command}}`
|
||||
|
||||
- Target an environment by name:
|
||||
|
||||
`conda run {{[-n|--name]}} {{environment_name}} {{command}}`
|
||||
|
||||
- Target an environment by its path (i.e. prefix):
|
||||
|
||||
`conda run {{[-p|--path]}} {{path/to/env}} {{command}}`
|
||||
4
tldr/gh
4
tldr/gh
@@ -23,7 +23,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- View an issue in the default web browser:
|
||||
|
||||
`gh issue view {{[-w|--web]}} {{issue_number}}`
|
||||
`gh issue view {{[-w|--web]}} {{issue_number|url}}`
|
||||
|
||||
- Create a pull request:
|
||||
|
||||
@@ -31,7 +31,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- View a pull request in the default web browser:
|
||||
|
||||
`gh pr view {{[-w|--web]}} {{pr_number}}`
|
||||
`gh pr view {{[-w|--web]}} {{pr_number|url|branch}}`
|
||||
|
||||
- Check out a specific pull request locally:
|
||||
|
||||
|
||||
33
tldr/gh-copilot
Normal file
33
tldr/gh-copilot
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# gh copilot
|
||||
|
||||
> Interact with GitHub Copilot.
|
||||
> More information: <https://github.com/github/gh-copilot#usage>.
|
||||
|
||||
- Suggest a command, given a description:
|
||||
|
||||
`gh copilot suggest "{{Install git}}"`
|
||||
|
||||
- Suggest a Git command:
|
||||
|
||||
`gh copilot suggest {{[-t|--target]}} git "{{Undo the most recent local commits}}"`
|
||||
|
||||
- Explain a command:
|
||||
|
||||
`gh copilot explain "{{traceroute example.com}}"`
|
||||
|
||||
- Generate shell-specific aliases for Bash:
|
||||
|
||||
`echo 'eval "$(gh copilot alias -- bash)"' >> ~/.bashrc`
|
||||
|
||||
- Generate shell-specific aliases for Zsh:
|
||||
|
||||
`echo 'eval "$(gh copilot alias -- zsh)"' >> ~/.zshrc`
|
||||
|
||||
- Configure options:
|
||||
|
||||
`gh copilot config`
|
||||
25
tldr/linux/emaint
Normal file
25
tldr/linux/emaint
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# emaint
|
||||
|
||||
> Perform Portage maintenance tasks.
|
||||
> More information: <https://wiki.gentoo.org/wiki/Portage#emaint>.
|
||||
|
||||
- Synchronize repositories that are set to auto-sync (default for most repositories):
|
||||
|
||||
`sudo emaint sync {{[-a|--auto]}}`
|
||||
|
||||
- Synchronize a specific repository:
|
||||
|
||||
`sudo emaint sync {{[-r|--repo]}} {{repository}}`
|
||||
|
||||
- Clear the Portage resume list:
|
||||
|
||||
`sudo emaint cleanresume {{[-f|--fix]}}`
|
||||
|
||||
- Clean Portage logs:
|
||||
|
||||
`sudo emaint logs {{[-C|--clean]}}`
|
||||
17
tldr/linux/lvmsadc
Normal file
17
tldr/linux/lvmsadc
Normal file
@@ -0,0 +1,17 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, linux]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# lvmsadc
|
||||
|
||||
> LVM system activity data collector (not supported under LVM2; prefer `dmstats`).
|
||||
> More information: <https://manned.org/lvmsadc>.
|
||||
|
||||
- Run the collector (legacy LVM1 systems only):
|
||||
|
||||
`lvmsadc`
|
||||
|
||||
- Report I/O statistics using the device-mapper replacement:
|
||||
|
||||
`dmstats report {{/dev/mapper/device}}`
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Postfix mail transfer agent (MTA) control program.
|
||||
> See also: `dovecot`, a mail delivery agent (MDA) that integrates with Postfix.
|
||||
> More information: <https://www.postfix.org>.
|
||||
> More information: <https://www.postfix.org/postfix.1.html>.
|
||||
|
||||
- Check the configuration:
|
||||
|
||||
|
||||
@@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Cancel a job in the user service manager:
|
||||
|
||||
`systemctl --user cancel {{job_id}}`
|
||||
`systemctl cancel --user {{job_id}}`
|
||||
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Stop a service from running on boot and stop its current execution:
|
||||
|
||||
`systemctl disable {{unit}} --now`
|
||||
`systemctl disable --now {{unit}}`
|
||||
|
||||
- Stop a user service from running on login:
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Enable a service to run on boot and start it now:
|
||||
|
||||
`systemctl enable {{unit}} --now`
|
||||
`systemctl enable --now {{unit}}`
|
||||
|
||||
- Enable a user unit to run on login:
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Ensure that the service is shut down while masking:
|
||||
|
||||
`systemctl mask {{service_name}} --now`
|
||||
`systemctl mask --now {{service_name}}`
|
||||
|
||||
- Mask a user service:
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Unmask and start a service immediately:
|
||||
|
||||
`systemctl unmask {{service_name}} --now`
|
||||
`systemctl unmask --now {{service_name}}`
|
||||
|
||||
- Unmask a user service:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# port
|
||||
|
||||
> Package manager for macOS.
|
||||
> More information: <https://www.macports.org>.
|
||||
> More information: <https://guide.macports.org/#using.port>.
|
||||
|
||||
- Search for a package:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# scrapy
|
||||
|
||||
> Web-crawling framework.
|
||||
> More information: <https://scrapy.org>.
|
||||
> More information: <https://docs.scrapy.org/en/latest/topics/commands.html#using-the-scrapy-tool>.
|
||||
|
||||
- Create a project:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Supervisor, a client/server system that allows its users to control a number of processes on UNIX-like operating systems.
|
||||
> Supervisorctl is the command-line client piece of the supervisor which provides a shell-like interface.
|
||||
> More information: <http://supervisord.org>.
|
||||
> More information: <https://supervisord.org/running.html#running-supervisorctl>.
|
||||
|
||||
- Show the status of a process (or all processes if `process_name` is not specified):
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Supervisor is a client/server system for controlling some processes on UNIX-like operating systems.
|
||||
> Supervisord is the server part of supervisor; it is primarily managed via a configuration file.
|
||||
> More information: <http://supervisord.org>.
|
||||
> More information: <https://supervisord.org/running.html#running-supervisord>.
|
||||
|
||||
- Start `supervisord` with specified configuration file:
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
# telegram-desktop
|
||||
|
||||
> Instant messenger with open source clients, chats and stickers.
|
||||
> More information: <https://telegram.org>.
|
||||
> More information: <https://manned.org/telegram-desktop>.
|
||||
|
||||
- Start GUI:
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Wrapper for a set of expert tools for profiling, optimizing and debugging programs.
|
||||
> Commonly used tools include `memcheck`, `cachegrind`, `callgrind`, `massif`, `helgrind`, and `drd`.
|
||||
> More information: <https://www.valgrind.org>.
|
||||
> More information: <https://valgrind.org/docs/manual/manual-core.html#manual-core.options>.
|
||||
|
||||
- Use the (default) Memcheck tool to show a diagnostic of memory usage by `program`:
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`cd`
|
||||
|
||||
- Go to a specific directory in the same drive:
|
||||
- Go to a specific directory on the same drive:
|
||||
|
||||
`cd {{path o\directory}}`
|
||||
|
||||
- Go to a specific directory in a different [d]rive:
|
||||
- Go to a specific directory on a different [d]rive:
|
||||
|
||||
`cd /d {{C}}:{{path o\directory}}`
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
> Download media contents (videos, audios, images) from the Web.
|
||||
> See also: `yt-dlp`, `youtube-viewer`, `instaloader`.
|
||||
> More information: <https://you-get.org>.
|
||||
> More information: <https://you-get.org/#getting-started>.
|
||||
|
||||
- Print media information about a specific media on the web:
|
||||
|
||||
`you-get --info {{https://example.com/video?id=value}}`
|
||||
`you-get {{[-i|--info]}} {{https://example.com/video?id=value}}`
|
||||
|
||||
- Download a media from a specific URL:
|
||||
|
||||
@@ -23,8 +23,8 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Download a media to a specific location:
|
||||
|
||||
`you-get --output-dir {{path/to/directory}} --output-filename {{filename}} {{https://example.com/watch?v=value}}`
|
||||
`you-get {{[-o|--output-dir]}} {{path/to/directory}} {{[-O|--output-filename]}} {{filename}} {{https://example.com/watch?v=value}}`
|
||||
|
||||
- Download a media using a proxy:
|
||||
|
||||
`you-get --http-proxy {{proxy_server}} {{https://example.com/watch?v=value}}`
|
||||
`you-get {{[-x|--http-proxy]}} {{proxy_server}} {{https://example.com/watch?v=value}}`
|
||||
|
||||
Reference in New Issue
Block a user