Skip to content

Commit

Permalink
Update pages
Browse files Browse the repository at this point in the history
  • Loading branch information
jiripospisil committed May 18, 2024
1 parent a6441e9 commit 8306368
Show file tree
Hide file tree
Showing 47 changed files with 604 additions and 50 deletions.
2 changes: 1 addition & 1 deletion build.zig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const std = @import("std");
const Allocator = std.mem.Allocator;

const VERSION = "0.0.19";
const VERSION = "0.0.20";

fn embedData(b: *std.Build, exe: *std.Build.Step.Compile) !void {
var options = b.addOptions();
Expand Down
8 changes: 4 additions & 4 deletions pages/common/alacritty.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@

`alacritty -e {{command}}`

- Use an alternative configuration file (defaults to `$XDG_CONFIG_HOME/alacritty/alacritty.yml`):
- Use an alternative configuration file (defaults to `$XDG_CONFIG_HOME/alacritty/alacritty.toml`):

`alacritty --config-file {{path/to/config.yml}}`
`alacritty --config-file {{path/to/config.toml}}`

- Run with live configuration reload enabled (can also be enabled by default in `alacritty.yml`):
- Run with live configuration reload enabled (can also be enabled by default in `alacritty.toml`):

`alacritty --live-config-reload --config-file {{path/to/config.yml}}`
`alacritty --live-config-reload --config-file {{path/to/config.toml}}`
17 changes: 17 additions & 0 deletions pages/common/apkleaks.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# apkleaks

> An APK file scanner for exposing URIs, endpoints, and secrets.
> Note: APKLeaks utilizes the `jadx` disassembler to decompile APK files.
> More information: <https://github.com/dwisiswant0/apkleaks>.
- Scan an APK [f]ile for URIs, endpoints, and secrets:

`apkleaks --file {{path/to/file.apk}}`

- Scan and save the [o]utput to a specific file:

`apkleaks --file {{path/to/file.apk}} --output {{path/to/output.txt}}`

- Pass `jadx` disassembler [a]rguments:

`apkleaks --file {{path/to/file.apk}} --args "{{--threads-count 5 --deobf}}"`
20 changes: 20 additions & 0 deletions pages/common/archwiki-rs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# archwiki-rs

> Read, search and download pages from the ArchWiki.
> More information: <https://gitlab.com/lucifayr/archwiki-rs>.
- 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/aria2c.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

- Download the same file from different mirrors and verify the checksum of the downloaded file:

`aria2c --checksum={{sha-256}}={{hash}} "{{url1}}" "{{url2}}" "{{urlN}}"`
`aria2c --checksum {{sha-256}}={{hash}} "{{url1}}" "{{url2}}" "{{urlN}}"`

- Download the URIs listed in a file with a specific number of parallel downloads:

Expand Down
33 changes: 33 additions & 0 deletions pages/common/cheatshh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# cheatshh

> CLI cheatsheet with customized descriptions, tldr and groups, to look into for your reference.
> Press Enter to a command to copy it to your clipboard and exit.
> More information: <https://github.com/AnirudhG07/cheatshh>.
- [a]dd a new command to the cheatshheet:

`cheatshh --add`

- Edit ([ec]) an existing command's description or group in the cheatshheet:

`cheatshh --edit-command`

- Delete ([dc]) an existing command from the cheatshheet:

`cheatshh --delete-command`

- Create a new [g]roup:

`cheatshh --group`

- Edit ([eg]) an existing group's name or description in the cheatsheet:

`cheatshh --edit-group`

- Delete ([dg]) an existing group and it's sub commands from commands.json file:

`cheatshh --delete-group`

- Display [m]an pages after tldr in the preview:

`cheatshh --man`
12 changes: 8 additions & 4 deletions pages/common/cut.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@
> Cut out fields from `stdin` or files.
> More information: <https://www.gnu.org/software/coreutils/cut>.
- Print a specific character/field range of each line:
- Print a specific [c]haracter/[f]ield range of each line:

`{{command}} | cut --{{characters|fields}} {{1|1,10|1-10|1-|-10}}`

- Print a field range of each line with a specific delimiter:
- Print a [f]ield range of each line with a specific [d]elimiter:

`{{command}} | cut --delimiter="{{,}}" --fields {{1}}`
`{{command}} | cut --delimiter "{{,}}" --fields {{1}}`

- Print a character range of each line of the specific file:
- Print a [c]haracter range of each line of the specific file:

`cut --characters {{1}} {{path/to/file}}`

- Print specific [f]ields of `NUL` terminated lines (e.g. as in `find . -print0`) instead of newlines:

`{{command}} | cut --zero-terminated --fields {{1}}`
29 changes: 29 additions & 0 deletions pages/common/d2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# d2

> A modern diagram scripting language that turns text to diagrams.
> Note: the output file supports SVG and PNG file formats.
> More information: <https://d2lang.com/tour/man>.
- Compile and render a D2 source file into an output file:

`d2 {{path/to/input_file.d2}} {{path/to/output_file.ext}}`

- [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.ext}}`

- 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.ext}}`

- Make rendered diagrams look like hand [s]ketches:

`d2 --sketch true {{path/to/input_file.d2}} {{path/to/output_file.ext}}`
4 changes: 4 additions & 0 deletions pages/common/dart.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@
- Compile a Dart file to a native binary:

`dart compile exe {{path/to/file.dart}}`

- Apply automated fixes to the current project:

`dart fix --apply`
4 changes: 4 additions & 0 deletions pages/common/fastfetch.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

`fastfetch`

- Display system information without a logo and escape sequences:

`fastfetch --pipe`

- Fetch a specific structure:

`fastfetch --structure {{structure}}`
Expand Down
36 changes: 36 additions & 0 deletions pages/common/gleam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# gleam

> The compiler, build tool, package manager and code formatter for Gleam, "a friendly language for building type-safe systems that scale!".
> More information: <https://gleam.run/writing-gleam/command-line-reference/>.
- Create a new gleam project:

`gleam new {{project_name}}`

- Build and run a gleam project:

`gleam run`

- Build the project:

`gleam build`

- Run a project for a particular platform and runtime:

`gleam run --target {{platform}} --runtime {{runtime}}`

- Add a hex dependency to your project:

`gleam add {{dependency_name}}`

- Run project tests:

`gleam test`

- Format source code:

`gleam format`

- Type check the project:

`gleam check`
4 changes: 2 additions & 2 deletions pages/common/icontopbm.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# icontopbm

> This command is superseded by `sunicontopbm`.
> This command is superseded by `sunicontopnm`.
> More information: <https://netpbm.sourceforge.net/doc/icontopbm.html>.
- View documentation for the current command:

`tldr sunicontopbm`
`tldr sunicontopnm`
29 changes: 29 additions & 0 deletions pages/common/immich-cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# immich-cli

> Immich has a command line interface (CLI) that allows you to perform certain actions from the command line.
> See also: `immich-go`.
> More information: <https://immich.app/docs/features/command-line-interface/>.
- Authenticate to Immich server:

`immich login {{server_url/api}} {{server_key}}`

- Upload some image files:

`immich upload {{file1.jpg file2.jpg}}`

- Upload a directory including subdirectories:

`immich upload --recursive {{path/to/directory}}`

- Create an album based on a directory:

`immich upload --album-name "{{My summer holiday}}" --recursive {{path/to/directory}}`

- Skip assets matching a glob pattern:

`immich upload --ignore {{**/Raw/** **/*.tif}} --recursive {{path/to/directory}}`

- Include hidden files:

`immich upload --include-hidden --recursive {{path/to/directory}}`
25 changes: 25 additions & 0 deletions pages/common/immich-go.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# immich-go

> Immich-Go is an open-source tool designed to streamline uploading large photo collections to your self-hosted Immich server.
> See also: `immich-cli`.
> More information: <https://github.com/simulot/immich-go>.
- Upload a Google Photos takeout file to Immich server:

`immich-go -server={{server_url}} -key={{server_key}} upload {{path/to/takeout_file.zip}}`

- Import photos captured on June 2019, while auto-generating albums:

`immich-go -server={{server_url}} -key={{server_key}} upload -create-albums -google-photos -date={{2019-06}} {{path/to/takeout_file.zip}}`

- Upload a takeout file using server and key from a config file:

`immich-go -use-configuration={{~/.immich-go/immich-go.json}} upload {{path/to/takeout_file.zip}}`

- Examine Immich server content, remove less quality images, and preserve albums:

`immich-go -server={{server_url}} -key={{server_key}} duplicate -yes`

- Delete all albums created with the pattern "YYYY-MM-DD":

`immich-go -server={{server_url}} -key={{server_key}} tool album delete {{\d{4}-\d{2}-\d{2}}}`
32 changes: 26 additions & 6 deletions pages/common/ipcs.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
# ipcs

> Display information about resources used in IPC (Inter-process Communication).
> More information: <https://manned.org/ipcs>.
> Show information about the usage of XSI IPC facilities: shared memory segments, message queues, and semaphore arrays.
> More information: <https://manned.org/ipcs.1p>.
- Specific information about the Message Queue which has the ID 32768:
- Show information about all the IPC:

`ipcs -qi 32768`
`ipcs -a`

- General information about all the IPC:
- Show information about active shared [m]emory segments, message [q]ueues or [s]empahore sets:

`ipcs -a`
`ipcs {{-m|-q|-s}}`

- Show information on maximum allowable size in [b]ytes:

`ipcs -b`

- Show [c]reator’s user name and group name for all IPC facilities:

`ipcs -c`

- Show the [p]ID of the last operators for all IPC facilities:

`ipcs -p`

- Show access [t]imes for all IPC facilities:

`ipcs -t`

- Show [o]utstanding usage for active message queues, and shared memory segments:

`ipcs -o`
File renamed without changes.
29 changes: 29 additions & 0 deletions pages/common/lsar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# lsar

> List an archive file's contents.
> See also: `unar`, `ar`.
> More information: <https://manned.org/lsar>.
- List an archive file's contents:

`lsar {{path/to/archive}}`

- List a password protected archive file's contents:

`lsar {{path/to/archive}} --password {{password}}`

- Print al[L] available information about each file in the archive (it's very long):

`lsar {{-L|--verylong}} {{path/to/archive}}`

- Test the integrity of the files in the archive (if possible):

`lsar --test {{path/to/archive}}`

- List the archive file's contents in JSON format:

`lsar --json {{path/to/archive}}`

- Display help:

`lsar --help`
24 changes: 24 additions & 0 deletions pages/common/lstopo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# lstopo

> Show the hardware topology of the system.
> More information: <https://manned.org/lstopo>.
- Show the summarized system topology in a graphical window (or print to console if no graphical display is available):

`lstopo`

- Show the full system topology without summarizations:

`lstopo --no-factorize`

- Show the summarized system topology with only [p]hysical indices (i.e. as seen by the OS):

`lstopo --physical`

- Write the full system topology to a file in the specified format:

`lstopo --no-factorize --output-format {{console|ascii|tex|fig|svg|pdf|ps|png|xml}} {{path/to/file}}`

- Output in monochrome or greyscale:

`lstopo --palette {{none|grey}}`
4 changes: 4 additions & 0 deletions pages/common/pactl.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
> Control a running PulseAudio sound server.
> More information: <https://manned.org/pactl>.
- Show information about the sound server:

`pactl info`

- List all sinks (or other types - sinks are outputs and sink-inputs are active audio streams):

`pactl list {{sinks}} short`
Expand Down
Loading

0 comments on commit 8306368

Please sign in to comment.