From 210dc82ee943943377500667a182046ff647ab9e Mon Sep 17 00:00:00 2001 From: dadada Date: Tue, 14 Nov 2023 19:05:16 +0100 Subject: [PATCH] Reformat using prettier --- blog/gpg/index.html | 68 ++++++---- blog/home-layout/index.html | 104 +++++++++++---- blog/index.html | 30 +++-- index.html | 48 +++++-- talks/pad-archiver/index.html | 154 ++++++++++++--------- talks/systemd-generator/index.html | 206 +++++++++++++++++------------ 6 files changed, 395 insertions(+), 215 deletions(-) diff --git a/blog/gpg/index.html b/blog/gpg/index.html index 4e5c690..f69184e 100644 --- a/blog/gpg/index.html +++ b/blog/gpg/index.html @@ -1,19 +1,31 @@ - + dadada's web log - + - +
-
-
+ + +

Managing Stripped GPG Keys

-
+      
     +--(master pass)                   +----(user pass)--+
     |        |                         |                 |
     |     decrypts                 decrypts           decrypts
@@ -33,23 +45,33 @@ decrypts  +----------------+     +----------+      +-----------+
     +->| SEA (master)    |
        | remote on paper |
        +-----------------+
-			
+

- See here on how to strip the master key (sec) from your keyring and create secret subkeys (ssb) for daily active use. - The master key can sign (S) new subkeys, create certificates (C) and provide authentication (A). - The master key lives forever, while the ssb that is used for signing is created with an expiration date. - All encryption keys may remain valid indefinitely until revoked. - The master key can be used to revoke the subkeys. + See + here + on how to strip the master key (sec) from your keyring and create secret + subkeys (ssb) for daily active use. The master key can sign (S) new + subkeys, create certificates (C) and provide authentication (A). The + master key lives forever, while the ssb that is used for signing is + created with an expiration date. All encryption keys may remain valid + indefinitely until revoked. The master key can be used to revoke the + subkeys.

-

- A few considerations -

    -
  • use a separate PIN on the trusted system / for the master key (sec) in case a key-logger reads the PIN on a semi-trusted machine (e.g. laptop or android) when decrypting a secret subkey (ssb)
  • -
  • use subkey (A) for authenticating ssh
  • -
  • keep master key offline / air-gapped
  • -
+

A few considerations

+ +
    +
  • + use a separate PIN on the trusted system / for the master key (sec) in + case a key-logger reads the PIN on a semi-trusted machine (e.g. laptop + or android) when decrypting a secret subkey (ssb) +
  • +
  • use subkey (A) for authenticating ssh
  • +
  • keep master key offline / air-gapped
  • +
-
Released: 2017-12-03
+
Released: 2017-12-03
diff --git a/blog/home-layout/index.html b/blog/home-layout/index.html index c0051bd..fb5cff4 100644 --- a/blog/home-layout/index.html +++ b/blog/home-layout/index.html @@ -1,30 +1,66 @@ - + dadada's web log - + - +
-
-
+ + +

My $HOME

-

Recently, I came across a blog posting titled $HOME, sweet $HOME, where @blinry advocates for structuring your HOME directory based on projects and their activity. After reading this I felt inspired to finally have a look at the mess I made of my $HOME in the last years.

-

A few things about my old $HOME: -

    -
  • Documents contained basically everything I had accumulated during the last years besides music, videos, pictures and source code.
  • -
  • projects just contained one gigantic folder of all projects that I ever worked on. - the rest was based on the default xdg-user-dirs
  • -
-

-

If you sorted the files by file type like the default XDG directories - suggest, files from one project may be scattered across many different - directories.

-

So my goal for the new $HOME was to have a clean directory structure where: - it is obvious where to place new files - paths do not become too long to type out - the directory structure relates to how I work

-

A quick tour of my new $HOME:

+

+ Recently, I came across a blog posting titled + $HOME, sweet $HOME, where + @blinry advocates for structuring your + HOME directory based on projects and their activity. After + reading this I felt inspired to finally have a look at the mess I made + of my $HOME in the last years. +

+

A few things about my old $HOME:

+ +
    +
  • + Documents contained basically everything I had + accumulated during the last years besides music, videos, pictures and + source code. +
  • +
  • + projects just contained one gigantic folder of all + projects that I ever worked on. - the rest was based on the default + xdg-user-dirs +
  • +
+

+ If you sorted the files by file type like the default XDG directories + suggest, files from one project may be scattered across many different + directories. +

+

+ So my goal for the new $HOME was to have a clean directory + structure where: - it is obvious where to place new files - paths do not + become too long to type out - the directory structure relates to how I + work +

+

A quick tour of my new $HOME:

  • lib for immutable files
  • src for mutable files
  • @@ -32,19 +68,35 @@
  • tmp for unsorted files and downloads

The project directory

-

All of my projects are stored in src. I use a flat directory structure, where every project has its own subdirectory based on its name. Projects can become part of one or more larger contexts through the use of tags.

+

+ All of my projects are stored in src. I use a flat + directory structure, where every project has its own subdirectory based + on its name. Projects can become part of one or more larger contexts + through the use of tags. +

Tags

-

Tag directories are stored in tag. Each directory stores symbolic links to parts of a project that can be distributed around lib and src. One possible use for the tag directories is creating workbenches. If I use some directories in lib or src in different contexts, - tag can be used to include them in multiple workbenches.

+

+ Tag directories are stored in tag. Each directory stores + symbolic links to parts of a project that can be distributed around + lib and src. One possible use for the tag + directories is creating workbenches. If I use some directories in + lib or src in different contexts, + tag can be used to include them in multiple workbenches. +

An example workflow

-
+      
 $ cd tag
 $ mkdir -p course1/examples
 $ ln -s ~/src/example1 course1/examples/
 $ ln -s ~/lib/courses/course1 course1/material
 $ rm -r course1
-			
-

I create new tags for various reasons, but mostly one for each larger context (e.g. work, hobbies, admin foo, thesis, courseXY) and some more for tracking project activity. There are four different tags in tag directory right now for tracking project activity:

+
+

+ I create new tags for various reasons, but mostly one for each larger + context (e.g. work, hobbies, admin foo, thesis, courseXY) and some more + for tracking project activity. There are four different tags in + tag directory right now for tracking project activity: +

  • permanent
  • active
  • @@ -57,6 +109,6 @@ $ rm -r course1
-
Released: 2018-09-03
+
Released: 2018-09-03
diff --git a/blog/index.html b/blog/index.html index 1053cae..1bab622 100644 --- a/blog/index.html +++ b/blog/index.html @@ -1,22 +1,34 @@ - + dadada's web log - + - -
- +
+

dadada's web log

-
+
diff --git a/index.html b/index.html index fba75a2..6bfb95f 100644 --- a/index.html +++ b/index.html @@ -1,11 +1,23 @@ - + dadada - + - +

dadada's web page

-

Things I enjoy: learning things and skills, making and eating food, weird music, biking, trains

-

Tech stuff: Rust, Nix, networking, aircrafts, and a sprinkle of science, recovering from PHP, iOS, Android, explorer of legacy codebases

+

+ Things I enjoy: learning things and skills, making and eating food, + weird music, biking, trains +

+

+ Tech stuff: Rust, Nix, networking, aircrafts, and a sprinkle of science, + recovering from PHP, iOS, Android, explorer of legacy codebases +

Socials

Talks

Blog

    diff --git a/talks/pad-archiver/index.html b/talks/pad-archiver/index.html index f0058b2..55b6797 100644 --- a/talks/pad-archiver/index.html +++ b/talks/pad-archiver/index.html @@ -1,30 +1,48 @@ - + dadada - + - +
    -
    -

    📚 Gitlab als Archivar 📔

    -

    Eine kleine Spielerei zur Datensicherung.

    -

    🦣 @dadada@chaos.social

    -
    -

    Ausgangslage

    -

    Hochschulpolitik produziert viele Pads - Notizen - Protokolle - -Todolisten

    -

    Pads verschwinden unerwartet - Server tot - Niemand erinnert sich -mehr an den Link - Etherpad kann Löschfristen 🙈

    -

    Konsequenz:

    -
    -
    🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
    +    
    +

    📚 Gitlab als Archivar 📔

    +

    Eine kleine Spielerei zur Datensicherung.

    +

    + 🦣 @dadada@chaos.social +

    +
    +

    Ausgangslage

    +

    + Hochschulpolitik produziert viele Pads - Notizen - Protokolle - + Todolisten +

    +

    + Pads verschwinden unerwartet - Server tot - Niemand erinnert sich mehr + an den Link - Etherpad kann Löschfristen 🙈 +

    +

    Konsequenz:

    +
    +
    🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
     🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
     🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
     🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
    @@ -45,13 +63,13 @@ mehr an den Link - Etherpad kann Löschfristen 🙈

    🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥 🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥🔥
    -
    -

    Lösung 1: Copy-Paste

    -
      -
    • $Person kopiert ab und zu das Pad irgendwo hin
    • -
    • $Person braucht muss dran denken, ist aber etwas verplant
    • -
    -
    Pad           Wiki
    +      
    +

    Lösung 1: Copy-Paste

    +
      +
    • $Person kopiert ab und zu das Pad irgendwo hin
    • +
    • $Person braucht muss dran denken, ist aber etwas verplant
    • +
    +
    Pad           Wiki
     +-------+     +-------+
     |- Info |     |- Info |
     |  ...  |     |  ...  |
    @@ -60,28 +78,33 @@ mehr an den Link - Etherpad kann Löschfristen 🙈

    |- Ideen| |- Ideen| | ... | | ... | +-------+ +-------+
    -
    -

    Lösung 2: Git und -Update-Script

    -
      -
    • Pad-URLs in Datei
    • -
    • Pads als Plaintext exportieren
    • -
    • In Git einchecken
    • -
    -
    +------------------------+     +------+
    +      
    +

    + Lösung 2: Git und Update-Script +

    +
      +
    • Pad-URLs in Datei
    • +
    • Pads als Plaintext exportieren
    • +
    • In Git einchecken
    • +
    +
    +------------------------+     +------+
     |- http://pad.url/p/pad  |     | git  |
     |- http://pad.url/p/pad1 |---->| \pad |
     |           ...          |     | \pad1|
                                    |  ... |
    -

    Update-Script

    -
    -

    Lösung 3: CI

    -
      -
    • Scheduled Task führt Update-Script aus
    • -
    • Gitlab committet Änderungen automatisch
    • -
    -
    +--------------+            +-----------+
    +      

    + Update-Script +

    +
    +

    Lösung 3: CI

    +
      +
    • Scheduled Task führt Update-Script aus
    • +
    • Gitlab committet Änderungen automatisch
    • +
    +
    +--------------+            +-----------+
     | pad-archiver |-----CI---->| Container |
     +--------------+            +-----------+
      |                               |
    @@ -91,20 +114,26 @@ href="https://git.fginfo.tu-bs.de/fginfo/pad-archiver/-/blob/eac632d0cc68c7a9383
     | pads-repo |--Scheduled->| Docker-Runner |
     |           |<--Commits---|               |
     +-----------+             +---------------+
    -

    CI-Config -

    -
    -

    Lösung 4: Rewrite in Go

    -
      -
    • Empfehlung: go-git - Git nativ in Go -
        -
      • versucht kompatibel zu Git’s Plumbing und Porcelain zu sein
      • -
      • wird unter Anderem von Keybase und Gitea benutzt
      • -
    • -
    • LOC ist jetzt ein bisschen sehr viel mehr …
    • -
    -
                 ,_---~~~~~----._             +--------------+
    +      

    + CI-Config + +

    +
    +

    Lösung 4: Rewrite in Go

    +
      +
    • + Empfehlung: go-git - Git nativ in Go +
        +
      • versucht kompatibel zu Git’s Plumbing und Porcelain zu sein
      • +
      • wird unter Anderem von Keybase und Gitea benutzt
      • +
      +
    • +
    • LOC ist jetzt ein bisschen sehr viel mehr …
    • +
    +
                 ,_---~~~~~----._             +--------------+
            _,,_,*^____      _____``*g*\"*,    | THIS IS FINE |
           / __/ /'     ^.  /      \ ^@q   f   +--------------+
         [  @f | @))    |  | @))   l  0 _/     //
    @@ -115,9 +144,10 @@ href="https://git.fginfo.tu-bs.de/fginfo/pad-archiver/-/tree/eac632d0cc68c7a9383
            ]             ~ ~             |
            |                            |
             |                           |   
    -

    Rewritten

    -
    -
    Released: 2022-12-03
    - - \ No newline at end of file +

    + Rewritten +

    +
    +
    Released: 2022-12-03
    + + diff --git a/talks/systemd-generator/index.html b/talks/systemd-generator/index.html index bc97655..03f2295 100644 --- a/talks/systemd-generator/index.html +++ b/talks/systemd-generator/index.html @@ -1,100 +1,132 @@ - + systemd.generator(7) - + - +
    -
    -

    systemd.generator(7)

    -

    Recording

    -

    Dynamische Systeme sind -schwierig

    -
      -
    • ➤ Devices, Mountpoints, Services, Timer möglichst als Unit
    • -
    • Transitionstechnologie für /etc/fstab und SysV -init-Skripte
    • -
    • Hooks für den Bootprozess (System-Update, Resume, Debug …)
    • -
    • Umgebungsvariablen setzen
    • -
    • ➤ Generatoren generieren beim Boot dynamisch Units
    • -
    -

    Calling convention

    -

    # /path/to/generator normal-dir early-dir late-dir

    -
      -
    • Generatoren sind in -
        -
      • /run/systemd/{system,user}-generators/*
      • -
      • /etc/systemd/{system,user}-generators/*
      • -
      • /usr/lib/systemd/{system,user}-generators/*
      • -
      • /usr/local/lib/systemd/{system,user}-generators/*
      • -
    • -
    -

    Generierte Units

    -
      -
    • neu generieren mit systemctl daemon-reload
    • -
    • generierte Units landen in -
        -
      • normal-dir/run/systemd/generator
      • -
      • early-dir ➤ -/run/systemd/generator.early
      • -
      • late-dir ➤ -/run/systemd/generator.late
      • -
    • -
    -

    Templating

    -
      -
    • generierte Units dürfen auch sein -
        -
      • Templates
      • -
      • Instanzen von Templates (getty@tty1.service)
      • -
    • -
    • Generatoren können auch Symlinks in .wants/, -.target und .requires/ erstellen
    • -
    -

    Abhängigkeiten vermeiden

    -
      -
    • kein syslog oder journal benutzen
    • -
    • keine Units starten
    • -
    • keine nicht essentiellen Dateisysteme verwenden (aber /proc, /usr, -/sys und /dev)
    • -
    • Generatoren werden parallel ausgeführt
    • -
    -

    Performance

    -

    kann Boot verlangsamen ➤ Nicht mit bash implementieren, lieber C

    -

    Debugging

    -
    dir=$(mktemp -d)
    +    
    +

    systemd.generator(7)

    +

    Recording

    +

    + Dynamische Systeme sind schwierig +

    +
      +
    • ➤ Devices, Mountpoints, Services, Timer möglichst als Unit
    • +
    • + Transitionstechnologie für /etc/fstab und SysV + init-Skripte +
    • +
    • Hooks für den Bootprozess (System-Update, Resume, Debug …)
    • +
    • Umgebungsvariablen setzen
    • +
    • ➤ Generatoren generieren beim Boot dynamisch Units
    • +
    +

    Calling convention

    +

    # /path/to/generator normal-dir early-dir late-dir

    +
      +
    • + Generatoren sind in +
        +
      • /run/systemd/{system,user}-generators/*
      • +
      • /etc/systemd/{system,user}-generators/*
      • +
      • /usr/lib/systemd/{system,user}-generators/*
      • +
      • + /usr/local/lib/systemd/{system,user}-generators/* +
      • +
      +
    • +
    +

    Generierte Units

    +
      +
    • neu generieren mit systemctl daemon-reload
    • +
    • + generierte Units landen in +
        +
      • + normal-dir/run/systemd/generator +
      • +
      • + early-dir/run/systemd/generator.early +
      • +
      • + late-dir/run/systemd/generator.late +
      • +
      +
    • +
    +

    Templating

    +
      +
    • + generierte Units dürfen auch sein +
        +
      • Templates
      • +
      • Instanzen von Templates (getty@tty1.service)
      • +
      +
    • +
    • + Generatoren können auch Symlinks in .wants/, + .target und .requires/ erstellen +
    • +
    +

    Abhängigkeiten vermeiden

    +
      +
    • kein syslog oder journal benutzen
    • +
    • keine Units starten
    • +
    • + keine nicht essentiellen Dateisysteme verwenden (aber /proc, /usr, + /sys und /dev) +
    • +
    • Generatoren werden parallel ausgeführt
    • +
    +

    Performance

    +

    kann Boot verlangsamen ➤ Nicht mit bash implementieren, lieber C

    +

    Debugging

    +
    dir=$(mktemp -d)
     SYSTEMD_LOG_LEVEL=debug /usr/lib/systemd/system-generators/systemd-fstab-generator "$dir" "$dir" "$dir"
     find $dir
    -
      -
    • syslog(3) ist nicht vefügbar
    • -
    • keine Magie versuchen
    • -
    -

    Nicht geeignet für

    -
      -
    • Ersatz von init-Skripten ➤ systemd-sysv-generator(8)
    • -
    • dynamische Konfigurationsdateien ➤ ExecStartPre= oder -Service mit Before=
    • -
    -

    Beispiele

    -
      -
    • systemd-fstab-generator(8)

    • -
    • systemd-debug-generator(8)

    • -
    • systemd-getty-generator(8)

    • -
    • systemd-sysv-generator(8)

    • -
    • systemd.environment-generator(7)

    • -
    -

    Source

    -
      -
    • man 7 systemd.generator
    • -
    -
    -
    Released: 2019-03-14
    - +
      +
    • syslog(3) ist nicht vefügbar
    • +
    • keine Magie versuchen
    • +
    +

    Nicht geeignet für

    +
      +
    • Ersatz von init-Skripten ➤ systemd-sysv-generator(8)
    • +
    • + dynamische Konfigurationsdateien ➤ ExecStartPre= oder + Service mit Before= +
    • +
    +

    Beispiele

    +
      +
    • systemd-fstab-generator(8)

    • +
    • systemd-debug-generator(8)

    • +
    • systemd-getty-generator(8)

    • +
    • systemd-sysv-generator(8)

    • +
    • systemd.environment-generator(7)

    • +
    +

    Source

    +
      +
    • man 7 systemd.generator
    • +
    +
    + +