Update cheatsheets

This commit is contained in:
ivuorinen
2025-09-05 00:19:23 +00:00
parent 7bb915f683
commit 9b4b323d91
8 changed files with 68 additions and 13 deletions

View File

@@ -7,7 +7,7 @@ source: https://github.com/tldr-pages/tldr.git
> A fast crawler focused on execution in automation pipelines offering both headless and non-headless crawling.
> See also: `gau`, `scrapy`, `waymore`.
> More information: <https://docs.projectdiscovery.io/tools/katana/running>.
> More information: <https://docs.projectdiscovery.io/opensource/katana/usage>.
- Crawl a list of URLs:

View File

@@ -11,7 +11,7 @@ source: https://github.com/tldr-pages/tldr.git
- Set the default printer:
`lpoptions -d {{printer[/instance]}}`
`lpoptions -d {{printer}}/{{instance}}`
- List printer-specific options of a specific printer:

View File

@@ -22,7 +22,7 @@ source: https://github.com/tldr-pages/tldr.git
- Show the queued jobs of a specific printer or class:
`lpq -P {{destination[/instance]}}`
`lpq -P {{destination}}/{{instance}}`
- Show the queued jobs once every n seconds until the queue is empty:

View File

@@ -15,7 +15,11 @@ source: https://github.com/tldr-pages/tldr.git
- Cancel a job of a specific server:
`lprm -h {{server[:port]}} {{job_id}}`
`lprm -h {{server}} {{job_id}}`
- Cancel a job of a specific server in a specific port:
`lprm -h {{server}}:{{port}} {{job_id}}`
- Cancel multiple jobs with a encrypted connection to the server:
@@ -27,4 +31,4 @@ source: https://github.com/tldr-pages/tldr.git
- Cancel the current job of a specific printer or class:
`lprm -P {{destination[/instance]}}`
`lprm -P {{destination}}/{{instance}}`

17
tldr/npm-docs Normal file
View File

@@ -0,0 +1,17 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# npm docs
> Open the documentation for one or more packages in the default web browser.
> More information: <https://docs.npmjs.com/cli/npm-docs>.
- Open a specific package's documentation page:
`npm docs {{package}}`
- Open documentation for multiple packages at once:
`npm docs {{package1 package2 ...}}`

30
tldr/poetry-env Normal file
View File

@@ -0,0 +1,30 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# poetry-env
> Manage virtualenvs associated with a Poetry project.
> See also: `asdf`.
> More information: <https://python-poetry.org/docs/cli/#env>.
- Print the command to activate a virtualenv:
`poetry env activate`
- Display information about the current environment (-p or -e will display the environment's path or executable):
`poetry env info {{[-p|--path]}} {{[-e|--executable]}}`
- List all virtualenvs associated with the current project (optionally showing the full path):
`poetry env list --full-path`
- Remove specific or all virtualenvs associated with the current project:
`poetry env remove python {{path/to/executable|environment_name}} | poetry env remove --all`
- Activate or create a virtualenv for the project using the specified python executable:
`poetry env use python {{path/to/executable}}`

View File

@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
- List all routes in an expanded format:
`rails routes --expanded`
`rails routes {{[-E|--expanded]}}`
- List routes partially matching URL helper method name, HTTP verb, or URL path:

View File

@@ -8,21 +8,25 @@ source: https://github.com/tldr-pages/tldr.git
> TypeScript compiler.
> More information: <https://www.typescriptlang.org/docs/handbook/compiler-options.html>.
- Compile a TypeScript file `foobar.ts` into a JavaScript file `foobar.js`:
- Initialize a TypeScript project:
`tsc {{foobar.ts}}`
`tsc --init`
- Compile a TypeScript file into a JavaScript file with the same name:
`tsc {{path/to/file.ts}}`
- Compile a TypeScript file into JavaScript using a specific target syntax (default is `ES3`):
`tsc --target {{ES5|ES2015|ES2016|ES2017|ES2018|ESNEXT}} {{foobar.ts}}`
`tsc {{[-t|--target]}} {{ES5|ES2015|ES2016|ES2017|ES2018|ESNEXT|...}} {{path/to/file.ts}}`
- Compile a TypeScript file into a JavaScript file with a custom name:
`tsc --outFile {{output.js}} {{input.ts}}`
`tsc --outFile {{path/to/output_file.js}} {{path/to/input_file.ts}}`
- Compile all `.ts` files of a TypeScript project defined in a `tsconfig.json` file:
- Compile all `.ts` files of a TypeScript project defined in a `tsconfig.json` file (`--build` can be omitted to build the project in the current working directory):
`tsc --build {{tsconfig.json}}`
`tsc {{[-b|--build]}} {{path/to/tsconfig.json}}`
- Run the compiler using command-line options and arguments fetched from a text file:
@@ -34,4 +38,4 @@ source: https://github.com/tldr-pages/tldr.git
- Run the compiler in watch mode, which automatically recompiles code when it changes:
`tsc --watch`
`tsc {{[-w|--watch]}}`