From 7c4268f0fafc21495a73f687775f3e608e22c0b0 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Thu, 28 Mar 2024 00:13:34 +0000 Subject: [PATCH] Update cheatsheets --- tldr/linux/firejail | 8 ++++++++ tldr/linux/showkey | 29 +++++++++++++++++++++++++++++ tldr/linux/tunelp | 30 ++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+) create mode 100644 tldr/linux/showkey create mode 100644 tldr/linux/tunelp diff --git a/tldr/linux/firejail b/tldr/linux/firejail index d02828ec..33361f0b 100644 --- a/tldr/linux/firejail +++ b/tldr/linux/firejail @@ -31,3 +31,11 @@ source: https://github.com/tldr-pages/tldr.git - Shutdown a running sandbox: `firejail --shutdown={{7777}}` + +- Run a restricted Firefox session to browse the internet: + +`firejail --seccomp --private --private-dev --private-tmp --protocol=inet firefox --new-instance --no-remote --safe-mode --private-window` + +- Use custom hosts file (overriding `/etc/hosts` file): + +`firejail --hosts-file={{~/myhosts}} {{curl http://mysite.arpa}}` diff --git a/tldr/linux/showkey b/tldr/linux/showkey new file mode 100644 index 00000000..6df1d651 --- /dev/null +++ b/tldr/linux/showkey @@ -0,0 +1,29 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# showkey + +> Display the keycode of pressed keys on the keyboard, helpful for debugging keyboard-related issues and key remapping. +> More information: . + +- View keycodes in decimal: + +`sudo showkey` + +- Display [s]cancodes in hexadecimal: + +`sudo showkey {{-s|--scancodes}}` + +- Display [k]eycodes in decimal (default): + +`sudo showkey {{-k|--keycodes}}` + +- Display keycodes in [a]SCII, decimal, and hexadecimal: + +`sudo showkey {{-a|--ascii}}` + +- Exit the program: + +`Ctrl + d` diff --git a/tldr/linux/tunelp b/tldr/linux/tunelp new file mode 100644 index 00000000..90fc4b33 --- /dev/null +++ b/tldr/linux/tunelp @@ -0,0 +1,30 @@ +--- +syntax: markdown +tags: [tldr, linux] +source: https://github.com/tldr-pages/tldr.git +--- +# tunelp + +> Set various parameters for parallel port devices for troubleshooting or for better performance. +> Part of `util-linux`. +> More information: . + +- Check the [s]tatus of a parallel port device: + +`tunelp --status {{/dev/lp0}}` + +- [r]eset a given parallel port: + +`tunelp --reset {{/dev/lp0}}` + +- Use a given [i]RQ for a device, each one representing an interrupt line: + +`tunelp -i 5 {{/dev/lp0}}` + +- Try a given number of times to output a [c]haracter to the printer before sleeping for a given [t]ime: + +`tunelp --chars {{times}} --time {{time_in_centiseconds}} {{/dev/lp0}}` + +- Enable or disable [a]borting on error (disabled by default): + +`tunelp --abort {{on|off}}`