diff --git a/build.zig b/build.zig index 0f40f39..4bbbc14 100644 --- a/build.zig +++ b/build.zig @@ -1,7 +1,7 @@ const std = @import("std"); const Allocator = std.mem.Allocator; -const VERSION = "0.0.4"; +const VERSION = "0.0.5"; fn embedData(b: *std.Build, exe: *std.Build.Step.Compile) !void { var options = b.addOptions(); diff --git a/pages/common/bgpgrep.md b/pages/common/bgpgrep.md index b53232d..d627106 100644 --- a/pages/common/bgpgrep.md +++ b/pages/common/bgpgrep.md @@ -2,7 +2,7 @@ > Filter and print BGP data within MRT dumps. > Can read files compressed with gzip, bzip2 and xz. -> More information: . +> More information: . - Output all routes: diff --git a/pages/common/birdc.md b/pages/common/birdc.md index 10fe385..121f237 100644 --- a/pages/common/birdc.md +++ b/pages/common/birdc.md @@ -4,7 +4,7 @@ > Command tool to retrieve information like routes from bird and perform configurations during runtime. > More information: . -- Open the remote control console:: +- Open the remote control console: `birdc` @@ -16,7 +16,7 @@ `birdc show status` -- Show all active protocols: +- Show all configured protocols: `birdc show protocols` diff --git a/pages/common/cavif.md b/pages/common/cavif.md new file mode 100644 index 0000000..d16b36c --- /dev/null +++ b/pages/common/cavif.md @@ -0,0 +1,20 @@ +# cavif + +> PNG/JPEG to AVIF converter. +> More information: . + +- Convert a JPEG file to AVIF: + +`cavif {{path/to/file.jpg}}` + +- Adjust the image quality (1-100) and convert a PNG file to AVIF: + +`cavif --quality {{60}} {{path/to/file.png}}` + +- Set the output location explicitly: + +`cavif {{path/to/file.jpg}} --output {{path/to/file.avif}}` + +- Overwrite the destination file if it already exists: + +`cavif --overwrite {{path/to/file.jpg}}` diff --git a/pages/common/exfatlabel.md b/pages/common/exfatlabel.md new file mode 100644 index 0000000..38f84bc --- /dev/null +++ b/pages/common/exfatlabel.md @@ -0,0 +1,12 @@ +# exfatlabel + +> Get or set an exFAT filesystem label. +> More information: . + +- Display the current filesystem label: + +`exfatlabel {{/dev/sda}}` + +- Set the filesystem label: + +`exfatlabel {{/dev/sda}} {{new_label}}` diff --git a/pages/common/fastd.md b/pages/common/fastd.md index e419853..bbf9915 100644 --- a/pages/common/fastd.md +++ b/pages/common/fastd.md @@ -24,6 +24,6 @@ `fastd --show-key --config {{path/to/fastd.conf}}` -- Show the current version:: +- Show the current version: `fastd -v` diff --git a/pages/common/ffplay.md b/pages/common/ffplay.md index 5021d8b..8e42ba1 100644 --- a/pages/common/ffplay.md +++ b/pages/common/ffplay.md @@ -7,6 +7,14 @@ `ffplay {{path/to/file}}` +- Play audio from a media file without a GUI: + +`ffplay -nodisp {{path/to/file}}` + +- Play media passed by `ffmpeg` through `stdin`: + +`ffmpeg -i {{path/to/file}} -c {{copy}} -f {{media_format}} - | ffplay -` + - Play a video and show motion vectors in real time: `ffplay -flags2 +export_mvs -vf codecview=mv=pf+bf+bb {{path/to/file}}` diff --git a/pages/common/fold.md b/pages/common/fold.md index 0fde28b..1539d8a 100644 --- a/pages/common/fold.md +++ b/pages/common/fold.md @@ -1,7 +1,7 @@ # fold > Wraps each line in an input file to fit a specified width and prints it to the standard output. -> More information: . +> More information: . - Wrap each line to default width (80 characters): diff --git a/pages/common/gallery-dl.md b/pages/common/gallery-dl.md index 4b99796..b3e19bb 100644 --- a/pages/common/gallery-dl.md +++ b/pages/common/gallery-dl.md @@ -7,10 +7,14 @@ `gallery-dl "{{url}}"` +- Retrieve pre-existing cookies from your web browser (useful for sites that require login): + +`gallery-dl --cookies-from-browser {{browser}} "{{url}}"` + - Get the direct URL of an image from a site supporting authentication with username and password: `gallery-dl --get-urls --username {{username}} --password {{password}} "{{url}}"` - Filter manga chapters by chapter number and language: -`gallery-dl --chapter-filter "{{10 <= chapter < 20}}" --option "lang={{language_code}}" "{{url}}` +`gallery-dl --chapter-filter "{{10 <= chapter < 20}}" --option "lang={{language_code}}" "{{url}}"` diff --git a/pages/common/head.md b/pages/common/head.md index 54a5e45..0ecfe27 100644 --- a/pages/common/head.md +++ b/pages/common/head.md @@ -1,7 +1,7 @@ # head > Output the first part of files. -> More information: . +> More information: . - Output the first few lines of a file: diff --git a/pages/common/macchina.md b/pages/common/macchina.md new file mode 100644 index 0000000..22cd74a --- /dev/null +++ b/pages/common/macchina.md @@ -0,0 +1,24 @@ +# macchina + +> Display information about your computer. +> More information: . + +- List out system information, with either default settings or those specified in your configuration file: + +`macchina` + +- Specify a custom configuration file path: + +`macchina --config {{path/to/configuration_file}}` + +- List system information, but lengthen uptime, shell and kernel output: + +`macchina --long-uptime --long-shell --long-kernel` + +- Check for any errors/system failures encountered when trying to fetch system information: + +`macchina --doctor` + +- List original artists of all the ASCII art: + +`macchina --ascii-artists` diff --git a/pages/common/mtr.md b/pages/common/mtr.md index f7658d7..f018d9e 100644 --- a/pages/common/mtr.md +++ b/pages/common/mtr.md @@ -1,28 +1,32 @@ # mtr > Matt's Traceroute: combined traceroute and ping tool. -> More information: . +> More information: . - Traceroute to a host and continuously ping all intermediary hops: -`mtr {{host}}` +`mtr {{example.com}}` - Disable IP address and host name mapping: -`mtr -n {{host}}` +`mtr --no-dns {{example.com}}` - Generate output after pinging each hop 10 times: -`mtr -w {{host}}` +`mtr --report-wide {{example.com}}` - Force IP IPv4 or IPV6: -`mtr -4 {{host}}` +`mtr -4 {{example.com}}` - Wait for a given time (in seconds) before sending another packet to the same hop: -`mtr -i {{seconds}} {{host}}` +`mtr --interval {{10}} {{example.com}}` - Display the Autonomous System Number (ASN) for each hop: -`mtr --aslookup {{hostname}}` +`mtr --aslookup {{example.com}}` + +- Display both IP address and reverse DNS name: + +`mtr --show-ips {{example.com}}` diff --git a/pages/common/nping.md b/pages/common/nping.md new file mode 100644 index 0000000..45ffd3c --- /dev/null +++ b/pages/common/nping.md @@ -0,0 +1,36 @@ +# nping + +> Network packet generation tool/ping utility. +> More information: . + +- Ping a specified host using ICMP if the user is allowed to, otherwise using TCP: + +`nping {{example.com}}` + +- Ping a specified host using ICMP assuming that the user is allowed to do so: + +`nping --icmp --privileged {{example.com}}` + +- Ping a specified host using UDP: + +`nping --udp {{example.com}}` + +- Ping a specified host on a given port using TCP: + +`nping --tcp --dest-port {{443}} {{example.com}}` + +- Ping a certain number of times: + +`nping --count {{10}} {{example.com}}` + +- Wait a certain amount of time between each ping: + +`nping --delay {{5s}} {{example.com}}` + +- Send the request over a specified interface: + +`nping --interface {{eth0}} {{example.com}}` + +- Set the Reserved/Evil bit in sent packets: + +`nping --evil {{example.com}}` diff --git a/pages/common/peerindex.md b/pages/common/peerindex.md index f273fc5..54a5d17 100644 --- a/pages/common/peerindex.md +++ b/pages/common/peerindex.md @@ -2,7 +2,7 @@ > Inspect MRT TABLE_DUMPV2 Peer Index Table. > Can read files compressed with gzip, bzip2 and xz. -> More information: . +> More information: . - Output all peers: diff --git a/pages/common/traceroute.md b/pages/common/traceroute.md index a7f5b64..747c0d2 100644 --- a/pages/common/traceroute.md +++ b/pages/common/traceroute.md @@ -5,20 +5,28 @@ - Traceroute to a host: -`traceroute {{host}}` +`traceroute {{example.com}}` - Disable IP address and host name mapping: -`traceroute -n {{host}}` +`traceroute -n {{example.com}}` -- Specify wait time for response: +- Specify wait time in seconds for response: -`traceroute -w {{0.5}} {{host}}` +`traceroute --wait={{0.5}} {{example.com}}` - Specify number of queries per hop: -`traceroute -q {{5}} {{host}}` +`traceroute --queries={{5}} {{example.com}}` - Specify size in bytes of probing packet: -`traceroute {{host}} {{42}}` +`traceroute {{example.com}} {{42}}` + +- Determine the MTU to the destination: + +`traceroute --mtu {{example.com}}` + +- Use ICMP instead of UDP for tracerouting: + +`traceroute --icmp {{example.com}}` diff --git a/pages/common/whisper.md b/pages/common/whisper.md index 3a3b781..5e9d1db 100644 --- a/pages/common/whisper.md +++ b/pages/common/whisper.md @@ -9,7 +9,7 @@ - Convert an audio file specifying the output format of the converted file: -`whisper {{path/to/audio.mp3}} --output-format {{txt}}` +`whisper {{path/to/audio.mp3}} --output_format {{txt}}` - Convert an audio file using a specific model for conversion: diff --git a/pages/common/yacc.md b/pages/common/yacc.md new file mode 100644 index 0000000..3573db5 --- /dev/null +++ b/pages/common/yacc.md @@ -0,0 +1,17 @@ +# yacc + +> Generate an LALR parser (in C) with a given formal grammar specification file. +> See also: `bison`. +> More information: . + +- Create a file `y.tab.c` containing the C parser code and compile the grammar file with all necessary constant declarations for values. (Constant declarations file `y.tab.h` is created only when the `-d` flag is used): + +`yacc -d {{path/to/grammar_file.y}}` + +- Compile a grammar file containing the description of the parser and a report of conflicts generated by ambiguities in the grammar: + +`yacc -d {{path/to/grammar_file.y}} -v` + +- Compile a grammar file, and prefix output filenames with `prefix` instead of `y`: + +`yacc -d {{path/to/grammar_file.y}} -v -b {{prefix}}` diff --git a/pages/common/yard.md b/pages/common/yard.md new file mode 100644 index 0000000..a846f85 --- /dev/null +++ b/pages/common/yard.md @@ -0,0 +1,16 @@ +# yard + +> Documentation tool for Ruby. +> More information: . + +- Create the documentation: + +`yard` + +- Create the documentation and save it to one file: + +`yard --one-file` + +- List all undocumented objects: + +`yard stats --list-undoc` diff --git a/pages/linux/farge.md b/pages/linux/farge.md new file mode 100644 index 0000000..517a5bb --- /dev/null +++ b/pages/linux/farge.md @@ -0,0 +1,24 @@ +# farge + +> Display the color of a specific pixel on the screen in either hexadecimal or RGB formats. +> More information: . + +- Display a small preview window of a pixel's color with it's hexadecimal value, and copy this value to the clipboard: + +`farge` + +- Copy a pixel's hexadecimal value to the clipboard without displaying a preview window: + +`farge --no-preview` + +- Output a pixel's hexadecimal value to `stdout`, and copy this value to the clipboard: + +`farge --stdout` + +- Output a pixel's RGB value to `stdout`, and copy this value to the clipboard: + +`farge --rgb --stdout` + +- Display a pixel's hexadecimal value as a notification which expires in 5000 milliseconds, and copy this value to the clipboard: + +`farge --notify --expire-time 5000` diff --git a/pages/linux/fold.md b/pages/linux/fold.md index d5d405d..60cb1de 100644 --- a/pages/linux/fold.md +++ b/pages/linux/fold.md @@ -1,7 +1,7 @@ -# Fold +# fold > Folds long lines for fixed-width output devices. -> More information: . +> More information: . - Fold lines in a fixed width: diff --git a/pages/linux/qm-suspend.md b/pages/linux/qm-suspend.md new file mode 100644 index 0000000..7d53281 --- /dev/null +++ b/pages/linux/qm-suspend.md @@ -0,0 +1,17 @@ +# qm suspend + +> Suspends a virtual machine (VM) in the Proxmox Virtual Environment (PVE). +> Use `--skiplock` and `--skiplockstorage` flags with caution, as they may lead to data corruption in certain situations. +> More information: . + +- Suspend a virtual machine by id: + +`qm suspend {{vm_id}} {{integer}}` + +- Skip the lock check when suspending the VM: + +`qm suspend {{vm_id}} {{integer}} --skiplock` + +- Skip the lock check for storage when suspending the VM: + +`qm suspend {{vm_id}} {{integer}} --skiplockstorage` diff --git a/pages/linux/qm-template.md b/pages/linux/qm-template.md new file mode 100644 index 0000000..c8d51fb --- /dev/null +++ b/pages/linux/qm-template.md @@ -0,0 +1,8 @@ +# qm template + +> Create a Proxmox VM template. +> More information: . + +- Create a template out of a specific virtual machine: + +`qm template {{vm_id}}` diff --git a/pages/linux/swaplabel.md b/pages/linux/swaplabel.md new file mode 100644 index 0000000..f5272a3 --- /dev/null +++ b/pages/linux/swaplabel.md @@ -0,0 +1,17 @@ +# swaplabel + +> Print or change the label or UUID of a swap area. +> Note: `path/to/file` can either point to a regular file or a swap partition. +> More information: . + +- Display the current label and UUID of a swap area: + +`swaplabel {{path/to/file}}` + +- Set the label of a swap area: + +`swaplabel --label {{new_label}} {{path/to/file}}` + +- Set the UUID of a swap area (you can generate a UUID using `uuidgen`): + +`swaplabel --uuid {{new_uuid}} {{path/to/file}}` diff --git a/pages/linux/systemd-firstboot.md b/pages/linux/systemd-firstboot.md new file mode 100644 index 0000000..5eba869 --- /dev/null +++ b/pages/linux/systemd-firstboot.md @@ -0,0 +1,36 @@ +# systemd-firstboot + +> Initialize basic system settings on or before the first boot-up of a system. +> More information: . + +- Operate on the specified directory instead of the root directory of the host system: + +`sudo systemd-firstboot --root={{path/to/root_directory}}` + +- Set the system keyboard layout: + +`sudo systemd-firstboot --keymap={{keymap}}` + +- Set the system hostname: + +`sudo systemd-firstboot --hostname={{hostname}}` + +- Set the root user's password: + +`sudo systemd-firstboot --root-password={{password}}` + +- Prompt the user interactively for a specific basic setting: + +`sudo systemd-firstboot --prompt={{setting}}` + +- Force writing configuration even if the relevant files already exist: + +`sudo systemd-firstboot --force` + +- Remove all existing files that are configured by `systemd-firstboot`: + +`sudo systemd-firstboot --reset` + +- Remove the password of the system's root user: + +`sudo systemd-firstboot --delete-root-password` diff --git a/pages/linux/v4l2-ctl.md b/pages/linux/v4l2-ctl.md index 5cf4308..2586bb5 100644 --- a/pages/linux/v4l2-ctl.md +++ b/pages/linux/v4l2-ctl.md @@ -29,4 +29,8 @@ - List all video device's controls and their values: -`v4l2-ctl --list-ctrls --device {{/path/to/video_device}}` +`v4l2-ctl --list-ctrls --device {{path/to/video_device}}` + +- Set the value of a video device control: + +`v4l2-ctl --device {{path/to/video_device}} --set-ctrl={{control_name}}={{value}}` diff --git a/pages/linux/zbarcam.md b/pages/linux/zbarcam.md new file mode 100644 index 0000000..787fe23 --- /dev/null +++ b/pages/linux/zbarcam.md @@ -0,0 +1,20 @@ +# zbarcam + +> Scans and decodes barcodes (and QR codes) from a video device. +> More information: . + +- Continuously read barcodes and print them to standard output: + +`zbarcam` + +- Disable output video window while scanning: + +`zbarcam --nodisplay` + +- Print barcodes without type information: + +`zbarcam --raw` + +- Define capture device: + +`zbarcam /dev/{{video_device}}` diff --git a/pages/updated_on b/pages/updated_on index 7992c31..6a1b909 100644 --- a/pages/updated_on +++ b/pages/updated_on @@ -1 +1 @@ -2023-07-07 +2023-07-14 diff --git a/pages/windows/ipconfig.md b/pages/windows/ipconfig.md index 8fec1cb..133ac86 100644 --- a/pages/windows/ipconfig.md +++ b/pages/windows/ipconfig.md @@ -19,6 +19,10 @@ `ipconfig /release {{adapter}}` -- Remove all data from the DNS cache: +- Show the local DNS cache: + +`ipconfig /displaydns` + +- Remove all data from the local DNS cache: `ipconfig /flushdns` diff --git a/pages/windows/net.md b/pages/windows/net.md new file mode 100644 index 0000000..3ae82cb --- /dev/null +++ b/pages/windows/net.md @@ -0,0 +1,36 @@ +# net + +> System utility to view and modify network-related settings. +> More information: . + +- Start or stop a Windows service synchronously: + +`net {{start|stop}} {{service}}` + +- Make sure an SMB share is available in the current console: + +`net use {{\\smb_shared_folder}} /USER:{{username}}` + +- Show the folders currently shared over SMB: + +`net share` + +- Show who is using your SMB shares (run in elevated console): + +`net session` + +- Show users in a local security group: + +`net localgroup "{{Administrators}}"` + +- Add a user to the local security group (run in elevated console): + +`net localgroup "{{Administrators}}" {{username}} /add` + +- Display help for a subcommand: + +`net help {{subcommand}}` + +- Display help: + +`net help` diff --git a/pages/windows/netsh-interface-portproxy.md b/pages/windows/netsh-interface-portproxy.md new file mode 100644 index 0000000..a603e51 --- /dev/null +++ b/pages/windows/netsh-interface-portproxy.md @@ -0,0 +1,20 @@ +# netsh interface portproxy + +> Configure and display the status of various network components. +> More information: . + +- Display the current port forwarding setup: + +`netsh interface portproxy show all` + +- Set up IPv4 port forwarding (run in elevated console): + +`netsh interface portproxy add v4tov4 listenaddress={{192.168.0.1}} listenport={{8080}} connectaddress={{10.0.0.1}} connectport={{80}}` + +- Remove IPv4 port forwarding (run in elevated console): + +`netsh interface portproxy delete v4tov4 listenaddress={{192.168.0.1}} listenport={{8080}}` + +- Display help: + +`netsh interface portproxy`