Compare commits

...

5 Commits

Author SHA1 Message Date
0abc2818e8
use title as db key 2025-02-13 03:52:15 +01:00
4250f619c3
unify kernel notes 2025-02-13 01:42:50 +01:00
4d53f7c7d6
rebuild on $dir/$file.md changes
Still not rebuilding on changes to $dir/$dir/$file.md.
2025-02-13 01:34:33 +01:00
38feabb79f
name fix 2025-02-13 01:16:24 +01:00
b4683a8681
add contents to databases 2025-02-13 00:08:34 +01:00
7 changed files with 47 additions and 45 deletions

View File

@ -4,6 +4,8 @@ EDITOR ?= vi
FZF != command -v sk || command -v fzy || command -v fzf || \
{ echo install a fuzzy finder && exit 1 ;}
spill_contents = sed -e '1,/---/d'
help: ## Print the help message
@awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z._-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) | \
sort | \
@ -11,13 +13,18 @@ help: ## Print the help message
articles != find * -type f -name "*.md"
categories != ls -d */
dirs != ls -d */
categories = $(patsubst %/, %, $(dirs))
databases = $(patsubst %/, .dbs/%.rec, $(categories))
databases = $(patsubst %, .dbs/%.rec, $(categories))
default += $(databases)
$(databases): .dbs/%.rec: %/ | .dbs/
$(foreach dir, $(categories), \
$(eval .dbs/$(dir).rec: $(wildcard $(dir)/*)) \
)
$(databases): .dbs/%.rec: %/
$(info making $(@F))
@mkdir -p $(@D)
for entry in $(shell find $< -type f -name "*.md") ; do \
@ -29,13 +36,15 @@ $(databases): .dbs/%.rec: %/ | .dbs/
done > $@
for entry in $(shell find $< -type f -name "*.md"); do \
recset $@ -e "file = '$${entry}'" -f wordcount --set-add="$$(wc -w < $${entry})" ;\
recset $@ -e "file = '$${entry}'" -f content --set-add="$$($(spill_contents) $${entry})" ;\
done
db.rec: $(databases)
printf '%s\n' '%rec: guide' > $@
printf '%s\n' '%key: title' >> $@
printf '%s\n' '%type: wordcount int' >> $@
printf '%s\n\n' '%sort: title' >> $@
cat $^ >> $@
recsel $^ >> $@
recsel $@ -e "requires != ''" -CR title,requires |\
while read title requires; do \
IFS=', ' && for provider in $$requires; do \

View File

@ -1,34 +0,0 @@
---
title: "kernel"
tags: [ "Basics" ]
---
## Living Space
Kernel modules live in lib/modules/$(uname -r)
## Change
Load them with
```bash
sudo modprobe ath9k
```
Or remove one with
```bash
sudo modprove uvcvideo
```
The PC's irritating speaker beep can be really annoying. Disable it with:
```bash
sudo modprobe -r pcspeaker
```
Permanently disable a module by blacklisting it in `/etc/modprobe.d`:
```bash
echo 'blacklist pcspkr' > /etc/modprobe.d/*nobeep*.conf
```

View File

@ -1,5 +1,5 @@
---
title: "git"
title: "git subtree"
tags: [ "data", "git", "subtree" ]
---

View File

@ -1,5 +1,5 @@
---
title: "gpg"
title: "gpg with vim"
tags: [ "vim", "data", "GPG" ]
requires: [ "GPG Basics", "vim basics" ]
---

View File

@ -1,6 +1,6 @@
---
title: "fonts"
tags: [ "distros" ]
title: "Ach Linux GPU Setup"
tags: [ "arch", "GPU" ]
---
# Step 1: Multilib
@ -60,4 +60,3 @@ You should see 'true' here.
```bash
sudo pacman -S --needed lib32-mesa vulkan-radeon lib32-vulkan-radeon vulkan-icd-loader lib32-vulkan-icd-loader xf86-video-amdgpu
```

View File

@ -1,5 +1,5 @@
---
title: "Makefiles"
title: "make help target"
tags: [ "system", "make", "help" ]
---

View File

@ -1,8 +1,36 @@
---
title: "kernel"
title: "kernel modules"
tags: [ "system" ]
---
Kernel modules live in lib/modules/$(uname -r)
## Change
Load them with
```sh
modprobe ath9k
```
Or remove one with
```sh
modprove uvcvideo
```
The PC's irritating speaker beep can be really annoying. Disable it with:
```sh
modprobe -r pcspeaker
```
Permanently disable a module by blacklisting it in `/etc/modprobe.d`:
```sh
echo 'blacklist pcspkr' > /etc/modprobe.d/*nobeep*.conf
```
Check which kernel modules are loaded into memory:
```sh