<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Random thoughts</title>
    <link>https://www.drakoland.fr/</link>
    <description>Recent content on Random thoughts</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Mon, 16 Dec 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://www.drakoland.fr/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Home row mod with kmonad and systemd</title>
      <link>https://www.drakoland.fr/home-row-mod/</link>
      <pubDate>Fri, 08 Mar 2024 00:00:00 +0000</pubDate>
      
      <guid>https://www.drakoland.fr/home-row-mod/</guid>
      <description>&lt;p&gt;Here are a few notes and explanations about how I use kmonad under
linux to apply home row modifier keys. For a fantastic introduction
and configuration guide about home row modifiiers, read this first: &lt;a href=&#34;https://precondition.github.io/home-row-mods&#34;&gt;A
guide to home row mods&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ll base my kmonad configuration files on what&amp;rsquo;s written in this
aforementioned guide.&lt;/p&gt;
&lt;p&gt;If you first want to read about kmonad and what it can do (spoiler: a
lot of things I thought only possible with firmware), the official
project is hosted there: &lt;a href=&#34;https://github.com/kmonad/kmonad&#34;&gt;https://github.com/kmonad/kmonad&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;making-it-work-with-hotplug&#34;&gt;Making it work with hotplug&lt;/h3&gt;
&lt;p&gt;The thing that I find missing, is how to have this working for devices
that you hotplug, may it be USB or Bluetooth. This is where both
&lt;em&gt;systemd&lt;/em&gt; and &lt;em&gt;udev&lt;/em&gt; come in handy.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;udev&lt;/em&gt; is used for device identification and reacting to
changes. &lt;em&gt;systemd&lt;/em&gt; and &lt;em&gt;udev&lt;/em&gt; can work together to manage the
associated kmonad process and its arguments, as a service. Then it&amp;rsquo;s
the kmonad process that will do the work of making the home row
modifiers magic.&lt;/p&gt;
&lt;h3 id=&#34;device-and-udev-rule-creation&#34;&gt;Device and udev rule creation&lt;/h3&gt;
&lt;p&gt;Let&amp;rsquo;s start with the device and its file. We&amp;rsquo;ll need a way to identify
it with the &lt;code&gt;udevadm&lt;/code&gt; tool and let &lt;em&gt;kmonad&lt;/em&gt; know which device file to
use. If you know the input event device file, you can use something like
that to help you build a &lt;em&gt;udev&lt;/em&gt; rule:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;udevadm info --attribute-walk /dev/input/by-id/usb-SONiX_USB_DEVICE-event-kbd
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For a bluetooth device, you can identify the device by its Bluetooth
address as displayed by &lt;code&gt;bluetoothctl&lt;/code&gt;. But you need to convert it to
lowercase if you want to find it in &lt;em&gt;udev&lt;/em&gt;&amp;rsquo;s tree.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;BT_ADDRESS=&amp;#34;00:1F:20:76:41:30&amp;#34;
BT_ADDRESS_LC=$(echo ${BT_ADDRESS,,}) # bash lowercase
udevadm info --tree | grep -C 20 $BT_ADDRESS_LC
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You should try to find a device from the input subsystem and its event
sub-device. Once you have it, use the same kind of &lt;code&gt;udevadm&lt;/code&gt; command
as for the USB keyboard. For my USB keyboard, I have a device alias (a
symbolic link) that is stable in &lt;code&gt;/dev/input/by-id/&lt;/code&gt;, so I&amp;rsquo;ll use that
in the &lt;em&gt;kmonad&lt;/em&gt; config. For the Bluetooth device, I&amp;rsquo;ll use the &lt;em&gt;udev&lt;/em&gt;
rule SYMLINK field to create a stable device name in &lt;code&gt;/dev&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;For udev rules, here is an exemple file to put in &lt;code&gt;/etc/udev/rules.d/60-keyboard-homerowmod.rules&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SUBSYSTEMS==&amp;#34;input&amp;#34;, TAG=&amp;#34;systemd&amp;#34;, ATTRS{name}==&amp;#34;SONiX USB DEVICE Keyboard&amp;#34;, ENV{SYSTEMD_WANTS}+=&amp;#34;kmonad@rk61.service&amp;#34;, ENV{ID_MODEL}=&amp;#34;Royal Kludge RK61 USB keyboard&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Or, for my bluetooth variant, also creating an alias to find it easily later:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SUBSYSTEM==&amp;#34;input&amp;#34;, TAG=&amp;#34;systemd&amp;#34;, ATTRS{name}==&amp;#34;RK-Bluetooth keyboard&amp;#34;, ENV{SYSTEMD_WANTS}+=&amp;#34;kmonad@rk61bt.service&amp;#34;, SYMLINK+=&amp;#34;rk61bt&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As you might have seen in the rules, there is a way to make &lt;em&gt;udev&lt;/em&gt; and
&lt;em&gt;systemd&lt;/em&gt; work together.&lt;/p&gt;
&lt;h3 id=&#34;systemd-to-the-rescue&#34;&gt;systemd to the rescue&lt;/h3&gt;
&lt;p&gt;For the &lt;em&gt;systemd&lt;/em&gt; service unit, here is a possible solution using
templating, defined as a &lt;code&gt;/etc/systemd/system/kmonad@.service&lt;/code&gt; file:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;[Unit]
Description=kmonad advanced keyboard daemon
StopWhenUnneeded=true

[Service]
Restart=on-abort
RestartSec=3
ExecStart=-/usr/local/bin/kmonad %E/kmonad/%i.kbd
Nice=-20

[Install]
WantedBy=default.target
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;%i&lt;/code&gt; part is the name of your configuration file and the instance
name of this template.&lt;/p&gt;
&lt;h3 id=&#34;kmonad-configuration&#34;&gt;kmonad configuration&lt;/h3&gt;
&lt;p&gt;For each instance of the service, as defined in your udev rules,
you’ll need a &lt;em&gt;kmonad&lt;/em&gt; configuration file. They should be at the path
defined in the systemd service. For instance: &lt;code&gt;/etc/kmonad/rk61bt.kbd&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Inside your configuration files, you need to use the same stable device
files as the ones created by &lt;em&gt;udev&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;For my case, here are the two stable devices files:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;/dev/rk61bt&lt;/code&gt; for the Bluetooth device, as requested in the udev rule as a SYMLINK&lt;/li&gt;
&lt;li&gt;&lt;code&gt;/dev/input/by-id/usb-SONiX_USB_DEVICE-event-kbd&lt;/code&gt; for the USB one&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And here is a snippet of the lines for the two inputs in my two kbd files:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;input  (device-file &amp;#34;/dev/rk61bt&amp;#34;)
input  (device-file &amp;#34;/dev/input/by-id/usb-SONiX_USB_DEVICE-event-kbd&amp;#34;)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;With all this, the &lt;em&gt;kmonad&lt;/em&gt; process is started when the device is plugged and stopped when it disappears.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Music everywhere</title>
      <link>https://www.drakoland.fr/music-everywhere/</link>
      <pubDate>Wed, 03 Jan 2024 00:00:00 +0000</pubDate>
      
      <guid>https://www.drakoland.fr/music-everywhere/</guid>
      <description>&lt;p&gt;Here is an article about how I play music around my different
computers or devices.&lt;/p&gt;
&lt;h2 id=&#34;collection&#34;&gt;Collection&lt;/h2&gt;
&lt;p&gt;I still have a music collection coming from various vinyl and compact
discs that I started converting to MP3s starting around 1999 when I
was offered a Rio PMP300. This device had so few memory space (32MB)
that I needed to convert with bitrates as low as 64kbps. In those days
it was really bad quality-wise. With the &lt;a href=&#34;https://lame.sourceforge.io/&#34;&gt;LAME
Project&lt;/a&gt; open-source encoding quality
made good progress. And I then often used the VBR &lt;em&gt;standard&lt;/em&gt; quality
of this encoder.&lt;/p&gt;
&lt;p&gt;Then &lt;a href=&#34;https://xiph.org/vorbis/&#34;&gt;Ogg Vorbis&lt;/a&gt; appeared and I heavily used
this format. It had good quality but hardware support was hard to find
on portable devices.&lt;/p&gt;
&lt;p&gt;These days I tend to use &lt;a href=&#34;https://xiph.org/flac/&#34;&gt;FLAC&lt;/a&gt; when I want to
keep quality at its premium but still often use &lt;em&gt;LAME&lt;/em&gt; with VBR or
320kbps CBR when I don&amp;rsquo;t want to use too much space.&lt;/p&gt;
&lt;p&gt;One thing is for sure, my dad was pretty wrong when he told me in
1999: &amp;ldquo;MP3 will be replaced in a few years&amp;rdquo;. MP3 is still here in the
2020s and the quality is still good enough for me.&lt;/p&gt;
&lt;h2 id=&#34;sharing-and-keeping-it-clean&#34;&gt;Sharing and keeping it clean&lt;/h2&gt;
&lt;p&gt;All my music is in a shared folder available to any family
user of my Nextcloud instance. It makes it really easy to share with
anyone or access it from anywhere. I can also sync a few albums easily
on my various devices to listen later offline.&lt;/p&gt;
&lt;p&gt;To keep it clean and well tagged, I use
&lt;a href=&#34;https://beets.readthedocs.io/en/stable/&#34;&gt;beets&lt;/a&gt;. On the Nextcloud
server, I use the CLI with a user that can have read and write access to
the actual files on the filesystem managed by Nextcloud. So, if anything
change, an &lt;code&gt;occ groupfolders:scan -- &amp;lt;group ID&amp;gt;&lt;/code&gt; is required to keep
both apps (NC and beets) in sync.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s start with one main use case.&lt;/p&gt;
&lt;h2 id=&#34;living-room&#34;&gt;Living room&lt;/h2&gt;
&lt;p&gt;I have a pair of studio monitors in my living room where I want to
listen to my music collection. Those monitors are connected to a USB
soundcard connected to my Raspberry Pi 4 (2GB) that is the Nextcloud
server (and a lot more, it may be the server sending you this page).&lt;/p&gt;
&lt;p&gt;As a long time &lt;a href=&#34;https://www.musicpd.org/&#34;&gt;MPD&lt;/a&gt; user, this was the
obvious choice to play from the music collection. It&amp;rsquo;s very old and
stable, it&amp;rsquo;s using very little resources, it has an API and can be
accessed over the network or a local socket. Another strong point: it
has an ecosystem of various clients that range from CLI tools to
dedicated apps or even web front ends.&lt;/p&gt;
&lt;p&gt;As we still use Android devices (I&amp;rsquo;d like to avoid that, Pinephone, I&amp;rsquo;m
looking at you for the future) the obvious app is: MALP.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://gitlab.com/gateship-one/malp&#34;&gt;https://gitlab.com/gateship-one/malp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;While on the local home Wi-Fi, we can use this as a remote that is
really light and fast. Almost no latency.&lt;/p&gt;
&lt;p&gt;If I&amp;rsquo;m using a laptop in the room, I tend to use
&lt;a href=&#34;https://github.com/ncmpcpp/ncmpcpp&#34;&gt;ncmpcpp&lt;/a&gt; over Wi-Fi to control MPD.
It&amp;rsquo;s simple, light and when you learn (or set) the keyboard bindings,
it&amp;rsquo;s easy to use. I was a &lt;a href=&#34;https://www.nongnu.org/sonata/&#34;&gt;Sonata&lt;/a&gt; user
before, but I try to use keyboard for everything it made sense to switch
to &lt;em&gt;ncmpcpp&lt;/em&gt;.&lt;/p&gt;
&lt;h2 id=&#34;streaming-or-remote-listening&#34;&gt;Streaming or remote listening&lt;/h2&gt;
&lt;p&gt;When out of range of my Wi-Fi or when I didn&amp;rsquo;t think about syncing my
music before leaving, Nextcloud is still there to the rescue. I use the
&lt;a href=&#34;https://github.com/owncloud/music&#34;&gt;Music app for Nextcloud&lt;/a&gt;. On a
desktop computer it does the job to browse and listen to anything in the
library. But the less known feature is that it provides APIs to serve
the music over the net: &lt;em&gt;Ampache&lt;/em&gt; and &lt;em&gt;Subsonic&lt;/em&gt; compatible.&lt;/p&gt;
&lt;p&gt;On my Android devices, I use the fantastic
&lt;a href=&#34;https://github.com/austinried/subtracks&#34;&gt;subtracks&lt;/a&gt; app that is
Subsonic-compatible. It&amp;rsquo;s simple and have, to my eyes, a great UI.&lt;/p&gt;
&lt;h2 id=&#34;whats-missing&#34;&gt;What&amp;rsquo;s missing&lt;/h2&gt;
&lt;p&gt;All my music needs are fulfilled with all those tools and services in
place. All? Really? No, there&amp;rsquo;s still a Podcast centralized sync
service missing. I tested various things and did not find one that
fulfilled the way I want it to work. At this time, I use my RSS
aggregator to store which episodes I listened to. But it still
requires a lot of manual downloading, app switching or web browsing.&lt;/p&gt;
&lt;p&gt;If you have any ideas, send me a &lt;a href=&#34;mailto:matt@drakoland.fr&#34;&gt;mail&lt;/a&gt; or
contact me &lt;a href=&#34;https://mamot.fr/@panmaster&#34;&gt;on Mastodon&lt;/a&gt;.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Adding an alternative name to a Let&#39;s Encrypt certificate</title>
      <link>https://www.drakoland.fr/adding-certbot-name/</link>
      <pubDate>Wed, 23 Aug 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.drakoland.fr/adding-certbot-name/</guid>
      <description>&lt;p&gt;Here is a short guide to add a new subject alternative name to an
existing certificate managed by &lt;code&gt;certbot&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;From time to time, I need to add or remove a domain name to my
reverse-proxy. After updating the DNS zone of my domain, I need to let
the &lt;code&gt;certbot&lt;/code&gt; utility update its certificates.&lt;/p&gt;
&lt;p&gt;First, to view the &lt;em&gt;certbot&lt;/em&gt; managed certificates, type this (with
&lt;code&gt;sudo&lt;/code&gt; or as &lt;em&gt;root&lt;/em&gt; if needed):&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;certbot certificates
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;It will tell you about the domains managed, the first one being used as
the certificate name.&lt;/p&gt;
&lt;p&gt;Then a dry-run of the update with the actual update:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;certbot certonly --cert-name &amp;lt;certificate name&amp;gt; --expand --dry-run \
    --domains &amp;lt;main domain&amp;gt;,&amp;lt;other domain&amp;gt;,&amp;lt;you new domain&amp;gt;
certbot certonly --cert-name &amp;lt;certificate name&amp;gt; --expand \
    --domains &amp;lt;main domain&amp;gt;,&amp;lt;other domain&amp;gt;,&amp;lt;you new domain&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You&amp;rsquo;re new certificate should be ready. I tend to check it manually
with:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;openssl x509 -noout -text -in &amp;lt;path to cert&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And if it&amp;rsquo;s all OK and depending on your software using your
certificates, reload your app so that it uses it.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>How I use my IEMs under Linux</title>
      <link>https://www.drakoland.fr/iems-under-linux/</link>
      <pubDate>Sun, 05 Mar 2023 00:00:00 +0000</pubDate>
      
      <guid>https://www.drakoland.fr/iems-under-linux/</guid>
      <description>&lt;p&gt;Here is an overview of my software audio setup. The main goal here is to
have an equalizer than can compensate for the tuning of my in-ear
monitors. I bought cheap Chinese IEMs (for In-Ear Monitors) for around
15€. I knew that the tuning was bass heavy with what is called a
V-shaped frequency response graph. I like neutral frequency response.
Here are a few notes on what I do to fix that.&lt;/p&gt;
&lt;p&gt;First, let&amp;rsquo;s start with the basics. I don&amp;rsquo;t use any fancy sound cards,
only what&amp;rsquo;s on the device I use. It is all well supported and working
with &lt;a href=&#34;https://www.alsa-project.org/wiki/Main_Page&#34;&gt;Alsa&lt;/a&gt;. Then,
depending on my workstation or distribution, I use either
&lt;a href=&#34;https://www.freedesktop.org/wiki/Software/PulseAudio/&#34;&gt;PulseAudio&lt;/a&gt; or
&lt;a href=&#34;https://pipewire.org/&#34;&gt;PipeWire&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Then, to have my preferred audio frequency response, I use the fantastic
&lt;a href=&#34;https://github.com/jaakkopasanen/AutoEq&#34;&gt;AutoEq&lt;/a&gt; project. Go there for
more information or documentation on usage. To put it simply, I get the
settings for my device, use them in &lt;a href=&#34;https://github.com/wwmm/easyeffects&#34;&gt;Easy
Effects&lt;/a&gt; or its former application
name: &lt;em&gt;PulseEffects&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Now enjoy your music!&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Join the dark side… of Gnome 42</title>
      <link>https://www.drakoland.fr/gnome-42-dark-theme/</link>
      <pubDate>Wed, 30 Mar 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.drakoland.fr/gnome-42-dark-theme/</guid>
      <description>&lt;p&gt;As of today, my main computer has a few pieces of software from &lt;a href=&#34;https://release.gnome.org/42/&#34;&gt;Gnome
42&lt;/a&gt;. I like to use a dark theme these days. I
used to set my preference in the &lt;em&gt;Gnome Tweaks&lt;/em&gt; application. Now, I believe
the setting can be changed in the &lt;em&gt;Settings&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;But, as the package is not there yet, I tried to do it with the command line.
Here we go:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;gsettings get org.gnome.desktop.interface color-scheme
gsettings set org.gnome.desktop.interface color-scheme prefer-dark
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can find the definition of this setting &lt;a href=&#34;https://github.com/GNOME/gsettings-desktop-schemas/blob/42.0/schemas/org.gnome.desktop.interface.gschema.xml.in&#34;&gt;here on
Github&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The allowed values are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;default&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prefer-dark&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prefer-light&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
    <item>
      <title>Raspberry PI OS 64-bit announced</title>
      <link>https://www.drakoland.fr/raspberrypi-os-64-bit-announced/</link>
      <pubDate>Wed, 02 Feb 2022 00:00:00 +0000</pubDate>
      
      <guid>https://www.drakoland.fr/raspberrypi-os-64-bit-announced/</guid>
      <description>&lt;p&gt;Good news everyone! At last, the official 64-bit operating system for
Raspberry Pi is out (kernel and user-space). You can check the announcement
here:&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://www.raspberrypi.com/news/raspberry-pi-os-64-bit/&#34;&gt;https://www.raspberrypi.com/news/raspberry-pi-os-64-bit/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As an happy user and administrator of a Raspberry Pi 4 Model B, I was waiting
for this since I started encountering errors because of pieces of software
dropping support for ARM 32-bit architectures.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ll wait for things to settle a bit and enjoy a more stable OS. Then, I&amp;rsquo;ll
switch and at the same time try to ditch the Micro SD card and go fully on a
SATA/USB3 disk. See you next time for details.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Let&#39;s backup</title>
      <link>https://www.drakoland.fr/let-s-backup/</link>
      <pubDate>Mon, 27 Dec 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.drakoland.fr/let-s-backup/</guid>
      <description>&lt;p&gt;It&amp;rsquo;s been a long time without an article, let&amp;rsquo;s try to fix that with the
subject of today: backups.&lt;/p&gt;
&lt;h3 id=&#34;what-could-be-a-good-backup-strategy&#34;&gt;What could be a good backup strategy?&lt;/h3&gt;
&lt;p&gt;One of the rules I try to follow and kind of makes sense to me is the 3 2 1
rule :&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;3 copies&lt;/li&gt;
&lt;li&gt;2 different medias&lt;/li&gt;
&lt;li&gt;1 copy off site&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Let&amp;rsquo;s not be too rigid with those expectations. For me, the major difficulty
when you start to have a lot of content and don&amp;rsquo;t want to spend too much
money, is the off site copy. Three years ago, my off site copy was a small
hard disk that was synced almost every month and was stored at a place of a
family relative. Clearly, it worked one or two times and then was not done on
time and there, let&amp;rsquo;s face it, it was a big failure: I did not have an actual
copy, off site, with the data of the last month.&lt;/p&gt;
&lt;h3 id=&#34;off-site-copy-solution&#34;&gt;Off site copy solution&lt;/h3&gt;
&lt;p&gt;In order to avoid this pain of bringing back and forth the disk, I needed a
kind of replication software that just worked. Here comes
&lt;a href=&#34;https://syncthing.net/&#34;&gt;Syncthing&lt;/a&gt;, a wonderful small portable peace of free
software. You need to find a colleague, friend or relative that has a fiber or
xDSL connection at his home, a relatively always on host with disk space (a
NAS is often the best thing). You help them install &lt;em&gt;Syncthing&lt;/em&gt; on it, you
pair this and it&amp;rsquo;s done.&lt;/p&gt;
&lt;p&gt;Depending on the confidence you have on the security of the off site location,
you might want to configure &lt;em&gt;Syncthing&lt;/em&gt; folders on local and remote as, &lt;em&gt;Send
only&lt;/em&gt; and &lt;em&gt;Receive only&lt;/em&gt;, respectively. Further details in the documentation
there: &lt;a href=&#34;https://docs.syncthing.net/users/foldertypes.html&#34;&gt;Folder Types&lt;/a&gt;. You
can even go further and ask &lt;em&gt;Syncthing&lt;/em&gt; to encrypt the data on remote copies
for you (but it&amp;rsquo;s still in beta as of the date of this article).&lt;/p&gt;
&lt;h3 id=&#34;inside-the-backups&#34;&gt;Inside the backups&lt;/h3&gt;
&lt;p&gt;When I hear about backups, sometimes, people mean copies. To me, a backup
solution should be more than just a copy. I want to prevent the deletion
incident and be able to go back in time. As soon as this expectation comes into
place, it gets messy. I&amp;rsquo;ve been using a few technical solutions to keep
historical snapshots of my data: rsnapshot, manual rsync with complicated
rules, duplicity (and its DejaDup cousin) or even Bacula.&lt;/p&gt;
&lt;p&gt;But, for simplicity and my usage, &lt;a href=&#34;https://restic.net/&#34;&gt;restic&lt;/a&gt; is the
one I chose. I won&amp;rsquo;t dig too much in the features of this tool, I know it&amp;rsquo;s
not the best performing solution in town, but I like it and it fills my
requirements. I&amp;rsquo;ve never met (yet) a situation where I couldn&amp;rsquo;t find an old
copy of the files I was looking for.&lt;/p&gt;
&lt;h3 id=&#34;tying-it-all-together&#34;&gt;Tying it all together&lt;/h3&gt;
&lt;p&gt;I use only one &lt;em&gt;Restic&lt;/em&gt; repository in a directory on an NFS share that is also
a source &lt;em&gt;Syncthing&lt;/em&gt; share. For this NFS share to be accessible on every
hosts, I use two Systemd units.&lt;/p&gt;
&lt;p&gt;Here is the &lt;code&gt;backup.mount&lt;/code&gt; unit:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[Unit]
Description=Backup shared file system mount point

[Mount]
Where=/mnt/local-dir
What=192.168.0.5:/my-syncthing-folder
Type=nfs
&lt;/pre&gt;&lt;/code&gt;


&lt;p&gt;Here is the associated &lt;code&gt;backup.automount&lt;/code&gt; unit:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[Unit]
Description=Automounting for backups NFS

[Install]
WantedBy=multi-user.target

[Automount]
TimeoutIdleSec=10min
&lt;/pre&gt;&lt;/code&gt;


&lt;p&gt;These 2 units are located in the &lt;code&gt;/etc/systemd/system&lt;/code&gt; directory. It allows
the restic repository to be available on every hosts and be unmounted
automatically when not needed.&lt;/p&gt;
&lt;h3 id=&#34;system-backup-job&#34;&gt;System backup job&lt;/h3&gt;
&lt;p&gt;To backup a standard host, here is the systemd unit (&lt;code&gt;backup.service&lt;/code&gt;) to
launch the task:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[Unit]
Description=Backup with restic
Wants=backup.mount

[Service]
Environment=&amp;#34;RESTIC_REPOSITORY=&amp;lt;path to your restic repo&amp;gt;&amp;#34; \
            &amp;#34;RESTIC_PASSWORD_FILE=/etc/restic-pass&amp;#34;
ExecStart=/usr/bin/restic backup \
  --cleanup-cache --cache-dir=&amp;#34;%C/restic&amp;#34; \
  --exclude=&amp;#39;/home/**/.cache&amp;#39; \
  --exclude=&amp;#39;/home/**/.local/share/Trash&amp;#39; \
  --exclude=&amp;#39;/home/**/.vagrant.d&amp;#39; \
  --exclude=&amp;#39;/home/**/cache&amp;#39; \
  --exclude=&amp;#39;/home/*/Nextcloud&amp;#39; \
  --exclude=&amp;#39;/home/*/Videos&amp;#39; \
  --exclude=&amp;#39;/home/*/VirtualBox*&amp;#39; \
  /etc /home
SuccessExitStatus=3
&lt;/pre&gt;&lt;/code&gt;


&lt;p&gt;And then a timer (&lt;code&gt;backup.timer&lt;/code&gt;) to schedule this weekly:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[Unit]
Description=Launch a backup weekly

[Install]
WantedBy=timers.target

[Timer]
OnCalendar=Fri *-*-1..31 23:34:12
Persistent=true
RandomizedDelaySec=180
&lt;/pre&gt;&lt;/code&gt;


&lt;h3 id=&#34;node-backup-elements&#34;&gt;Node backup elements&lt;/h3&gt;
&lt;p&gt;I&amp;rsquo;ve got a main backup job scheduled on a host that takes care of backuping
the most complicated system. I use a personal script that includes snapshots
or dumps (BTRFS or MariaDB) and that is also in charge of putting the services
in maintenance mode if needed. It also do maintenance tasks on the Restic
repository: checks and enforcing my retention policy.&lt;/p&gt;
&lt;p&gt;Here is the way I enforce my retention policy:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;restic forget --prune --quiet \
  --keep-hourly=0 \
  --keep-daily=4 \
  --keep-weekly=3 \
  --keep-monthly=3 \
  --keep-yearly=1
&lt;/pre&gt;&lt;/code&gt;


&lt;h3 id=&#34;wrap-up&#34;&gt;Wrap-up&lt;/h3&gt;
&lt;p&gt;Here are a few things I use to have backups I can rely on. This is a bit too
complicated, it doesn&amp;rsquo;t follow a backup tip I like: make it very simple so
that restore is as painless as possible. To be quick in case of emergency, I
like to have a simple text file with the required commands to be able to
restore as fast as possible.&lt;/p&gt;
&lt;p&gt;Next step: try to restore the data and all components with Ansible. But that&amp;rsquo;s
a story for another day…&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Journald all your logs</title>
      <link>https://www.drakoland.fr/journald-all-your-logs/</link>
      <pubDate>Fri, 05 Mar 2021 14:41:00 +0000</pubDate>
      
      <guid>https://www.drakoland.fr/journald-all-your-logs/</guid>
      <description>&lt;p&gt;Let&amp;rsquo;s write about logs today. All those files that are scattered everywhere on
your systems, by processes that try to dump their actions in files.&lt;/p&gt;
&lt;h3 id=&#34;before&#34;&gt;Before&lt;/h3&gt;
&lt;p&gt;From what I&amp;rsquo;ve seen and experienced, on a GNU/Linux or BSD system, there is a
common path where the system logs should go: &lt;code&gt;/var/log&lt;/code&gt;. Sometimes you&amp;rsquo;ll read
a recommendation to have a dedicated mount point for this path, or its parent
&lt;code&gt;/var&lt;/code&gt;. It can be useful to avoid a denial of service if it gets filled up.
Spoiler: you might not need it after all…&lt;/p&gt;
&lt;p&gt;There often is a daemon that is supposed to be the main entry point to write
logs. This is the component that is reading all the data sent to him through
&lt;code&gt;/dev/log&lt;/code&gt; or the
&lt;a href=&#34;https://manpages.debian.org/buster/manpages-dev/syslog.3.en.html&#34;&gt;&lt;code&gt;syslog&lt;/code&gt;&lt;/a&gt;
system call. You could also use the
&lt;a href=&#34;https://manpages.debian.org/buster/bsdutils/logger.1.en.html&#34;&gt;&lt;code&gt;logger&lt;/code&gt;&lt;/a&gt; user
command.&lt;/p&gt;
&lt;p&gt;Depending on the &lt;em&gt;facility&lt;/em&gt;, &lt;em&gt;priority level&lt;/em&gt; or other rules, the messages are
written in a specific log file in &lt;code&gt;/var/log&lt;/code&gt;. This is why you&amp;rsquo;ll often find a
&lt;code&gt;messages&lt;/code&gt;, &lt;code&gt;kern.log&lt;/code&gt;, &lt;code&gt;daemon.log&lt;/code&gt; and many other files in you log directory.&lt;/p&gt;
&lt;p&gt;When another daemon is not configured to use the main &lt;code&gt;syslog&lt;/code&gt;, it can write
directly in this directory or its own subdirectory. That&amp;rsquo;s what &lt;code&gt;gdm&lt;/code&gt; is doing
on a Buster Debian GNU/Linux distribution.&lt;/p&gt;
&lt;p&gt;As you can see by yourself, after a few days, a lot of log files get new little
friends with a number at the end of their name or even compressed with &lt;code&gt;gzip&lt;/code&gt;.
This is managed by the log rotation. It can be a cron job calling another
dedicated utility, it can be managed by the &lt;code&gt;syslog&lt;/code&gt; daemon or directly by the
process writing its log files.&lt;/p&gt;
&lt;h3 id=&#34;the-problem&#34;&gt;The problem&lt;/h3&gt;
&lt;p&gt;As I&amp;rsquo;ve tried to show you in the previous section, this can be complicated and
there are a lot of actors in all this log files mess. As often said, this can be
interpreted as the &amp;ldquo;UNIX way&amp;rdquo;: each program does one thing and does it well;
furthermore, everything is managed as text files and it can be really handy when
you just have to view or &lt;code&gt;grep&lt;/code&gt; those files.&lt;/p&gt;
&lt;p&gt;When your system is getting old or when your applications handle real traffic,
this can get out of control. That&amp;rsquo;s why the log messages journey should be
evaluated long before your file system is full.&lt;/p&gt;
&lt;p&gt;In my humble sysadmin life, I often have to find the reasons why it&amp;rsquo;s getting
full. It&amp;rsquo;s a kind of cat and mouse game where you have to start from the log
file and find the journey of the log messages through your system. It&amp;rsquo;s fun a
few times, then it gets really annoying and you don&amp;rsquo;t want to do this anymore.
Here are a list of commands that can help you:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ls -altrh /var/log
du -x -h --max-depth=1 /var/log
lsof +D /var/log
lnav /var/log/&amp;lt;your big log file&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With those first three commands you should know who is writing files, what are
the latest ones and the biggest space consumers. Then, if there is a level of
indirection, you could be searching in the &lt;code&gt;syslog&lt;/code&gt; daemon or log rotation
configuration… Your goal is to fix this once for all, you just can&amp;rsquo;t remove the
files and leave, it will bite you once more in the future.&lt;/p&gt;
&lt;p&gt;A few words about &lt;a href=&#34;http://lnav.org/&#34;&gt;&lt;code&gt;lnav&lt;/code&gt;&lt;/a&gt; before going on. I just discovered
this command line utility (thanks Sébastien by the way). If you just look at log
files once in a month or less frequently, a pager like &lt;code&gt;less&lt;/code&gt; is enough. But if
you have to dig in log files every week, take a look at this great tool that can
save you a lot of time: &lt;a href=&#34;http://lnav.org/&#34;&gt;http://lnav.org/&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;journald-to-the-rescue&#34;&gt;&lt;code&gt;Journald&lt;/code&gt; to the rescue&lt;/h3&gt;
&lt;p&gt;Yes, we&amp;rsquo;re coming to a potential friend: &lt;code&gt;journald&lt;/code&gt;, which is part of
&lt;a href=&#34;https://systemd.io/&#34;&gt;&lt;code&gt;systemd&lt;/code&gt;&lt;/a&gt; (I love &lt;code&gt;systemd&lt;/code&gt; ;-). For all the applications
that know how to write their logs to a pipe or &lt;code&gt;syslog&lt;/code&gt; it can be used as the
only log daemon.&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s get straight to a specific thing: instead of simple text files, &lt;code&gt;journald&lt;/code&gt;
writes logs in a binary format that might be cleared on reboot. You need to use
&lt;code&gt;journalctl&lt;/code&gt; to read the logs and it can slow you down at first.  On Debian, you
have to create a directory to get persistent log data retention; as specified in
the &lt;a href=&#34;https://manpages.debian.org/buster/systemd/systemd-journald.8.en.html&#34;&gt;man
page&lt;/a&gt;,
you have to run this as root:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;mkdir -p /var/log/journal
systemd-tmpfiles --create --prefix /var/log/journal
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So, what do you get if you lose the text file log format? A lot. Let&amp;rsquo;s dive in
with some of the configuration options.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;SystemMaxUse
SystemKeepFree
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With those settings you can tame the file space usage of all the logs. It can
let you specify how much space you want it to use at most and how much it should
leave free. Even the default values are great!&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ForwardToSyslog
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you want, you can still forward logs to a traditional &lt;code&gt;syslog&lt;/code&gt; daemon with this
setting. Otherwise, the only way is to use a program aware of the
format used by &lt;code&gt;journald&lt;/code&gt;. It might be your only option if you want to forward
logs to another host that&amp;rsquo;s using the &lt;a href=&#34;https://tools.ietf.org/html/rfc5424&#34;&gt;RFC 5424 Syslog
Protocol&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You also get compression (by default), forward secure sealing and a lot of
features. For details dive in the man pages:
&lt;a href=&#34;https://manpages.debian.org/buster/systemd/journald.conf.5.en.html&#34;&gt;journald.conf(5)&lt;/a&gt;
,
&lt;a href=&#34;https://manpages.debian.org/buster/systemd/systemd-journald.service.8.en.html&#34;&gt;systemd-journald.service(8)&lt;/a&gt;
and
&lt;a href=&#34;https://manpages.debian.org/buster/systemd/journalctl.1.en.html&#34;&gt;journalctl(1)&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Next, let&amp;rsquo;s see a few commands that can save you a lot of time.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;journalctl --disk-usage
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;You&amp;rsquo;ll know how much you&amp;rsquo;re using with this one.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;journalctl --vacuum-size=1G
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It lets you specify that it should remove your oldest log messages until the
disk space they use falls below 1GB. You can also use a time constraint with
&lt;code&gt;--vacuum-time=&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;what-i-use&#34;&gt;What I use&lt;/h3&gt;
&lt;h4 id=&#34;apache-http-server&#34;&gt;Apache HTTP Server&lt;/h4&gt;
&lt;p&gt;By default, Apache HTTP server uses its own logfile management. As I like to
have a minimal number of actors writing logs, here is my recipe for &lt;code&gt;journald&lt;/code&gt;
usage with Apache.&lt;/p&gt;
&lt;p&gt;Because I use different virtual hosts, I don&amp;rsquo;t want to repeat myself and only
use one setting in the main configuration file: &lt;code&gt;/etc/apache2/apache2.conf&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ErrorLog syslog:daemon
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And in the &lt;code&gt;/etc/apache2/conf-available/&lt;/code&gt;, I add a file named
&lt;code&gt;other-vhosts-access-log.conf&lt;/code&gt; with this content:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;# Define an access log for VirtualHosts that don&#39;t define their own logfile
CustomLog &amp;quot;|/usr/bin/logger --tag apache2 --priority daemon.info&amp;quot; vhost_combined
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then you can enable this configuration file and restart you server:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;a2enconf other-vhosts-access-log
apache2ctl -t &amp;amp;&amp;amp; apache2ctl graceful
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next thing you know, no &lt;code&gt;apache2&lt;/code&gt; process should be using any file descriptors
in &lt;code&gt;/var/log&lt;/code&gt;.&lt;/p&gt;
&lt;h4 id=&#34;docker-and-containers&#34;&gt;Docker and containers&lt;/h4&gt;
&lt;p&gt;I did not write about this topic yet on purpose because your containers should
not write log files. They should use their standard and error outputs and let
the container management daemon forward everything with all the good tags.&lt;/p&gt;
&lt;p&gt;For Docker, here is a link to the documentation on the specific log driver:
&lt;a href=&#34;https://docs.docker.com/config/containers/logging/journald/&#34;&gt;https://docs.docker.com/config/containers/logging/journald/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;TL;DR here is a part of the content of my &lt;code&gt;/etc/docker/daemon.json&lt;/code&gt; file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;quot;log-driver&amp;quot;: &amp;quot;journald&amp;quot;,
&amp;quot;log-opts&amp;quot;: {
  &amp;quot;tag&amp;quot;: &amp;quot;{{.DaemonName}}/{{.Name}}&amp;quot;
},
&amp;quot;userns-remap&amp;quot;: &amp;quot;default&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(I also let the &lt;a href=&#34;https://docs.docker.com/engine/security/userns-remap/&#34;&gt;user namespace
isolation&lt;/a&gt; setting, as
you already should have this enabled.)&lt;/p&gt;
&lt;h4 id=&#34;php-fpm-or-any-php-usage&#34;&gt;PHP-FPM or any PHP usage&lt;/h4&gt;
&lt;p&gt;If you use PHP-FPM (I guess you should switch to it if you&amp;rsquo;re using &lt;code&gt;mod_php&lt;/code&gt;) the
option to define in &lt;code&gt;/etc/php/7.3/fpm/php-fpm.conf&lt;/code&gt; is:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;error_log = syslog
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;For the PHP CLI or any other PHP entry point, the documentation for the error
logging is &lt;a href=&#34;https://www.php.net/manual/en/errorfunc.configuration.php#ini.error-log&#34;&gt;in the
manual&lt;/a&gt;.
Use &lt;code&gt;syslog&lt;/code&gt; as value for the &lt;code&gt;error_log&lt;/code&gt; directive and you&amp;rsquo;re good to go.&lt;/p&gt;
&lt;h4 id=&#34;nextcloud&#34;&gt;Nextcloud&lt;/h4&gt;
&lt;p&gt;&lt;a href=&#34;https://nextcloud.com/&#34;&gt;Nextcloud&lt;/a&gt; is a PHP app but it also has its own log
management by default. Fortunately, there is a setting that can help you forward
the log messages to &lt;code&gt;journald&lt;/code&gt;. Here is what I use:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; &#39;log_type&#39; =&amp;gt; &#39;syslog&#39;,
 &#39;loglevel&#39; =&amp;gt; 2,
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The full logging documentation is &lt;a href=&#34;https://docs.nextcloud.com/server/21/admin_manual/configuration_server/logging_configuration.html&#34;&gt;here in the admin
manual&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;By default, it uses the &lt;code&gt;Nextcloud&lt;/code&gt; tag. If you want to see the logs:
&lt;code&gt;journalctl -t Nextcloud&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s all for today, but maybe I&amp;rsquo;ll revisit this post to add more apps.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Why I&#39;m using vim</title>
      <link>https://www.drakoland.fr/why-im-using-vim/</link>
      <pubDate>Sat, 23 Jan 2021 15:30:00 +0100</pubDate>
      
      <guid>https://www.drakoland.fr/why-im-using-vim/</guid>
      <description>&lt;p&gt;Sorry, this is going to be more technical than the previous post: feel free to
skip this post if you&amp;rsquo;re not into geeky details.&lt;/p&gt;
&lt;h3 id=&#34;whats-vim&#34;&gt;What&amp;rsquo;s vim?&lt;/h3&gt;
&lt;p&gt;Let&amp;rsquo;s get in the context: a program to edit files. But a program that have
really old roots and working well when you don&amp;rsquo;t want to touch your mouse. It
even works in the console as the interface is all text.&lt;/p&gt;
&lt;p&gt;The project home page is here: &lt;a href=&#34;https://www.vim.org/&#34;&gt;https://www.vim.org/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;There are a lot of text editors, I&amp;rsquo;ve used a few: Emacs, VSCode, neovim,
IntelliJ, Eclipse, nano or even Notepad++. But vim is the one that&amp;rsquo;s working
great for me.&lt;/p&gt;
&lt;h3 id=&#34;why-i-use-and-love-it&#34;&gt;Why I use and love it&lt;/h3&gt;
&lt;p&gt;When I discovered Linux, somewhere around 1997, I didn&amp;rsquo;t manage to have a
graphical environement, X11 was so hard to configure. The only text editor that
my mother found in the default console was vim. I was really annoyed when she
explained to me what I actually had to type to edit my X11 configuration file.
And I couldn&amp;rsquo;t event use the mouse. Don&amp;rsquo;t even think about quitting vi!&lt;/p&gt;
&lt;p&gt;Fast forward a few years and I enjoyed using other GNU/Linux distributions.
This time I tried to understand a few commands and it saved me a bit of time
while trying to fix things. When I started working, every Unix I worked on had
this editor. So I had to learn to use it. The documentation is good, you can
start with &lt;code&gt;vimtutor&lt;/code&gt; and there is the &lt;code&gt;:help&lt;/code&gt; command inside.&lt;/p&gt;
&lt;p&gt;In 2015, I tried to improve my typing and I switched my keyboard layout. It was
a great time to revisit my usage. I read a lot of articles and documentation
to improve my skills in this editor. I discovered the &lt;a href=&#34;http://vimdoc.sourceforge.net/htmldoc/visual.html#CTRL-V&#34;&gt;blockwise visual
mode&lt;/a&gt; and &lt;a href=&#34;http://vimdoc.sourceforge.net/htmldoc/insert.html#ins-completion&#34;&gt;insert mode
completion&lt;/a&gt;. I
never supposed this kind of features before.&lt;/p&gt;
&lt;h3 id=&#34;settings&#34;&gt;Settings&lt;/h3&gt;
&lt;p&gt;Default settings can change, it can vary depending on your Linux distribution.
In my case, in almost all the places I use this editor, it&amp;rsquo;s a Debian GNU/Linux
context. Even between versions you can have surprises such as the &lt;a href=&#34;http://vimdoc.sourceforge.net/htmldoc/options.html#&#39;mouse&#39;&#34;&gt;&lt;code&gt;&#39;mouse&#39;&lt;/code&gt;
setting&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Here are a few settings that I come to appreciate on my local machine, in the
&lt;code&gt;~/.vim/vimrc&lt;/code&gt; file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;set list listchars=nbsp:⎵,eol:↲
set number
set smartindent
set textwidth=80

:filetype plugin indent on
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As I like to use unbreakable spaces, very handy in French before punctuation, I
want to see them. And nothing fancy, that&amp;rsquo;s almost all.&lt;/p&gt;
&lt;p&gt;For format specific options, I use the
&lt;a href=&#34;http://vimdoc.sourceforge.net/htmldoc/filetype.html#ftplugin-overrule&#34;&gt;&lt;code&gt;ftplugin-overrule&lt;/code&gt;&lt;/a&gt;
capability. As a &lt;code&gt;mutt&lt;/code&gt; user, I like to set a few options, but just for this
usage. That&amp;rsquo;s why I have a &lt;code&gt;~/.vim/after/ftplugin/mail.vim&lt;/code&gt; file with this
content:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;set linebreak
set formatoptions+=w
set number
set spell
set spelllang=fr,en
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I don&amp;rsquo;t want to go into details with all those settings, if you want more info,
read the manual: &lt;a href=&#34;http://vimdoc.sourceforge.net/htmldoc/help.html&#34;&gt;&lt;code&gt;:help&lt;/code&gt;&lt;/a&gt; in
&lt;code&gt;vim&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;I don&amp;rsquo;t use any additional plugins and I try to learn and, at least, know what
features it can do. As a production/DevOps engineer, under any conditions, in
the middle of the night on an emergency for example, I know I&amp;rsquo;ll have to use it.
I don&amp;rsquo;t want to rely on a personal macro or setting that I won&amp;rsquo;t find on one of
the hundreds of environments (I have to share with my colleagues) that I
couldn&amp;rsquo;t tweak or prepare.&lt;/p&gt;
&lt;h3 id=&#34;beyond-the-editor&#34;&gt;Beyond the editor&lt;/h3&gt;
&lt;p&gt;As I&amp;rsquo;m a long time (almost 20 years) vim user, a lot of the key bindings and
logic feel natural to me. That&amp;rsquo;s why sometimes I&amp;rsquo;m looking for relatives in the
free software world. Just to list a few of them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://newsboat.org/&#34;&gt;&lt;code&gt;newsboat&lt;/code&gt;&lt;/a&gt; as an RSS reader&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;http://www.mutt.org/&#34;&gt;&lt;code&gt;mutt&lt;/code&gt;&lt;/a&gt; as an email reader where vim is a first time
citizen to compose your messages&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/fr/firefox/addon/tridactyl-vim/&#34;&gt;&lt;code&gt;tridactyl&lt;/code&gt;&lt;/a&gt; to
browse the web with your keyboard in Firefox with vim-style key bindings&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And to finish this post, I&amp;rsquo;ll give a huge thanks to Bram and all the project
contributors. Also thank you everyone sharing your tips and tricks anywhere.
Sometimes I like to visit the &lt;a href=&#34;https://www.reddit.com/r/vim/&#34;&gt;VIM Community on
Reddit&lt;/a&gt; and find really interesting points of
view and new commands.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Best Book of 2020</title>
      <link>https://www.drakoland.fr/best-book-of-2020/</link>
      <pubDate>Sat, 02 Jan 2021 00:00:00 +0000</pubDate>
      
      <guid>https://www.drakoland.fr/best-book-of-2020/</guid>
      <description>&lt;p&gt;Since I was offered an Amazon gift card when quitting my previous job, I have a
Kindle e-book reader (I would still not recommend this device anyway). And since
then I read more books than ever. I love the way you focus on only reading on
this kind of device. It&amp;rsquo;s even easier for me (french speaking) to have a
dictionary included when I&amp;rsquo;m reading in English.&lt;/p&gt;
&lt;p&gt;But let&amp;rsquo;s focus on what I read in 2020 and my best book: &lt;a href=&#34;https://en.wikipedia.org/wiki/Dan_Simmons#Historical_fiction&#34;&gt;The Abominable by Dan
Simmons&lt;/a&gt;. Why?
The story of this book is fascinating. No, not only the story in this book, the
story of how this book came to be. I&amp;rsquo;ve never been a fan of prefaces. But this
one is the best I&amp;rsquo;ve ever read.&lt;/p&gt;
&lt;p&gt;The plot is full of details on mountain climbing expeditions in places where no
human life should be. As it&amp;rsquo;s often said, men or women are not adapted to this
kind of extreme altitude.&lt;/p&gt;
&lt;p&gt;My piece of advice: read this book. I loved a lot of Dan Simmons books, it might
not be the best but it&amp;rsquo;s still an easy recommendation.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>What I want with this site</title>
      <link>https://www.drakoland.fr/what-i-want/</link>
      <pubDate>Sun, 27 Dec 2020 00:00:00 +0000</pubDate>
      
      <guid>https://www.drakoland.fr/what-i-want/</guid>
      <description>&lt;p&gt;These are my random thoughts about what I want with this site:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;be able to write in english and french&lt;/li&gt;
&lt;li&gt;write on anything, no need to think about sections or categories&lt;/li&gt;
&lt;li&gt;people can subscribe with their favorite feed reader&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://bradfrost.com/blog/post/death-to-bullshit-at-creative-mornings/&#34;&gt;no bullshit!&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
  </channel>
</rss>
