Update cheatsheets

This commit is contained in:
ivuorinen
2025-09-07 00:20:52 +00:00
parent b8f18a7a83
commit 15906413e1
13 changed files with 67 additions and 22 deletions

View File

@@ -8,7 +8,7 @@ source: https://github.com/tldr-pages/tldr.git
> List available fonts installed on the system.
> More information: <https://manned.org/fc-list>.
- Return a list of installed fonts in your system:
- Return a list of installed fonts:
`fc-list`
@@ -16,7 +16,7 @@ source: https://github.com/tldr-pages/tldr.git
`fc-list | grep '{{DejaVu Serif}}'`
- Return the number of installed fonts in your system:
- Return the number of installed fonts:
`fc-list | wc {{[-l|--lines]}}`

View File

@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# gum
> Make glamorous shell scripts.
> See also: `whiptail`, `dialog`.
> More information: <https://github.com/charmbracelet/gum>.
- Interactively pick a specific option to print to `stdout`:
@@ -22,11 +23,11 @@ source: https://github.com/tldr-pages/tldr.git
- Show a spinner while a command is taking place with text alongside:
`gum spin --spinner {{dot|line|minidot|jump|pulse|points|globe|moon|monkey|meter|hamburger}} --title "{{loading...}}" -- {{command}}`
`gum spin {{[-s|--spinner]}} {{dot|line|minidot|jump|pulse|points|globe|moon|monkey|meter|hamburger}} --title "{{loading...}}" -- {{command}}`
- Format text to include emojis:
`gum format -t {{emoji}} "{{:smile: :heart: hello}}"`
`gum format {{[-t|--type]}} {{emoji}} "{{:smile: :heart: hello}}"`
- Interactively prompt for multi-line text (`<Ctrl d>` to save) and write to `data.txt`:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# kool
> Build software development environments.
> More information: <https://kool.dev/docs/>.
> More information: <https://kool.dev/docs/commands-reference/kool>.
- Create a project using a specific preset:

View File

@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# dialog
> Display dialog boxes on the terminal.
> See also: `gum`, `whiptail`.
> More information: <https://manned.org/dialog>.
- Display a message:

View File

@@ -19,7 +19,7 @@ source: https://github.com/tldr-pages/tldr.git
- Create a screenshot and save it to a specific path:
`flameshot gui --path {{path/to/directory}}`
`flameshot gui {{[-p|--path]}} {{path/to/directory}}`
- Create a screenshot interactively in a simplified mode:
@@ -27,16 +27,16 @@ source: https://github.com/tldr-pages/tldr.git
- Create a screenshot from a specific monitor:
`flameshot screen --number {{2}}`
`flameshot screen {{[-n|--number]}} {{2}}`
- Create a screenshot and print it to `stdout`:
`flameshot gui --raw`
`flameshot gui {{[-r|--raw]}}`
- Create a screenshot and copy it to the clipboard:
`flameshot gui --clipboard`
`flameshot gui {{[-c|--clipboard]}}`
- Create a screenshot with a specific delay in milliseconds:
`flameshot full --delay {{5000}}`
`flameshot full {{[-d|--delay]}} {{5000}}`

17
tldr/linux/fonttools Normal file
View File

@@ -0,0 +1,17 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# fonttools
> Manipulate fonts in Python.
> More information: <https://fonttools.readthedocs.io/en/latest/>.
- Subset a TTF font file to the Basic Latin Unicode block:
`fonttools subset {{path/to/font.ttf}} --unicodes=U+0000-007F`
- Display help:
`fonttools --help`

View File

@@ -0,0 +1,25 @@
---
syntax: markdown
tags: [tldr, linux]
source: https://github.com/tldr-pages/tldr.git
---
# fonttools subset
> Generate subsets of fonts or optimize file sizes.
> More information: <https://fonttools.readthedocs.io/en/latest/subset/index.html>.
- Subset a TTF font file to the Basic Latin Unicode block:
`fonttools subset {{path/to/font.ttf}} --unicodes=U+0000-007F`
- Change the file type to WOFF2:
`fonttools subset {{path/to/font.ttf}} --unicodes=U+0000-007F --flavor=woff2`
- Keep only the onum (oldstyle figures) and kern (kerning) OpenType font features:
`fonttools subset {{path/to/font.ttf}} --unicodes=U+0000-007F --layout-features=onum,kern`
- Set the output file's name:
`fonttools subset {{path/to/font.ttf}} --unicodes=U+0000-007F --output-file={{path/to/subset.ttf}}`

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# gnome-software
> Add and remove applications and update your system.
> More information: <https://apps.gnome.org/app/org.gnome.Software/>.
> More information: <https://manned.org/gnome-software>.
- Launch the GNOME Software GUI if it's not already running:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# mdbook
> Create online books by writing Markdown files.
> More information: <https://rust-lang.github.io/mdBook/>.
> More information: <https://rust-lang.github.io/mdBook/cli/index.html>.
- Create an mdbook project in the current directory:

View File

@@ -9,33 +9,33 @@ source: https://github.com/tldr-pages/tldr.git
> Frontend for `iptables` aiming to make configuration of a firewall easier.
> More information: <https://wiki.ubuntu.com/UncomplicatedFirewall>.
- Enable ufw:
- Enable `ufw`:
`ufw enable`
- Disable ufw:
- Disable `ufw`:
`ufw disable`
- Show ufw rules, along with their numbers:
- Show `ufw` rules, along with their numbers:
`ufw status numbered`
- Allow incoming traffic on port 5432 on this host with a comment identifying the service:
`ufw allow {{5432}} comment "{{Service}}"`
`ufw allow 5432 comment "{{Service}}"`
- Allow only TCP traffic from 192.168.0.4 to any address on this host, on port 22:
`ufw allow proto {{tcp}} from {{192.168.0.4}} to {{any}} port {{22}}`
`ufw allow proto tcp from 192.168.0.4 to any port 22`
- Deny traffic on port 80 on this host:
`ufw deny {{80}}`
`ufw deny 80`
- Deny all UDP traffic to ports in range 8412:8500:
`ufw deny proto {{udp}} from {{any}} to {{any}} port {{8412:8500}}`
`ufw deny proto udp from any to any port 8412:8500`
- Delete a particular rule. The rule number can be retrieved from the `ufw status numbered` command:

View File

@@ -6,6 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# whiptail
> Display text-based dialog boxes from shell scripts.
> See also: `dialog`, `gum`.
> More information: <https://manned.org/whiptail>.
- Display a simple message:
@@ -30,4 +31,4 @@ source: https://github.com/tldr-pages/tldr.git
- Display a multiple-choice menu:
`{{result_variable_name}}=$(whiptail --title "{{title}}" --menu "{{message}}" {{height_in_chars}} {{width_in_chars}} {{menu_display_height}} "{{value_1}}" "{{display_text_1}}" "{{value_n}}" "{{display_text_n}}" ..... 3>&1 1>&2 2>&3)`
`{{result_variable_name}}=$(whiptail --title "{{title}}" --menu "{{message}}" {{height_in_chars}} {{width_in_chars}} {{menu_display_height}} {{"value_1" "display_text_1" "value_2" "display_text_2" ...}} 3>&1 1>&2 2>&3)`

View File

@@ -18,7 +18,7 @@ source: https://github.com/tldr-pages/tldr.git
- Download the latest version of a package and add it to the list of dev dependencies in `package.json`:
`npm {{[i|install]}} {{package_name}} {{[-D|--save-dev]}}`
`npm {{[i|install]}} {{[-D|--save-dev]}} {{package_name}}`
- Download the latest version of a package and install it globally:

View File

@@ -6,7 +6,7 @@ source: https://github.com/tldr-pages/tldr.git
# tesseract
> OCR (Optical Character Recognition) engine.
> More information: <https://github.com/tesseract-ocr/tesseract>.
> More information: <https://github.com/tesseract-ocr/tesseract/blob/main/doc/tesseract.1.asc>.
- Recognize text in an image and save it to `output.txt` (the `.txt` extension is added automatically):