Skip to content

8th March 2024

Activism

Free Software

DevOps

  • New: Keyboard shortcuts.

    You can press ? to see the shortcuts. Some of the most useful are:

    • f: Toggle favourite
    • Shift+a: Archive element

Operating Systems

Linux

Linux Snippets

mkdocs

  • New: Center images.

    In your config enable the attr_list extension:

    markdown_extensions:
      - attr_list
    

    On your extra.css file add the center class

    .center {
        display: block;
        margin: 0 auto;
    }
    

    Now you can center elements by appending the attribute:

    ![image](../_imatges/ebc_form_01.jpg){: .center}
    

Wireguard

  • New: Improve logging.

    WireGuard doesn’t do any logging by default. If you use the WireGuard Linux kernel module (on kernel versions 5.6 or newer), you can turn on WireGuard’s dyndbg logging, which sends log messages to the kernel message buffer, kmsg. You can then use the standard dmesg utility to read these messages. Also, many Linux systems have a logging daemon like rsyslogd or journald that automatically captures and stores these messages.

    First, enable WireGuard dyndbg logging with the following commands:

    modprobe wireguard
    echo module wireguard +p > /sys/kernel/debug/dynamic_debug/control
    

    Once you do that, you’ll be able to see WireGuard log messages in the kernel message facility, if your system is set up with rsyslogd, journald, or a similar logging daemon. With rsyslogd, check the /var/log/kern.log or /var/log/messages file. With journald, run journalctl -ek.

  • New: Monitor wireguard.

Arts

Writing

Digital Gardens

  • New: Add the not by AI badge.

    Not by AI is an initiative to mark content as created by humans instead of AI.

    To automatically add the badge to all your content you can use the next script:

    echo "Checking the Not by AI badge"
    find docs -iname '*md' -print0 | while read -r -d $'\0' file; do
        if ! grep -q not-by-ai.svg "$file"; then
            echo "Adding the Not by AI badge to $file"
            echo "[![](../img/not-by-ai.svg){: .center}](https://notbyai.fyi)" >>"$file"
        fi
    done
    
    You can see how it's used in this blog by looking at the Makefile and the gh-pages.yaml workflow.