m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cron.md9
-rw-r--r--git.md5
-rw-r--r--gpg.md19
-rw-r--r--pacman.md10
-rw-r--r--systemd.md11
5 files changed, 54 insertions, 0 deletions
diff --git a/cron.md b/cron.md
new file mode 100644
index 0000000..8767452
--- /dev/null
+++ b/cron.md
@@ -0,0 +1,9 @@
+# Running recurring tasks with cron
+
+List current cron jobs:
+
+ crontab -l
+
+Edit your cron jobs:
+
+ crontab -e
diff --git a/git.md b/git.md
index c8582af..c8ae6ae 100644
--- a/git.md
+++ b/git.md
@@ -16,3 +16,8 @@
git checkout <some commit a while ago>
git bisect old
git bisect run <command that returns 1 on old, 0 on new>
+
+## Patches
+
+ git diff > change.patch
+ patch -p1 < change.patch # -p1 to remove the a/ and b/ from filepaths
diff --git a/gpg.md b/gpg.md
index 569a91e..d54836d 100644
--- a/gpg.md
+++ b/gpg.md
@@ -28,3 +28,22 @@ Add `--armor` to make it readable-ASCII encoded.
## Asymmetric crypto
gpg --encrypt [--sign] [-u <signer>] [--recipient <receipient>] file
+
+## gpg-agent
+
+`gpg-agent` is a daemon that e.g. provides a passphrase cache for GPG. Running
+enters an interactive shell. Commands can be also be passed on the command line
+as individual arguments.
+
+Configuration in `~/.gnupg/gpg-agent.conf`
+
+* `/bye`: closes connection and shell
+* `keyinfo --list`: lists some information about keys
+
+ S KEYINFO FE40F504838C6FEDF80C0A592AE43EA8BFFC619E D - - - P - - -
+ S KEYINFO 8E6D7DD22EA6A76CB7CB4E52315D4F372F67A23C D - - 1 P - - -
+
+ The long identifier is a "keygrip", use `gpg --list-keys --with-keygrip` to
+ match key with keygrip. The 6th column indicates if the passphrase is currently
+ cached.
+* `reloadagent`: restarts the agent.
diff --git a/pacman.md b/pacman.md
index 93c13b2..5c0350f 100644
--- a/pacman.md
+++ b/pacman.md
@@ -3,3 +3,13 @@
## Downgrade cached package
pacman -U /var/cache/pacman/pkg/package-version...
+
+## Cleaning cache
+
+ paccache -r
+
+* `-k`: how many past versions of each package to keep, defaults to 3.
+* `-u`: target only uninstalled packages.
+
+ # remove all versions of uninstalled packages
+ paccache -ruk0
diff --git a/systemd.md b/systemd.md
new file mode 100644
index 0000000..30ff0cd
--- /dev/null
+++ b/systemd.md
@@ -0,0 +1,11 @@
+# Systemd control
+
+## Unit files
+
+Find unit file for given service:
+
+ systemctl status <service>
+
+After editing unit file, need to reload wih
+
+ systemctl daemon-reload