mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-07 16:45:42 +00:00
Update cheatsheets
This commit is contained in:
2
tldr/cut
2
tldr/cut
@@ -14,7 +14,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Print a field range of each line with a specific delimiter:
|
||||
|
||||
`{{command}} | cut --delimiter="{{,}}" --fields {{1}}`
|
||||
`{{command}} | cut --delimiter "{{,}}" --fields {{1}}`
|
||||
|
||||
- Print a character range of each line of the specific file:
|
||||
|
||||
|
||||
33
tldr/d2
Normal file
33
tldr/d2
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# d2
|
||||
|
||||
> A modern diagram scripting language that turns text to diagrams.
|
||||
> More information: <https://d2lang.com/tour/man>.
|
||||
|
||||
- Compile and render a D2 source file into an SVG or PNG file:
|
||||
|
||||
`d2 {{path/to/input_file.d2}} {{path/to/output_file.svg|path/to/output_file.png}}`
|
||||
|
||||
- [w]atch live changes made to a D2 source file in the default web browser:
|
||||
|
||||
`d2 --watch {{path/to/input_file.d2}} {{path/to/output_file.svg|path/to/output_file.png}}`
|
||||
|
||||
- Format a D2 source file:
|
||||
|
||||
`d2 fmt {{path/to/input_file.d2}}`
|
||||
|
||||
- List available themes:
|
||||
|
||||
`d2 themes`
|
||||
|
||||
- Use a different [t]heme for the output file (list available themes first to get the desired `theme_id`):
|
||||
|
||||
`d2 --theme {{theme_id}} {{path/to/input_file.d2}} {{path/to/output_file.svg|path/to/output_file.png}}`
|
||||
|
||||
- Make rendered diagrams look like hand [s]ketches:
|
||||
|
||||
`d2 --sketch true {{path/to/input_file.d2}} {{path/to/output_file.svg|path/to/output_file.png}}`
|
||||
@@ -22,4 +22,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Set the scheduling policy for a process:
|
||||
|
||||
`chrt --pid {{PID}} --{{deadline|idle|batch|rr|fifo|other}}`
|
||||
`chrt --{{deadline|idle|batch|rr|fifo|other}} --pid {{priority}} {{PID}}`
|
||||
|
||||
Reference in New Issue
Block a user