From 319ae8df7965ef043e544508e2998a087088bdb8 Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Mon, 27 Apr 2026 13:13:22 +0200 Subject: [PATCH] clean up old formatting --- chat/profanity.md | 2 +- data/archives.md | 12 ++++++------ data/gpg.md | 2 +- data/pass.md | 23 ++++++++++++++++------- data/radicale.md | 15 ++++++++------- data/search_system.md | 2 +- data/soft-serve/soft_https.md | 2 +- distros/void/void_basics.md | 2 +- hardware/printers.md | 3 ++- system/deduplicate.md | 2 +- system/makefiles/patterns.md | 2 +- 11 files changed, 39 insertions(+), 28 deletions(-) diff --git a/chat/profanity.md b/chat/profanity.md index 0deb478..c29ab6f 100644 --- a/chat/profanity.md +++ b/chat/profanity.md @@ -41,7 +41,7 @@ Check your `~/.config/profanity/profrc` for how to data's saved. ## Automatically Sign In -To automatically sign in, add your password to [pass](../data/pass.md). +To automatically sign in, add your password to [pass](data/pass.md). ``` /account set ${name}@${host} eval_password pass *xmpp* diff --git a/data/archives.md b/data/archives.md index b003762..9f3c34d 100644 --- a/data/archives.md +++ b/data/archives.md @@ -10,7 +10,7 @@ tags: Combine many files and directories into a single t-archive file. ```sh -tar cf "$ARCHIVE".tar $DIR +tar cf "${archive}".tar ${dir} ``` You can remember this with the mnemonic '*C*reate *F*ile'. @@ -18,13 +18,13 @@ Unfortunately, this stores the full file path, so making a tar archive of `/etc/ It's often better to tell tar which path to start from using the `-C` flag. ```sh -tar cf "$ARCHIVE".tar -C /etc/ nginx +tar cf "${archive}".tar -C /etc/ nginx ``` Check the contents of your archive with: ```sh -tar tf "$ARCHIVE".tar +tar tf "${archive}".tar ``` If you want to store 'everything in a directory', then using `*` will not work, because it will target everything in the *current* directory. @@ -33,7 +33,7 @@ Instead, you can store the target in a variable: ```sh files=$(ls /etc/nginx) -tar cf "$ARCHIVE".tar -C /etc/nginx/ $file +tar cf "${archive}".tar -C /etc/nginx/ $file ``` # Extract @@ -41,7 +41,7 @@ tar cf "$ARCHIVE".tar -C /etc/nginx/ $file Extract the tar archive with ```sh -tar xf "$ARCHIVE".tar +tar xf "${archive}".tar ``` You can remember this with the mnemonic 'e*X*tract *F*ile'. @@ -51,7 +51,7 @@ You can remember this with the mnemonic 'e*X*tract *F*ile'. Create a zip-compressed archive with the `z` flag. ```sh -tar czf "$ARCHIVE".tgz -C /etc/nginx/ $file +tar czf "${archive}".tgz -C /etc/nginx/ $file ``` You can use any file ending you want, but sane people like to use '.tgz' or '.tar.tgz'. diff --git a/data/gpg.md b/data/gpg.md index adfb42f..bc8b675 100644 --- a/data/gpg.md +++ b/data/gpg.md @@ -132,7 +132,7 @@ Refreshing keys will tell you if some key you have contains a signature from som gpg --refresh-keys ``` -You can use the [crontab](../../system/cron.md) to refresh keys, but this will mostly fail, since keyservers often don't hold the right data. +You can use the [crontab](system/cron.md) to refresh keys, but this will mostly fail, since keyservers often don't hold the right data. # Export diff --git a/data/pass.md b/data/pass.md index a1adf91..03364f2 100644 --- a/data/pass.md +++ b/data/pass.md @@ -8,7 +8,7 @@ requires: - data/gpg.md --- -Setup [gpg](gpg.md) keys. +Setup [gpg](data/gpg.md) keys. Show your gpg secret it: @@ -19,28 +19,37 @@ gpg --list-secret-keys Then use the id number under `sec` to make a pass repo: ```sh -KEY="$(gpg --list-secret-keys | grep -m 1 -A1 '^sec' | tail -n 1)" +key="$(gpg --list-secret-keys | grep -m 1 -A1 '^sec' | tail -n 1)" ``` ```sh -pass init $KEY +pass init $key +cat .password-store/.gpg-id ``` -To add a basic password, e.g. for `$WEBSITE`: +To add a basic password, e.g. for `${website}`: ```sh -pass $WEBSITE +pass ${website} ``` To insert a multi-line password, e.g. with a login name: ```sh -pass add -m $WEBSITE +pass add -m ${website} ``` Remove a password: ```sh -pass rm $WEBSITE +pass rm ${website} ``` +You can generate passwords with `xkcdpass`. + +Automatically insert a password with `pass insert`: + + +```sh +xkcdpass | pass insert --echo ${website} +``` diff --git a/data/radicale.md b/data/radicale.md index cce2319..c868dbf 100644 --- a/data/radicale.md +++ b/data/radicale.md @@ -44,10 +44,11 @@ You might get it in the `apache` package or similar. `htpasswd` allows you to generate passwords for users, and place them in `/etc/radicale/users`. ```sh -PASS="$(xkcdpass)" -htpasswd -nb $USER "$PASS" | sudo tee -a /etc/radicale/users -echo "Your username is $USER" -echo "Your password is $PASS" +pass="$(xkcdpass)" +username=alice +htpasswd -nb ${username} "${pass}" | sudo tee -a /etc/radicale/users +echo "Your username is ${username}" +echo "Your password is ${pass}" ``` Right now, you can't sign into the server except through the localhost, which is pointless. So now we add a subdomain to `nginx`. @@ -97,8 +98,8 @@ sudo ln -s /etc/nginx/sites-available/radicale /etc/nginx/sites-enables/ Finally, replace the example `DOMAIN` with your actual domain name. ```sh -DOMAIN=whatever.com -sudo sed -i "s/DOMAIN/$DOMAIN/g" /etc/nginx/sites-available/radicale +domain=whatever.com +sudo sed -i "s/DOMAIN/${domain}/g" /etc/nginx/sites-available/radicale ``` (optional: replace that `cal.` prefix with anything else) @@ -111,7 +112,7 @@ sudo nginx -t You will almost certainly need a new SSL certificate for the site: ```sh -sudo certbod -d cal.$DOMAIN +sudo certbod -d cal.${domain} ``` Start or restart both services: diff --git a/data/search_system.md b/data/search_system.md index 9a1be85..7d4b681 100644 --- a/data/search_system.md +++ b/data/search_system.md @@ -26,7 +26,7 @@ Once you have the database, you can find nearly any file instantly. - Search for jpg images with 'dog' or 'Dog' in the name: `locate -i dog jpg` - Search for videos: `plocate --regex '.mp4$|.mkv$|.wmv$|.webm$|.mov$|.avi$'` -For best results, run `updatedb` regularly, perhaps in [crontab](../system/cron.md). +For best results, run `updatedb` regularly, perhaps in [crontab](system/cron.md). ## Search More Places diff --git a/data/soft-serve/soft_https.md b/data/soft-serve/soft_https.md index 8cd9f8d..9cf02ac 100644 --- a/data/soft-serve/soft_https.md +++ b/data/soft-serve/soft_https.md @@ -41,7 +41,7 @@ git clone http://localhost:23232/${some_repo}.git ### `https` Setup -Put this file at `/etc/nginx/sites-enabled/$DOMAIN.tld`, then set up standard certificates with [nginx](../../networking/website/nginx.md). +Put this file at `/etc/nginx/sites-enabled/$DOMAIN.tld`, then set up standard certificates with [nginx](networking/nginx.md). (replace `${DOMAIN_NAME}` with your domain's name). diff --git a/distros/void/void_basics.md b/distros/void/void_basics.md index b1709d0..14157cd 100644 --- a/distros/void/void_basics.md +++ b/distros/void/void_basics.md @@ -58,5 +58,5 @@ brightnessctl s 10%+ - [autologin](autologin.md) - [services](sv.md) -- [wifi](../../networking/wpa_supplicant.md) +- [wifi](networking/wpa_supplicant.md) diff --git a/hardware/printers.md b/hardware/printers.md index 4743964..8c5532b 100644 --- a/hardware/printers.md +++ b/hardware/printers.md @@ -3,9 +3,10 @@ title: printers tags: - hardware --- + # Cups: The Common Unix Printing System -Configure cups at /etc/cups/supsd.conf, or visit the local webpage at http://localhost:631 if you want to use the Apple interface, otherwise, it's the printing daemon. +Configure cups at `/etc/cups/supsd.conf`, or visit the local webpage at http://localhost:631 if you want to use the Apple interface, otherwise, it's the printing daemon. # The Printing Daemon diff --git a/system/deduplicate.md b/system/deduplicate.md index 1ac7c43..de2c7fa 100644 --- a/system/deduplicate.md +++ b/system/deduplicate.md @@ -16,7 +16,7 @@ rdfind $dir $EDITOR results.txt ``` -Replace the duplicated files with [hard links](../basics/hard_links.md). +Replace the duplicated files with [hard links](system/hard_links.md). ```sh rdfind -makehardlinks true $dir diff --git a/system/makefiles/patterns.md b/system/makefiles/patterns.md index 14ae4d6..ac63253 100644 --- a/system/makefiles/patterns.md +++ b/system/makefiles/patterns.md @@ -5,7 +5,7 @@ tags: - make --- -Using the [basic example](../makefiles.md), you can make a complete backup of all backup files. +Using the [basic example](system/makefiles.md), you can make a complete backup of all backup files. This file will depend upon everything inside the `$(storage_directory)`. Unlike `bash`, you can't just say `storage_directory/*`: the pattern must be stated as a 'wildcard'.