Skip to content

Commit

Permalink
Update tldr
Browse files Browse the repository at this point in the history
  • Loading branch information
denisidoro authored and github-actions[bot] committed May 5, 2024
1 parent 5d369a0 commit b4089fd
Show file tree
Hide file tree
Showing 12 changed files with 114 additions and 7 deletions.
16 changes: 16 additions & 0 deletions pages/common/archwiki-rs.cheat
Original file line number Diff line number Diff line change
@@ -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 <page_title>

# Read a page from the ArchWiki in the specified format
archwiki-rs read-page <page_title> --format <plain-text|markdown|html>

# Search the ArchWiki for pages containing the provided text
archwiki-rs search "<search_text>" --text-search

# Download a local copy of all ArchWiki pages into a specific directory
archwiki-rs local-wiki <path_to_local_wiki> --format <plain-text|markdown|html>
2 changes: 1 addition & 1 deletion pages/common/cut.cheat
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<command> | cut --<characters|fields> <1|1,10|1-10|1-|-10>

# 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
cut --characters <1> <path_to_file>
22 changes: 22 additions & 0 deletions pages/common/d2.cheat
Original file line number Diff line number Diff line change
@@ -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 <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>
3 changes: 3 additions & 0 deletions pages/common/du.cheat
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@ du -h --max-depth=N <path_to_directory>

# 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> .[^.]* *
25 changes: 25 additions & 0 deletions pages/common/pants.cheat
Original file line number Diff line number Diff line change
@@ -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 <path_to_directory:target-name>

# Auto-generate BUILD file targets for new source files
pants tailor ::

# Display help
pants help
2 changes: 1 addition & 1 deletion pages/common/quarkus.cheat
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ quarkus run
quarkus test

# Add one or more extensions to the current project
quarkus extension add <extension_name_1 extension_name_2 ...>
quarkus extension add <extension_name1 extension_name2 ...>

# Build a container image using Docker
quarkus image build docker
Expand Down
7 changes: 5 additions & 2 deletions pages/common/type.cheat
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,11 @@
# Display the type of a command
type <command>

# Display all locations containing the specified executable
# Display all locations containing the specified executable (works only in Bash/fish/Zsh shells)
type -a <command>

# 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 <command>

# Display the type of a specific command, alias/keyword/function/builtin/file (works only in Bash/fish shells)
type -t <command>
3 changes: 3 additions & 0 deletions pages/linux/aur.cheat
Original file line number Diff line number Diff line change
Expand Up @@ -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 <package>
2 changes: 1 addition & 1 deletion pages/linux/chrt.cheat
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ chrt --all-tasks --pid <PID>
chrt --max

# 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>
4 changes: 2 additions & 2 deletions pages/linux/journalctl.cheat
Original file line number Diff line number Diff line change
Expand Up @@ -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 <N> --follow

# Show all messages by a specific [u]nit
journalctl -u <unit>
Expand Down
13 changes: 13 additions & 0 deletions pages/linux/ntpd.cheat
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions pages/linux/sslstrip.cheat
Original file line number Diff line number Diff line change
@@ -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=<path_to_file>

# Display help
sslstrip --help

0 comments on commit b4089fd

Please sign in to comment.