From d02c7698ca374eb6b13f3e9e807324e7519da3d4 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Thu, 25 May 2023 23:55:23 +0200 Subject: [PATCH] fix: conform articles to the template --- knowledge base/1password-cli.md | 28 ++++++++++++++++----- knowledge base/acl.md | 42 ++++++++++++++++++++++---------- knowledge base/android.md | 13 +++++++++- knowledge base/ansible.md | 6 +++-- knowledge base/antigen.md | 18 ++++++++++++++ knowledge base/apk.md | 43 ++++++++++++++++++++------------- knowledge base/apt-file.md | 5 ++-- knowledge base/apt.md | 3 +++ knowledge base/arch linux.md | 12 +++++++++ knowledge base/armbian.md | 6 +++-- knowledge base/asdf.md | 15 ++++++++---- 11 files changed, 143 insertions(+), 48 deletions(-) diff --git a/knowledge base/1password-cli.md b/knowledge base/1password-cli.md index 833583d..b374fdd 100644 --- a/knowledge base/1password-cli.md +++ b/knowledge base/1password-cli.md @@ -1,19 +1,26 @@ # 1password-cli +## Table of contents + +1. [TL;DR](#tldr) +1. [Gotchas](#gotchas) +1. [Further readings](#further-readings) +1. [Sources](#sources) + ## TL;DR ```sh # installation -brew cask install 1password-cli +brew install --cask '1password-cli' # first login -op signin company.1password.com user.name@company.com +op signin 'company.1password.com' 'user.name@company.com' # subsequent logins -op signin company +op signin 'company' # automatically set environment variables # needed to run the export command manually -eval $(op signin company) +eval "$(op signin 'company')" # show all the items in the account op list items @@ -24,7 +31,7 @@ op list items - After you have signed in the first time, you can sign in again using your account shorthand, which is your sign-in address subdomain (in this example, _company_); `op signin` will prompt you for your password and output a command that can save your session token to an environment variable: ```sh - op signin company + op signin 'company' ``` - Session tokens expire after 30 minutes of inactivity, after which you'll need to sign in again @@ -33,10 +40,19 @@ op list items - [CLI guide] -[cli guide]: https://support.1password.com/command-line/ ## Sources +All the references in the [further readings] section, plus the following: + - [CLI getting started] guide + [cli getting started]: https://support.1password.com/command-line-getting-started/ +[cli guide]: https://support.1password.com/command-line/ + + +[further readings]: #further-readings + + + diff --git a/knowledge base/acl.md b/knowledge base/acl.md index e5dc190..45f1865 100644 --- a/knowledge base/acl.md +++ b/knowledge base/acl.md @@ -1,30 +1,46 @@ # Access Control Lists assignment +## Table of contents + +1. [TL;DR](#tldr) +1. [Further readings](#further-readings) +1. [Sources](#sources) + ## TL;DR ```sh -# show acls of file test/declarations.h -getfacl test/declarations.h +# Show acls of files. +getfacl 'test/declarations.h' -# set permissions for user awe-user -setfacl -m u:awe-user:rwx test/declarations.h +# Set permissions for users. +setfacl -m 'u:username:rwx' 'test/declarations.h' -# set permissions for group awe-group -setfacl -m "g:awe-group:r-x" test/declarations.h +# Set permissions for groups. +setfacl -m "g:groupname:r-x" 'test/declarations.h' -# make children files and directories inherit acls -# sets default acls -setfacl -d -m u:dummy:rw test +# Make children files and directories inherit acls. +# A.K.A. sets default acls. +setfacl -d -m 'u:dummy:rw' 'test' -# remove a specific acl -setfacl -x u:dummy:rw test +# Remove specific acls. +setfacl -x 'u:dummy:rw' 'test' -# remove all acls -setfacl -b test/declarations.h +# Remove all acls. +setfacl -b 'test/declarations.h' ``` +## Further readings + ## Sources +All the references in the [further readings] section, plus the following: + - [Access Control Lists (ACL) in Linux] + + +[further readings]: #further-readings + + + [access control lists (acl) in linux]: https://www.geeksforgeeks.org/access-control-listsacl-linux/ diff --git a/knowledge base/android.md b/knowledge base/android.md index 528f88d..cb27102 100644 --- a/knowledge base/android.md +++ b/knowledge base/android.md @@ -1,7 +1,10 @@ # Android +## Table of contents + 1. [TL;DR](#tldr) 1. [Further readings](#further-readings) +1. [Sources](#sources) ## TL;DR @@ -58,12 +61,20 @@ fastboot reboot ## Further readings - [ADB] -- [How to Use ADB and Fastboot on Android] - [Using ADB and fastboot] +## Sources + +All the references in the [further readings] section, plus the following: + +- [How to Use ADB and Fastboot on Android] + [adb]: https://developer.android.com/studio/command-line/adb + +[further readings]: #further-readings + [how to use adb and fastboot on android]: https://www.makeuseof.com/tag/use-adb-fastboot-android/ diff --git a/knowledge base/ansible.md b/knowledge base/ansible.md index 93056bf..d43ab6f 100644 --- a/knowledge base/ansible.md +++ b/knowledge base/ansible.md @@ -116,7 +116,7 @@ All Jinja2's standard filters and tests can be used, with the addition of: All templating happens **on the Ansible controller**, **before** the task is sent and executed on the target machine. -Updated [examples] are available. +Updated [examples][templating examples] are available. ```yaml # Remove empty or false values from a list piping it to 'select()'. @@ -539,8 +539,10 @@ All the references in the [further readings] section, plus the following: [templating]: https://docs.ansible.com/ansible/latest/user_guide/playbooks_templating.html [tests]: https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html - + [further readings]: #further-readings + + [templating examples]: ../examples/ansible/templating.yml diff --git a/knowledge base/antigen.md b/knowledge base/antigen.md index 72571d8..dc9b3e3 100644 --- a/knowledge base/antigen.md +++ b/knowledge base/antigen.md @@ -1,5 +1,12 @@ # Antigen +## Table of contents + +1. [Troubleshooting](#troubleshooting) + 1. [While loading, a completion fails with error `No such file or directory`.](#while-loading-a-completion-fails-with-error-no-such-file-or-directory) +1. [Further readings](#further-readings) +1. [Sources](#sources) + ## Troubleshooting ### While loading, a completion fails with error `No such file or directory`. @@ -23,5 +30,16 @@ antigen apply - [Github]'s repository - Antigen's [Wiki] +## Sources + +All the references in the [further readings] section, plus the following: + + [github]: https://github.com/zsh-users/antigen [wiki]: https://github.com/zsh-users/antigen/wiki + + +[further readings]: #further-readings + + + diff --git a/knowledge base/apk.md b/knowledge base/apk.md index 6720766..c158eee 100644 --- a/knowledge base/apk.md +++ b/knowledge base/apk.md @@ -1,5 +1,10 @@ # APK +## Table of contents + +1. [TL;DR](#tldr) +1. [Sources](#sources) + ## TL;DR ```sh @@ -7,58 +12,62 @@ apk update # Search for packages -apk search duperemove -apk search -a parallel +apk search 'duperemove' +apk search -a 'parallel' apk --no-cache search -v # Get information about packages. -apk info htop -apk --no-cache info -a curl +apk info 'htop' +apk --no-cache info -a 'curl' # List installed packages. apk list -I # Install packages. -apk add zstd -apk --no-cache add -i zfs=2.1.4-r0 xz>=5.2.0 -apk -s add --allow-untrusted path/to/foo.apk +apk add 'zstd' +apk --no-cache add -i 'zfs=2.1.4-r0' 'xz>=5.2.0' +apk -s add --allow-untrusted 'path/to/foo.apk' # Upgrade packages. apk upgrade -apk --no-cache add -iu apk-tools -apk -s add -u --allow-untrusted path/to/foo.apk +apk --no-cache add -iu 'apk-tools' +apk -s add -u --allow-untrusted 'path/to/foo.apk' # Remove packages. -apk del php7 +apk del 'php7' # Remove cache. apk cache clean apk cache -v sync # Find what package provides a file. -apk info --who-owns /etc/passwd +apk info --who-owns '/etc/passwd' # List files included in a package. -apk info -L zsh +apk info -L 'zsh' # Check if a package is installed. -apk info -e fdupes +apk info -e 'fdupes' # List packages dependencies. -apk info -R atop +apk info -R 'atop' # List packages depending on a package. -apk info -r bash +apk info -r 'bash' # Show the installed size of an installed package. -apk info -s top +apk info -s 'top' # Get an installed package's description. -apk info -d parallel +apk info -d 'parallel' ``` ## Sources - [10 Alpine Linux apk Command Examples] + + + + [10 alpine linux apk command examples]: https://www.cyberciti.biz/faq/10-alpine-linux-apk-command-examples/ diff --git a/knowledge base/apt-file.md b/knowledge base/apt-file.md index d61708b..99c0125 100644 --- a/knowledge base/apt-file.md +++ b/knowledge base/apt-file.md @@ -1,4 +1,4 @@ -# apt-file +# `apt-file` ## Table of contents @@ -25,10 +25,11 @@ All the references in the [further readings] section, plus the following: - [List of files installed from apt package] + +[further readings]: #further-readings [apt]: apt.md -[further readings]: #further-readings [list of files installed from apt package]: https://serverfault.com/questions/96964/list-of-files-installed-from-apt-package#96965 diff --git a/knowledge base/apt.md b/knowledge base/apt.md index 17a3953..6778d11 100644 --- a/knowledge base/apt.md +++ b/knowledge base/apt.md @@ -217,6 +217,9 @@ All the references in the [further readings] section, plus the following: [configuring apt sources]: https://wiki.debian.org/SourcesList [unattended upgrades]: https://wiki.debian.org/UnattendedUpgrades + +[further readings]: #further-readings + [apt-file]: apt-file.md [dpkg]: dpkg.md diff --git a/knowledge base/arch linux.md b/knowledge base/arch linux.md index 91fecfe..6f7ead9 100644 --- a/knowledge base/arch linux.md +++ b/knowledge base/arch linux.md @@ -1,5 +1,12 @@ # Arch linux +## Table of contents + +1. [TL;DR](#tldr) +1. [Further readings](#further-readings) + +## TL;DR + ```sh # Manually install packages from the AUR. git clone https://aur.archlinux.org/jdupes.git \ @@ -13,5 +20,10 @@ git clone https://aur.archlinux.org/jdupes.git \ - [Suspend and hibernate] - [Arch User Repository] + [arch user repository]: https://wiki.archlinux.org/title/Arch_User_Repository [suspend and hibernate]: https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate + + + + diff --git a/knowledge base/armbian.md b/knowledge base/armbian.md index 81a7bb9..4862277 100644 --- a/knowledge base/armbian.md +++ b/knowledge base/armbian.md @@ -23,8 +23,10 @@ All the references in the [further readings] section, plus the following: [website]: https://www.armbian.com/ - -[debian]: debian.md + [further readings]: #further-readings + +[debian]: debian.md + diff --git a/knowledge base/asdf.md b/knowledge base/asdf.md index a25c806..8b63909 100644 --- a/knowledge base/asdf.md +++ b/knowledge base/asdf.md @@ -1,14 +1,16 @@ # ASDF -`asdf` is a CLI tool to manage multiple language runtime versions on a per-project basis. It works like `gvm`, `nvm`, `rbenv` and `pyenv` (and more) all in one. +CLI tool to manage multiple language runtime versions on a per-project basis. It works like `gvm`, `nvm`, `rbenv` and `pyenv` (and more) all in one. + +## Table of contents 1. [TL;DR](#tldr) -2. [Installation](#installation) -3. [Plugins management](#plugins-management) +1. [Installation](#installation) +1. [Plugins management](#plugins-management) 1. [Plugins gotchas](#plugins-gotchas) -4. [Versions management](#versions-management) +1. [Versions management](#versions-management) 1. [The `.tool-versions` file](#the-tool-versions-file) -5. [Further readings](#further-readings) +1. [Further readings](#further-readings) ## TL;DR @@ -153,5 +155,8 @@ The versions listed in such file can be: [homepage]: https://asdf-vm.com/ [plugins list]: https://github.com/asdf-vm/asdf-plugins + [.tool-versions example]: ../examples/.tool-versions + +