Update cheatsheets

This commit is contained in:
ivuorinen
2025-11-01 00:21:57 +00:00
parent a94cb9991c
commit 2a88b0bbe0
12 changed files with 231 additions and 17 deletions

12
tldr/bun-i Normal file
View File

@@ -0,0 +1,12 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# bun i
> This command is an alias of `bun install`.
- View documentation for the original command:
`tldr bun install`

33
tldr/bun-install Normal file
View File

@@ -0,0 +1,33 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# bun install
> Install JavaScript dependencies for a project from `package.json`.
> More information: <https://bun.com/docs/cli/install>.
- Install all dependencies listed in `package.json`:
`bun {{[i|install]}}`
- Install a single package (this is an alias for `bun add`):
`bun {{[i|install]}} {{package_name}}@{{version}}`
- Install a package globally:
`bun {{[i|install]}} {{[-g|--global]}} {{package_name}}`
- Install only production dependencies (skips `devDependencies`):
`bun {{[i|install]}} --production`
- Install dependencies exactly from the `bun.lockb` lockfile (frozen lockfile):
`bun {{[i|install]}} --frozen-lockfile`
- Force re-download all packages from the registry, ignoring the cache:
`bun {{[i|install]}} {{[-f|--force]}}`

25
tldr/bun-run Normal file
View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# bun run
> Execute a JavaScript/TypeScript file, or a script from `package.json`.
> More information: <https://bun.com/docs/cli/run>.
- Run a script defined in `package.json`:
`bun run {{script_name}}`
- Run a JavaScript or TypeScript file directly:
`bun run {{path/to/file.ts}}`
- Run a file in "watch" mode (restarts automatically when the file changes):
`bun run --watch {{path/to/file.ts}}`
- Run a file using a specific configuration file:
`bun run --config {{path/to/bunfig.toml}} {{path/to/file.ts}}`

26
tldr/bun-test Normal file
View File

@@ -0,0 +1,26 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# bun test
> Run tests using Bun's built-in test runner.
> It is a fast, Jest-compatible test runner that looks for `*.test.ts` (and similar) files.
> More information: <https://bun.com/docs/cli/test>.
- Run all test files found in the project:
`bun test`
- Run a specific test file or directory:
`bun test {{path/to/file.test.ts}}`
- Run tests in "watch" mode (re-runs automatically on file changes):
`bun test --watch`
- Run tests and generate a code coverage report:
`bun test --coverage`

25
tldr/cython Normal file
View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# cython
> A compiler that converts .pyx files into C or C++ source files.
> More information: <https://docs.cython.org/en/latest/>.
- Compile into C code:
`cython {{path/to/file}}`
- Compile into C++ code:
`cython --cplus {{path/to/file}}`
- Specify an output file:
`cython {{[-o|--output-file]}} {{path/to/output_file}} {{path/to/file}}`
- Display version:
`cython {{[-V|--version]}}`

37
tldr/jj-duplicate Normal file
View File

@@ -0,0 +1,37 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# jj duplicate
> Create new changes with the same content as existing ones.
> More information: <https://jj-vcs.github.io/jj/latest/cli-reference/#jj-duplicate>.
- Duplicate the current revision onto its existing parent:
`jj duplicate`
- Duplicate a specific revision onto its existing parent:
`jj duplicate {{revset}}`
- Duplicate a revision onto a different parent:
`jj duplicate --destination {{dest_revset}} {{revset}}`
- Duplicate a revision and insert it **after** other revision(s):
`jj duplicate --insert-after {{after_revset}} {{revset}}`
- Duplicate a revision and insert it **before** other revision(s):
`jj duplicate --insert-before {{before_revset}} {{revset}}`
- Duplicate onto multiple parents (creates a merge commit):
`jj duplicate --destination {{destination1}} --destination {{destination2}} {{revset}}`
- Duplicate multiple revisions:
`jj duplicate {{revset1 revset2 ...}}`

29
tldr/kubectl-certificate Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# kubectl certificate
> Manage certificate signing requests.
> More information: <https://kubernetes.io/docs/reference/kubectl/generated/kubectl_certificate>.
- Approve a certificate signing request by name:
`kubectl certificate approve {{csr_name}}`
- Deny a certificate signing request by name:
`kubectl certificate deny {{csr_name}}`
- Approve a certificate signing request defined in a manifest file:
`kubectl certificate approve --filename {{path/to/csr.yaml}}`
- Deny a certificate signing request defined in a manifest file:
`kubectl certificate deny --filename {{path/to/csr.yaml}}`
- Force reapproval of a certificate signing request that was previously denied:
`kubectl certificate approve --force {{csr_name}}`

View File

@@ -16,6 +16,10 @@ source: https://github.com/tldr-pages/tldr.git
`sudo emaint sync {{[-r|--repo]}} {{repository}}`
- Synchronize all repositories:
`sudo emaint sync {{[-A|--allrepos]}}`
- Clear the Portage resume list:
`sudo emaint cleanresume {{[-f|--fix]}}`

View File

@@ -6,17 +6,25 @@ source: https://github.com/tldr-pages/tldr.git
# fdisk
> Manage partition tables and partitions on a storage drive.
> See also: `partprobe`.
> See also: `partprobe`, `parted`, `cfdisk`.
> More information: <https://manned.org/fdisk>.
- List partitions:
`sudo fdisk {{[-l|--list]}}`
- Start the partition manipulator:
- Start the interactive partition manipulator:
`sudo fdisk {{/dev/sdX}}`
- Open a help [m]enu:
`<m>`
- View the [p]artition table:
`<p>`
- Create a [n]ew partition:
`<n>`
@@ -25,10 +33,6 @@ source: https://github.com/tldr-pages/tldr.git
`<d>`
- View the [p]artition table:
`<p>`
- [w]rite the changes made:
`<w>`
@@ -36,7 +40,3 @@ source: https://github.com/tldr-pages/tldr.git
- Discard the changes made and [q]uit:
`<q>`
- Open a help [m]enu:
`<m>`

View File

@@ -11,16 +11,20 @@ source: https://github.com/tldr-pages/tldr.git
- Set the max number of counts before a filesystem is checked to 2:
`tune2fs -c 2 {{/dev/sdXN}}`
`sudo tune2fs -c 2 {{/dev/sdXN}}`
- Set the filesystem label to MY_LABEL:
`tune2fs -L 'MY_LABEL' {{/dev/sdXN}}`
`sudo tune2fs -L 'MY_LABEL' {{/dev/sdXN}}`
- Enable discard and user-specified extended attributes for a filesystem:
`tune2fs -o {{discard,user_xattr}} {{/dev/sdXN}}`
`sudo tune2fs -o discard,user_xattr {{/dev/sdXN}}`
- Enable journaling for a filesystem:
`tune2fs -o ^{{nobarrier}} {{/dev/sdXN}}`
`sudo tune2fs -o has_journal {{/dev/sdXN}}`
- Assign a new randomly-generated UUID to a filesystem:
`sudo tune2fs -U random {{/dev/sdXN}}`

18
tldr/npm-install-ci-test Normal file
View File

@@ -0,0 +1,18 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# npm install-ci-test
> Install project dependencies and run tests in a single command, mainly used in continuous integration (CI) environments.
> Equivalent to running `npm ci && npm test`.
> More information: <https://docs.npmjs.com/cli/install-ci-test>.
- Install dependencies and run tests:
`npm {{[cit|install-ci-test]}}`
- Display detailed logs during installation and testing:
`npm {{[cit|install-ci-test]}} --verbose`

View File

@@ -5,12 +5,13 @@ source: https://github.com/tldr-pages/tldr.git
---
# redshift
> Adjust the color temperature of your screen according to your surroundings.
> Adjust the color temperature of a screen according to its surroundings.
> Opmerking: Redshift ondersteunt Wayland niet.
> More information: <https://manned.org/redshift>.
- Turn on Redshift with a specific [t]emperature during day (e.g., 5700K) and at night (e.g., 3600K):
`redshift -t {{5700}}:{{3600}}`
`redshift -t 5700:3600`
- Turn on Redshift with a manually specified custom [l]ocation:
@@ -18,7 +19,7 @@ source: https://github.com/tldr-pages/tldr.git
- Turn on Redshift with a specific screen [b]rightness during the day (e.g, 70%) and at night (e.g., 40%):
`redshift -b {{0.7}}:{{0.4}}`
`redshift -b 0.7:0.4`
- Turn on Redshift with custom [g]amma levels (between 0 and 1):