mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-09 13:46:29 +00:00
Update cheatsheets
This commit is contained in:
@@ -12,6 +12,14 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`git repack`
|
||||
|
||||
- Also remove redundant objects after packing:
|
||||
- Remove redundant objects after packing:
|
||||
|
||||
`git repack -d`
|
||||
|
||||
- Repack all objects into a single pack:
|
||||
|
||||
`git repack -a`
|
||||
|
||||
- Limit the repack to local objects only:
|
||||
|
||||
`git repack -l`
|
||||
|
||||
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Join two files using a comma (instead of a space) as the field separator:
|
||||
|
||||
`join -t '{{,}}' {{path/to/file1}} {{path/to/file2}}`
|
||||
`join -t ',' {{path/to/file1}} {{path/to/file2}}`
|
||||
|
||||
- Join field3 of file1 with field1 of file2:
|
||||
|
||||
|
||||
@@ -13,6 +13,14 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`sudo aa-status`
|
||||
|
||||
- Display status in JSON format:
|
||||
|
||||
`sudo aa-status --json`
|
||||
|
||||
- Display status in pretty JSON format:
|
||||
|
||||
`sudo aa-status --pretty-json`
|
||||
|
||||
- Display the number of loaded policies:
|
||||
|
||||
`sudo aa-status --profiled`
|
||||
|
||||
@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# module
|
||||
|
||||
> Modify a users' environment using the module command.
|
||||
> Modify a users' environment.
|
||||
> More information: <https://lmod.readthedocs.io/en/latest/010_user.html>.
|
||||
|
||||
- Display available modules:
|
||||
@@ -35,3 +35,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
- Specify user-created modules:
|
||||
|
||||
`module use {{path/to/module_file1 path/to/module_file2 ...}}`
|
||||
|
||||
- Save the current set of loaded modules:
|
||||
|
||||
`module save {{collection_name}}`
|
||||
|
||||
4
tldr/nc
4
tldr/nc
@@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> Redirect I/O into a network stream through this versatile tool.
|
||||
> More information: <https://manned.org/nc>.
|
||||
|
||||
- Start a listener on the specified TCP port and send a file into it:
|
||||
- Start a [l]istener on the specified TCP [p]ort and send a file into it:
|
||||
|
||||
`nc < {{filename}} -l -p {{port}}`
|
||||
|
||||
@@ -20,7 +20,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`nc -v -z -w {{timeout_in_seconds}} {{host}} {{start_port}}-{{end_port}}`
|
||||
|
||||
- Start a listener on the specified TCP port and provide your local shell access to the connected party (this is dangerous and can be abused):
|
||||
- Start a [l]istener on the specified TCP [p]ort and provide your local shell access to the connected party (this is dangerous and can be abused):
|
||||
|
||||
`nc -l -p {{port}} -e {{shell_executable}}`
|
||||
|
||||
|
||||
25
tldr/npm-explain
Normal file
25
tldr/npm-explain
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# npm explain
|
||||
|
||||
> Explain how a package is installed, detailing its dependencies and reasons for inclusion.
|
||||
> More information: <https://docs.npmjs.com/cli/explain>.
|
||||
|
||||
- Explain why a specific package is installed:
|
||||
|
||||
`npm explain {{package_name}}`
|
||||
|
||||
- Show explanation in JSON format:
|
||||
|
||||
`npm explain {{package_name}} --json`
|
||||
|
||||
- Include peer dependencies in the explanation:
|
||||
|
||||
`npm explain {{package_name}} --include peer`
|
||||
|
||||
- Limit explanation depth to 2 levels deep:
|
||||
|
||||
`npm explain {{package_name}} --depth 2`
|
||||
21
tldr/npm-link
Normal file
21
tldr/npm-link
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# npm link
|
||||
|
||||
> Symlink a local package into the global `node_modules` or another project for development.
|
||||
> More information: <https://docs.npmjs.com/cli/npm-link>.
|
||||
|
||||
- Symlink the current package globally:
|
||||
|
||||
`npm link`
|
||||
|
||||
- Link a globally linked package into another project's `node_modules`:
|
||||
|
||||
`npm link {{package_name}}`
|
||||
|
||||
- Unlink a package from the current project:
|
||||
|
||||
`npm unlink {{package_name}}`
|
||||
29
tldr/npm-pack
Normal file
29
tldr/npm-pack
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# npm pack
|
||||
|
||||
> Create a tarball from a package.
|
||||
> More information: <https://docs.npmjs.com/cli/pack>.
|
||||
|
||||
- Create a tarball from the current package in the current directory:
|
||||
|
||||
`npm pack`
|
||||
|
||||
- Create a tarball from a specific package folder:
|
||||
|
||||
`npm pack {{path/to/package_directory}}`
|
||||
|
||||
- Run a dry run to preview the tarball contents without creating it:
|
||||
|
||||
`npm pack --dry-run`
|
||||
|
||||
- Create a tarball without running lifecycle scripts:
|
||||
|
||||
`npm pack --ignore-scripts`
|
||||
|
||||
- Specify a custom registry to fetch package metadata from:
|
||||
|
||||
`npm pack --registry {{https://registry.npmjs.org/}}`
|
||||
30
tldr/npm-prune
Normal file
30
tldr/npm-prune
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# npm prune
|
||||
|
||||
> Remove extraneous packages from `node_modules`.
|
||||
> Note: Extraneous packages are those present in the node_modules folder that are not listed as any package's dependency list.
|
||||
> More information: <https://docs.npmjs.com/cli/npm-prune>.
|
||||
|
||||
- Remove all extraneous packages not listed in dependencies:
|
||||
|
||||
`npm prune`
|
||||
|
||||
- Remove extraneous packages and devDependencies (useful for production builds):
|
||||
|
||||
`npm prune --production`
|
||||
|
||||
- Show what would be removed without making any changes:
|
||||
|
||||
`npm prune --dry-run`
|
||||
|
||||
- Output the changes as JSON:
|
||||
|
||||
`npm prune --json`
|
||||
|
||||
- Remove specific packages by name:
|
||||
|
||||
`npm prune {{package_name}}`
|
||||
41
tldr/rpk
Normal file
41
tldr/rpk
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# rpk
|
||||
|
||||
> Manage Redpanda topics, clusters, groups, security and more via a single binary.
|
||||
> More information: <https://docs.redpanda.com/current/reference/rpk/>.
|
||||
|
||||
- Create a new topic:
|
||||
|
||||
`rpk topic create {{topic_name}}`
|
||||
|
||||
- Produce a message to a topic:
|
||||
|
||||
`rpk topic produce {{topic_name}}`
|
||||
|
||||
- Consume messages from multiple topics:
|
||||
|
||||
`rpk topic consume {{topic_name1 topic_name2 ...}}`
|
||||
|
||||
- List all topics:
|
||||
|
||||
`rpk topic list`
|
||||
|
||||
- Display cluster information:
|
||||
|
||||
`rpk cluster info`
|
||||
|
||||
- List all consumer groups:
|
||||
|
||||
`rpk group list`
|
||||
|
||||
- Describe a consumer group with lag information:
|
||||
|
||||
`rpk group describe {{group_name}}`
|
||||
|
||||
- Display version:
|
||||
|
||||
`rpk version`
|
||||
21
tldr/vagrant-resume
Normal file
21
tldr/vagrant-resume
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# vagrant resume
|
||||
|
||||
> Resume a Vagrant managed machine that was previously suspended.
|
||||
> More information: <https://developer.hashicorp.com/vagrant/docs/cli/resume>.
|
||||
|
||||
- Resume machine specified by name or id:
|
||||
|
||||
`vagrant resume {{name|id}}`
|
||||
|
||||
- Resume and run all configured provisioners:
|
||||
|
||||
`vagrant resume {{name|id}} --provision`
|
||||
|
||||
- Resume and specify which provisioners to re-run:
|
||||
|
||||
`vagrant resume {{name|id}} --provision-with {{provisioner}}`
|
||||
12
tldr/windows/gcb
Normal file
12
tldr/windows/gcb
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, windows]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# gcb
|
||||
|
||||
> This command is an alias of `Get-Clipboard`.
|
||||
|
||||
- View documentation for the original command:
|
||||
|
||||
`tldr get-clipboard`
|
||||
30
tldr/windows/get-clipboard
Normal file
30
tldr/windows/get-clipboard
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, windows]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# Get-Clipboard
|
||||
|
||||
> A powershell command to get content from clipboard.
|
||||
> Note: `gcb` can be used as an alias for `Get-Clipboard`.
|
||||
> More information: <https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-clipboard>.
|
||||
|
||||
- Get clipboard text:
|
||||
|
||||
`Get-Clipboard`
|
||||
|
||||
- Get clipboard content as specific text format:
|
||||
|
||||
`Get-Clipboard -TextFormatType {{Text|Html|Rtf}}`
|
||||
|
||||
- Get raw clipboard content:
|
||||
|
||||
`Get-Clipboard -Raw`
|
||||
|
||||
- Retrieve an Image:
|
||||
|
||||
`Get-Clipboard -Format Image`
|
||||
|
||||
- Get file paths copied in explorer:
|
||||
|
||||
`Get-Clipboard -Format FileDropList`
|
||||
Reference in New Issue
Block a user