From b4089fd0c02a361159d7ffee9841eb179d536c00 Mon Sep 17 00:00:00 2001 From: denisidoro Date: Sun, 5 May 2024 00:45:57 +0000 Subject: [PATCH] Update tldr --- pages/common/archwiki-rs.cheat | 16 ++++++++++++++++ pages/common/cut.cheat | 2 +- pages/common/d2.cheat | 22 ++++++++++++++++++++++ pages/common/du.cheat | 3 +++ pages/common/pants.cheat | 25 +++++++++++++++++++++++++ pages/common/quarkus.cheat | 2 +- pages/common/type.cheat | 7 +++++-- pages/linux/aur.cheat | 3 +++ pages/linux/chrt.cheat | 2 +- pages/linux/journalctl.cheat | 4 ++-- pages/linux/ntpd.cheat | 13 +++++++++++++ pages/linux/sslstrip.cheat | 22 ++++++++++++++++++++++ 12 files changed, 114 insertions(+), 7 deletions(-) create mode 100644 pages/common/archwiki-rs.cheat create mode 100644 pages/common/d2.cheat create mode 100644 pages/common/pants.cheat create mode 100644 pages/linux/ntpd.cheat create mode 100644 pages/linux/sslstrip.cheat diff --git a/pages/common/archwiki-rs.cheat b/pages/common/archwiki-rs.cheat new file mode 100644 index 00000000..176fde21 --- /dev/null +++ b/pages/common/archwiki-rs.cheat @@ -0,0 +1,16 @@ +; This has been extracted from +; https://github.com/tldr-pages/tldr/blob/master/pages/common/archwiki-rs.md + +% archwiki-rs, common + +# Read a page from the ArchWiki +archwiki-rs read-page + +# Read a page from the ArchWiki in the specified format +archwiki-rs read-page --format + +# Search the ArchWiki for pages containing the provided text +archwiki-rs search "" --text-search + +# Download a local copy of all ArchWiki pages into a specific directory +archwiki-rs local-wiki --format diff --git a/pages/common/cut.cheat b/pages/common/cut.cheat index 926097f6..2d581239 100644 --- a/pages/common/cut.cheat +++ b/pages/common/cut.cheat @@ -7,7 +7,7 @@ | cut -- <1|1,10|1-10|1-|-10> # Print a field range of each line with a specific delimiter - | cut --delimiter="<,>" --fields <1> + | cut --delimiter "<,>" --fields <1> # Print a character range of each line of the specific file cut --characters <1> diff --git a/pages/common/d2.cheat b/pages/common/d2.cheat new file mode 100644 index 00000000..1204cf86 --- /dev/null +++ b/pages/common/d2.cheat @@ -0,0 +1,22 @@ +; This has been extracted from +; https://github.com/tldr-pages/tldr/blob/master/pages/common/d2.md + +% d2, common + +# Compile and render a D2 source file into an SVG or PNG file +d2 + +# [w]atch live changes made to a D2 source file in the default web browser +d2 --watch + +# Format a D2 source file +d2 fmt + +# 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 + +# Make rendered diagrams look like hand [s]ketches +d2 --sketch true diff --git a/pages/common/du.cheat b/pages/common/du.cheat index 1111f47a..d1db2673 100644 --- a/pages/common/du.cheat +++ b/pages/common/du.cheat @@ -20,3 +20,6 @@ du -h --max-depth=N # List the human-readable size of all `.jpg` files in subdirectories of the current directory, and show a cumulative total at the end du -ch <*_*.jpg> + +# List all files and directories (including hidden ones) above a certain [t]hreshold size (useful for investigating what is actually taking up the space) +du --all --human-readable --threshold <1G|1024M|1048576K> .[^.]* * diff --git a/pages/common/pants.cheat b/pages/common/pants.cheat new file mode 100644 index 00000000..3e35872a --- /dev/null +++ b/pages/common/pants.cheat @@ -0,0 +1,25 @@ +; This has been extracted from +; https://github.com/tldr-pages/tldr/blob/master/pages/common/pants.md + +% pants, common + +# List all targets +pants list :: + +# Run all tests +pants test :: + +# Fix, format, and lint only uncommitted files +pants --changed-since=HEAD fix fmt lint + +# Typecheck only uncommitted files and their dependents +pants --changed-since=HEAD --changed-dependents=transitive check + +# Create a distributable package for the specified target +pants package + +# Auto-generate BUILD file targets for new source files +pants tailor :: + +# Display help +pants help diff --git a/pages/common/quarkus.cheat b/pages/common/quarkus.cheat index f4e9b754..2f89c8bb 100644 --- a/pages/common/quarkus.cheat +++ b/pages/common/quarkus.cheat @@ -16,7 +16,7 @@ quarkus run quarkus test # Add one or more extensions to the current project -quarkus extension add +quarkus extension add # Build a container image using Docker quarkus image build docker diff --git a/pages/common/type.cheat b/pages/common/type.cheat index 5170ab1f..6b4229bb 100644 --- a/pages/common/type.cheat +++ b/pages/common/type.cheat @@ -6,8 +6,11 @@ # Display the type of a command type -# Display all locations containing the specified executable +# Display all locations containing the specified executable (works only in Bash/fish/Zsh shells) type -a -# Display the name of the disk file that would be executed +# Display the name of the disk file that would be executed (works only in Bash/fish/Zsh shells) type -p + +# Display the type of a specific command, alias/keyword/function/builtin/file (works only in Bash/fish shells) +type -t diff --git a/pages/linux/aur.cheat b/pages/linux/aur.cheat index 3a7dfff7..0bace180 100644 --- a/pages/linux/aur.cheat +++ b/pages/linux/aur.cheat @@ -14,3 +14,6 @@ aur repo --list # [u]pgrade local repository packages aur sync --upgrades + +# Install a package without viewing changes in Vim +aur sync --noview diff --git a/pages/linux/chrt.cheat b/pages/linux/chrt.cheat index 1eb368a8..759c345e 100644 --- a/pages/linux/chrt.cheat +++ b/pages/linux/chrt.cheat @@ -13,4 +13,4 @@ chrt --all-tasks --pid chrt --max # Set the scheduling policy for a process -chrt --pid -- +chrt -- --pid diff --git a/pages/linux/journalctl.cheat b/pages/linux/journalctl.cheat index f0d1ef12..d9433640 100644 --- a/pages/linux/journalctl.cheat +++ b/pages/linux/journalctl.cheat @@ -9,8 +9,8 @@ journalctl -b --priority=<3> # Delete journal logs which are older than 2 days journalctl --vacuum-time=<2d> -# [f]ollow new messages (like `tail -f` for traditional syslog) -journalctl -f +# Show only the last N li[n]es and [f]ollow new messages (like `tail -f` for traditional syslog) +journalctl --lines --follow # Show all messages by a specific [u]nit journalctl -u diff --git a/pages/linux/ntpd.cheat b/pages/linux/ntpd.cheat new file mode 100644 index 00000000..90c5192c --- /dev/null +++ b/pages/linux/ntpd.cheat @@ -0,0 +1,13 @@ +; This has been extracted from +; https://github.com/tldr-pages/tldr/blob/master/pages/linux/ntpd.md + +% ntpd, linux + +# Start the daemon +sudo ntpd + +# Synchronize system time with remote servers a single time (quit after synchronizing) +sudo ntpd --quit + +# Synchronize a single time allowing "Big" adjustments +sudo ntpd --panicgate --quit diff --git a/pages/linux/sslstrip.cheat b/pages/linux/sslstrip.cheat new file mode 100644 index 00000000..d9ce6b4e --- /dev/null +++ b/pages/linux/sslstrip.cheat @@ -0,0 +1,22 @@ +; This has been extracted from +; https://github.com/tldr-pages/tldr/blob/master/pages/linux/sslstrip.md + +% sslstrip, linux + +# Log only HTTPS POST traffic on port 10000 by default +sslstrip + +# Log only HTTPS POST traffic on port 8080 +sslstrip --listen=<8080> + +# Log all SSL traffic to and from the server on port 8080 +sslstrip --ssl --listen=<8080> + +# Log all SSL and HTTP traffic to and from the server on port 8080 +sslstrip --listen=<8080> --all + +# Specify the file path to store the logs +sslstrip --listen=<8080> --write= + +# Display help +sslstrip --help