clean up old formatting

This commit is contained in:
2026-04-27 13:13:22 +02:00
parent ea4f44e096
commit 319ae8df79
11 changed files with 39 additions and 28 deletions

View File

@@ -41,7 +41,7 @@ Check your `~/.config/profanity/profrc` for how to data's saved.
## Automatically Sign In ## 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* /account set ${name}@${host} eval_password pass *xmpp*

View File

@@ -10,7 +10,7 @@ tags:
Combine many files and directories into a single t-archive file. Combine many files and directories into a single t-archive file.
```sh ```sh
tar cf "$ARCHIVE".tar $DIR tar cf "${archive}".tar ${dir}
``` ```
You can remember this with the mnemonic '*C*reate *F*ile'. 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. It's often better to tell tar which path to start from using the `-C` flag.
```sh ```sh
tar cf "$ARCHIVE".tar -C /etc/ nginx tar cf "${archive}".tar -C /etc/ nginx
``` ```
Check the contents of your archive with: Check the contents of your archive with:
```sh ```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. 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 ```sh
files=$(ls /etc/nginx) files=$(ls /etc/nginx)
tar cf "$ARCHIVE".tar -C /etc/nginx/ $file tar cf "${archive}".tar -C /etc/nginx/ $file
``` ```
# Extract # Extract
@@ -41,7 +41,7 @@ tar cf "$ARCHIVE".tar -C /etc/nginx/ $file
Extract the tar archive with Extract the tar archive with
```sh ```sh
tar xf "$ARCHIVE".tar tar xf "${archive}".tar
``` ```
You can remember this with the mnemonic 'e*X*tract *F*ile'. 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. Create a zip-compressed archive with the `z` flag.
```sh ```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'. You can use any file ending you want, but sane people like to use '.tgz' or '.tar.tgz'.

View File

@@ -132,7 +132,7 @@ Refreshing keys will tell you if some key you have contains a signature from som
gpg --refresh-keys 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 # Export

View File

@@ -8,7 +8,7 @@ requires:
- data/gpg.md - data/gpg.md
--- ---
Setup [gpg](gpg.md) keys. Setup [gpg](data/gpg.md) keys.
Show your gpg secret it: 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: Then use the id number under `sec` to make a pass repo:
```sh ```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 ```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 ```sh
pass $WEBSITE pass ${website}
``` ```
To insert a multi-line password, e.g. with a login name: To insert a multi-line password, e.g. with a login name:
```sh ```sh
pass add -m $WEBSITE pass add -m ${website}
``` ```
Remove a password: Remove a password:
```sh ```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}
```

View File

@@ -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`. `htpasswd` allows you to generate passwords for users, and place them in `/etc/radicale/users`.
```sh ```sh
PASS="$(xkcdpass)" pass="$(xkcdpass)"
htpasswd -nb $USER "$PASS" | sudo tee -a /etc/radicale/users username=alice
echo "Your username is $USER" htpasswd -nb ${username} "${pass}" | sudo tee -a /etc/radicale/users
echo "Your password is $PASS" 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. Right now, you can't sign into the server except through the localhost, which is pointless.
So now we add a subdomain to `nginx`. 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. Finally, replace the example `DOMAIN` with your actual domain name.
```sh ```sh
DOMAIN=whatever.com domain=whatever.com
sudo sed -i "s/DOMAIN/$DOMAIN/g" /etc/nginx/sites-available/radicale sudo sed -i "s/DOMAIN/${domain}/g" /etc/nginx/sites-available/radicale
``` ```
(optional: replace that `cal.` prefix with anything else) (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: You will almost certainly need a new SSL certificate for the site:
```sh ```sh
sudo certbod -d cal.$DOMAIN sudo certbod -d cal.${domain}
``` ```
Start or restart both services: Start or restart both services:

View File

@@ -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 jpg images with 'dog' or 'Dog' in the name: `locate -i dog jpg`
- Search for videos: `plocate --regex '.mp4$|.mkv$|.wmv$|.webm$|.mov$|.avi$'` - 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 ## Search More Places

View File

@@ -41,7 +41,7 @@ git clone http://localhost:23232/${some_repo}.git
### `https` Setup ### `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). (replace `${DOMAIN_NAME}` with your domain's name).

View File

@@ -58,5 +58,5 @@ brightnessctl s 10%+
- [autologin](autologin.md) - [autologin](autologin.md)
- [services](sv.md) - [services](sv.md)
- [wifi](../../networking/wpa_supplicant.md) - [wifi](networking/wpa_supplicant.md)

View File

@@ -3,9 +3,10 @@ title: printers
tags: tags:
- hardware - hardware
--- ---
# Cups: The Common Unix Printing System # 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 # The Printing Daemon

View File

@@ -16,7 +16,7 @@ rdfind $dir
$EDITOR results.txt $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 ```sh
rdfind -makehardlinks true $dir rdfind -makehardlinks true $dir

View File

@@ -5,7 +5,7 @@ tags:
- make - 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)`. 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'. Unlike `bash`, you can't just say `storage_directory/*`: the pattern must be stated as a 'wildcard'.