mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-10 04:46:42 +00:00
Update cheatsheets
This commit is contained in:
41
tldr/biff
Normal file
41
tldr/biff
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# biff
|
||||
|
||||
> A simple utility for doing datetime arithmetic, parsing and formatting.
|
||||
> More information: <https://github.com/burntsushi/biff>.
|
||||
|
||||
- Print the current time in a format of your choosing:
|
||||
|
||||
`biff time fmt {{[-f|--format]}} rfc3339 now`
|
||||
|
||||
- Print multiple relative times in one command:
|
||||
|
||||
`biff time fmt {{[-f|--format]}} '%c' now -1d 'next sat' 'last monday' '9pm last mon'`
|
||||
|
||||
- Print the current time in another time zone, and round it the nearest 15 minute increment:
|
||||
|
||||
`biff time in Asia/Bangkok now | biff time round {{[-i|--increment]}} 15 {{[-s|--smallest]}} minute`
|
||||
|
||||
- Convert a time between two different time zone:
|
||||
|
||||
`TZ='Japan' biff time in America/New_York 02:30`
|
||||
|
||||
- Print a past or future time relative to current time:
|
||||
|
||||
`biff time add {{-1d|1d|1w|-1m|1y|...}} now`
|
||||
|
||||
- Add a complex duration to the current time:
|
||||
|
||||
`biff time add '1 week, 12 hours ago' now`
|
||||
|
||||
- Find the duration since a date in the past and round it to the desired precision:
|
||||
|
||||
`biff span since 2025-01-20T12:00 {{[-l|--largest]}} year`
|
||||
|
||||
- Find timestamps in a log file and reformat them into your local time in place:
|
||||
|
||||
`biff tag lines /tmp/access.log | biff time in system | biff time fmt {{[-f|--format]}} '%c' | head {{[-n|--lines]}} 3 | biff untag {{[-s|--substitute]}}`
|
||||
33
tldr/dunstctl
Normal file
33
tldr/dunstctl
Normal file
@@ -0,0 +1,33 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# dunstctl
|
||||
|
||||
> Control the `dunst` notification daemon.
|
||||
> More information: <https://dunst-project.org/documentation/dunstctl>.
|
||||
|
||||
- Pause/Unpause/Toggle desktop notifications:
|
||||
|
||||
`dunstctl set-paused {{true|false|toggle}}`
|
||||
|
||||
- Close all notifications:
|
||||
|
||||
`dunstctl close-all`
|
||||
|
||||
- Delete all notifications from history:
|
||||
|
||||
`dunstctl history-clear`
|
||||
|
||||
- Display the latest notification from history:
|
||||
|
||||
`dunstctl history-pop`
|
||||
|
||||
- Reload the configuration file:
|
||||
|
||||
`dunstctl reload`
|
||||
|
||||
- Display help:
|
||||
|
||||
`dunstctl {{[-h|--help]}}`
|
||||
26
tldr/dunstify
Normal file
26
tldr/dunstify
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# dunstify
|
||||
|
||||
> A notification tool that is an extension of `notify-send`, but has more features based around `dunst`.
|
||||
> Accepts all options of `notify-send`.
|
||||
> More information: <https://dunst-project.org/documentation/dunstify>.
|
||||
|
||||
- Show a notification with a given title and message:
|
||||
|
||||
`dunstify "{{Title}}" "{{Message}}"`
|
||||
|
||||
- Show a notification with the specified urgency:
|
||||
|
||||
`dunstify "{{Title}}" "{{Message}}" {{[-u|--urgency]}} {{low|normal|critical}}`
|
||||
|
||||
- Specify a message ID (overwrites any previous messages with the same ID):
|
||||
|
||||
`dunstify "{{Title}}" "{{Message}}" {{[-r|--replace]}} {{123}}`
|
||||
|
||||
- Display help:
|
||||
|
||||
`dunstify {{[-?|--help]}}`
|
||||
@@ -5,7 +5,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# espeak
|
||||
|
||||
> Uses text-to-speech to speak through the default sound device.
|
||||
> Use text-to-speech to speak through the default sound device.
|
||||
> More information: <https://espeak.sourceforge.net>.
|
||||
|
||||
- Speak a phrase aloud:
|
||||
|
||||
41
tldr/git-for-each-ref
Normal file
41
tldr/git-for-each-ref
Normal file
@@ -0,0 +1,41 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# git for-each-ref
|
||||
|
||||
> List and optionally format references (branches, tags) in a Git repository.
|
||||
> More information: <https://git-scm.com/docs/git-for-each-ref>.
|
||||
|
||||
- List all refs (branches and tags):
|
||||
|
||||
`git for-each-ref`
|
||||
|
||||
- List only branches:
|
||||
|
||||
`git for-each-ref refs/heads/`
|
||||
|
||||
- List only tags:
|
||||
|
||||
`git for-each-ref refs/tags/`
|
||||
|
||||
- Show branches merged into HEAD:
|
||||
|
||||
`git for-each-ref --merged HEAD refs/heads/`
|
||||
|
||||
- List short names of all refs:
|
||||
|
||||
`git for-each-ref --format "%(refname:short)"`
|
||||
|
||||
- Sort refs by committer date (most recent first):
|
||||
|
||||
`git for-each-ref --sort -committerdate`
|
||||
|
||||
- Sort refs by committer date (oldest first):
|
||||
|
||||
`git for-each-ref --sort committerdate`
|
||||
|
||||
- Limit output to a specified number of refs:
|
||||
|
||||
`git for-each-ref --count {{count}}`
|
||||
29
tldr/notify-send
Normal file
29
tldr/notify-send
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# notify-send
|
||||
|
||||
> Use the current desktop environment's notification system to create a notification.
|
||||
> More information: <https://manned.org/notify-send>.
|
||||
|
||||
- Show a notification with the title "Test" and the content "This is a test":
|
||||
|
||||
`notify-send "{{Test}}" "{{This is a test}}"`
|
||||
|
||||
- Show a notification with a custom icon:
|
||||
|
||||
`notify-send {{[-i|--icon]}} {{icon.png}} "{{Test}}" "{{This is a test}}"`
|
||||
|
||||
- Show a notification for 5 seconds:
|
||||
|
||||
`notify-send {{[-t|--expire-time]}} 5000 "{{Test}}" "{{This is a test}}"`
|
||||
|
||||
- Show a notification with the specified urgency level (default: normal):
|
||||
|
||||
`notify-send {{[-u|--urgency]}} {{low|normal|critical}} "{{Test}}" "{{This is a test}}"`
|
||||
|
||||
- Show a notification with an app's icon and name:
|
||||
|
||||
`notify-send "{{Test}}" {{[-i|--icon]}} {{google-chrome}} {{[-a|--app-name]}} "{{Google Chrome}}"`
|
||||
21
tldr/ntp-ctl
Normal file
21
tldr/ntp-ctl
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# ntp-ctl
|
||||
|
||||
> Management client for the `ntpd-rs` daemon.
|
||||
> More information: <https://docs.ntpd-rs.pendulum-project.org/man/ntp-ctl.8>.
|
||||
|
||||
- Display information about the current state of the NTP daemon:
|
||||
|
||||
`ntp-ctl status`
|
||||
|
||||
- Check if the specified configuration file (default: `/etc/ntpd-rs/ntp.toml`) is valid:
|
||||
|
||||
`ntp-ctl {{[-c|--config]}} {{path/to/config}} validate`
|
||||
|
||||
- Interactively run a single synchronization of the clock:
|
||||
|
||||
`sudo ntp-ctl force-sync`
|
||||
Reference in New Issue
Block a user