From 07c56086aa0c4e015c9044e333ae4001debcb28d Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 30 Apr 2024 13:14:09 +0300 Subject: Update content for html --- gemfeed/2008-06-26-perl-poetry.html | 10 +- ...12-29-using-my-nokia-n95-for-fixing-my-mta.html | 2 +- gemfeed/2010-04-09-standard-ml-and-haskell.html | 14 +- ...010-05-07-lazy-evaluation-with-standarn-ml.html | 6 +- .../2010-05-09-the-fype-programming-language.html | 50 +- .../2011-05-07-perl-daemon-service-framework.html | 20 +- .../2014-03-24-the-fibonacci.pl.c-polyglot.html | 8 +- ...2-05-run-debian-on-your-phone-with-debroid.html | 18 +- gemfeed/2016-04-03-offsite-backup-with-zfs.html | 10 +- ...04-09-jails-and-zfs-on-freebsd-with-puppet.html | 10 +- .../2016-04-16-offsite-backup-with-zfs-part2.html | 2 +- ...inning-up-my-own-authoritative-dns-servers.html | 16 +- ...20-object-oriented-programming-with-ansi-c.html | 10 +- ...alistic-load-testing-with-ioriot-for-linux.html | 28 +- ...-22-dtail-the-distributed-log-tail-program.html | 20 +- gemfeed/2021-04-24-welcome-to-the-geminispace.html | 16 +- ...021-05-16-personal-bash-coding-style-guide.html | 36 +- ...5-gemtexter-one-bash-script-to-rule-it-all.html | 26 +- gemfeed/2021-07-04-the-well-grounded-rubyist.html | 22 +- ...-08-01-on-being-pedantic-about-open-source.html | 30 +- gemfeed/2021-09-12-keep-it-simple-and-stupid.html | 28 +- gemfeed/2021-10-22-defensive-devops.html | 18 +- gemfeed/2021-11-29-bash-golf-part-1.html | 18 +- ...-12-26-how-to-stay-sane-as-a-devops-person.html | 30 +- gemfeed/2022-01-01-bash-golf-part-2.html | 16 +- gemfeed/2022-01-23-welcome-to-the-foo.zone.html | 8 +- ...022-02-04-computer-operating-systems-i-use.html | 42 +- gemfeed/2022-03-06-the-release-of-dtail-4.0.0.html | 28 +- gemfeed/2022-04-10-creative-universe.html | 22 +- .../2022-05-27-perl-is-still-a-great-choice.html | 12 +- gemfeed/2022-06-15-sweating-the-small-stuff.html | 44 +- ...22-07-30-lets-encrypt-with-openbsd-and-rex.html | 26 +- ...2-08-27-gemtexter-1.1.0-lets-gemtext-again.html | 20 +- gemfeed/2022-09-30-after-a-bad-nights-sleep.html | 32 +- .../2022-10-30-installing-dtail-on-openbsd.html | 22 +- ...-tried-emacs-but-i-switched-back-to-neovim.html | 16 +- ...22-12-24-ultrarelearning-java-my-takeaways.html | 24 +- gemfeed/2023-01-23-why-grapheneos-rox.html | 18 +- .../2023-02-26-how-to-shut-down-after-work.html | 16 +- ...-03-16-the-pragmatic-programmer-book-notes.html | 8 +- ...03-25-gemtexter-2.0.0-lets-gemtext-again-2.html | 14 +- ...4-01-never-split-the-difference-book-notes.html | 24 +- ...ithms-and-data-structures-in-golang-part-1.html | 12 +- ...iling-guprecords:-uptime-records-with-raku.html | 10 +- ...3-05-06-the-obstacle-is-the-way-book-notes.html | 26 +- ...3-06-01-kiss-server-monitoring-with-gogios.html | 30 +- ...17-career-guide-and-soft-skills-book-notes.html | 58 +-- ...07-21-gemtexter-2.1.0-lets-gemtext-again-3.html | 16 +- ...-08-18-site-reliability-engineering-part-1.html | 4 +- gemfeed/2023-09-25-dtail-usage-examples.html | 20 +- ...static-web-photo-albums-with-photoalbum.sh.html | 18 +- gemfeed/2023-11-11-mind-management-book-notes.html | 18 +- ...-11-19-site-reliability-engineering-part-2.html | 4 +- gemfeed/2023-12-10-bash-golf-part-3.html | 18 +- ...-01-09-site-reliability-engineering-part-3.html | 4 +- .../2024-01-13-one-reason-why-i-love-openbsd.html | 2 +- ...4-02-04-from-babylon5.buetow.org-to-.cloud.html | 28 +- ...quickly-logging-ideas-programmed-in-golang.html | 4 +- ...-04-01-KISS-high-availability-with-OpenBSD.html | 48 +- .../2024-05-01-slow-productivity-book-notes.html | 12 +- .../DRAFT-KISS-high-availability-with-OpenBSD.html | 22 +- gemfeed/DRAFT-site-reliability-engineering.html | 18 +- gemfeed/atom.xml | 522 +++++++++++---------- gemfeed/index.html | 4 +- index.html | 12 +- notes/a-monks-guide-to-happiness.html | 16 +- notes/career-guide-and-soft-skills.html | 58 +-- notes/index.html | 4 +- notes/influence-wihout-authority.html | 14 +- notes/mental-combat.html | 8 +- notes/mind-management.html | 18 +- notes/never-split-the-difference.html | 24 +- notes/slow-productivity.html | 12 +- notes/staff-engineer.html | 8 +- notes/the-obstacle-is-the-way.html | 26 +- notes/the-pragmatic-programmer.html | 8 +- notes/the-stoic-challenge.html | 6 +- other-resources.html | 2 +- resources.html | 2 +- site-mirrors.html | 8 +- testpage.html | 8 +- uptime-stats.html | 26 +- 82 files changed, 1001 insertions(+), 997 deletions(-) diff --git a/gemfeed/2008-06-26-perl-poetry.html b/gemfeed/2008-06-26-perl-poetry.html index 055e75b9..7d1ce809 100644 --- a/gemfeed/2008-06-26-perl-poetry.html +++ b/gemfeed/2008-06-26-perl-poetry.html @@ -8,7 +8,7 @@ -

Perl Poetry


+

Perl Poetry



Published at 2008-06-26T21:43:51+01:00; Updated at 2021-05-04

@@ -41,7 +41,7 @@ _~~|~/_|_|__/|~~~~~~~ | / ~~~~~ | | ~~~~~~~~
https://en.wikipedia.org/wiki/Perl

-

math.pl


+

math.pl



deriving Show
-

Processing a multi


+

Processing a multi



Standard ML:

@@ -74,7 +74,7 @@ test_number w = number ((Union (Union (Elem 4) (Elem 4)) Empty)))) w
-

Simplify function


+

Simplify function



Standard ML:

@@ -116,7 +116,7 @@ http://www.gnu.org/software/src-highlite --> simplify x = x
-

Delete all


+

Delete all



Standard ML:

@@ -145,7 +145,7 @@ http://www.gnu.org/software/src-highlite --> delete_all’ x = x
-

Delete one


+

Delete one



Standard ML:

@@ -191,7 +191,7 @@ http://www.gnu.org/software/src-highlite --> delete_one’ x = (x, False)
-

Higher-order functions


+

Higher-order functions



The first line is always the SML code, the second line the Haskell variant:

diff --git a/gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.html b/gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.html index ce4ba30a..7dcabdaf 100644 --- a/gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.html +++ b/gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.html @@ -8,7 +8,7 @@ -

Lazy Evaluation with Standard ML


+

Lazy Evaluation with Standard ML



Published at 2010-05-07T08:17:59+01:00

@@ -32,7 +32,7 @@
You can solve specific problems with lazy evaluation easier than with eager evaluation. For example, you might want to list the number Pi or another infinite list of something. With the help of lazy evaluation, each element of the list is calculated when it is accessed first, but not earlier.

-

Emulating lazy evaluation in SML


+

Emulating lazy evaluation in SML



However, it is possible to emulate lazy evaluation in most eager evaluation languages. This is how it is done with Standard ML (with some play with an infinite list of natural number tuples filtering out 0 elements):

@@ -78,7 +78,7 @@ val test = first 10 (nat_pairs_not_null ());
http://smlnj.org/

-

Real laziness with Haskell


+

Real laziness with Haskell



As Haskell already uses lazy evaluation by default, there is no need to construct a new data type. Lists in Haskell are lazy by default. You will notice that the code is also much shorter and easier to understand than the SML version.

diff --git a/gemfeed/2010-05-09-the-fype-programming-language.html b/gemfeed/2010-05-09-the-fype-programming-language.html index 454a4621..1728107d 100644 --- a/gemfeed/2010-05-09-the-fype-programming-language.html +++ b/gemfeed/2010-05-09-the-fype-programming-language.html @@ -8,7 +8,7 @@ -

The Fype Programming Language


+

The Fype Programming Language



Published at 2010-05-09T12:48:29+01:00; Updated at 2021-05-05

@@ -27,7 +27,7 @@
Fype is a recursive acronym and means "Fype is For Your Program Execution" or "Fype is Free Yak Programmed for ELF". You could also say, "It's not a hype - it's Fype!".

-

Object-oriented C style


+

Object-oriented C style



The Fype interpreter is written in an object-oriented style of C. Each "main component" has its own .h and .c file. There is a struct type for each (most components at least) component, which can be initialized using a "COMPONENT_new" function and destroyed using a "COMPONENT_delete" function. Method calls follow the same schema, e.g. "COMPONENT_METHODNAME". There is no such as class inheritance and polymorphism involved.

@@ -100,7 +100,7 @@ http://www.gnu.org/software/src-highlite --> }
-

Data types


+

Data types



Fype uses auto type conversion. However, if you want to know what's going on, you may take a look at the following basic data types:

There is no boolean type, but we can use the integer values 0 for false and 1 for true. There is support for explicit type casting too.

-

Syntax


+

Syntax



-

Comments


+

Comments



Text from a # character until the end of the current line is considered being a comment. Multi-line comments may start with an #* and with a *# anywhere. Exceptions are if those signs are inside of strings.

-

Variables


+

Variables



Variables are defined with the "my" keyword (inspired by Perl :-). If you don't assign a value during declaration, it uses the default integer value 0. Variables may be changed during program runtime. Variables may be deleted using the "undef" keyword! Example:

@@ -151,7 +151,7 @@ if defined foo { }
-

Synonyms


+

Synonyms



Each variable can have as many synonyms as wished. A synonym is another name to access the content of a specific variable. Here is an example of how to use it:

@@ -193,7 +193,7 @@ undef baz; say syms foo; # Prints 1
-

Statements and expressions


+

Statements and expressions



A Fype program is a list of statements. Each keyword, expression or function call is part of a statement. Each statement is ended with a semicolon. Example:

@@ -203,11 +203,11 @@ say foo; exit foo - bar;
-

Parenthesis


+

Parenthesis



All parenthesis for function arguments is optional. They help to make the code better readable. They also help to force the precedence of expressions.

-

Basic expressions


+

Basic expressions



Any "any" value holding a string will be automatically converted to an integer value.

@@ -225,7 +225,7 @@ exit foo - bar; (integer) not <any>
-

Bitwise expressions


+

Bitwise expressions



 (integer) <any> :< <any>
@@ -235,7 +235,7 @@ exit foo - bar;
 (integer) <any> xor <any>
 

-

Numeric expressions


+

Numeric expressions



 (number) neg <number>
@@ -260,7 +260,7 @@ exit foo - bar;
 if yes { say no defined foo; } 
 

-

Control statements


+

Control statements



Control statements available in Fype:

@@ -288,7 +288,7 @@ until <expression> { <statements> }
... runs the statements as long as the expression evaluates to a false value.

-

Scopes


+

Scopes



A new scope starts with an { and ends with an }. An exception is a procedure, which does not use its own scope (see later in this manual). Control statements and functions support scopes. The "scope" function prints out all available symbols at the current scope. Here is a small example:

@@ -339,7 +339,7 @@ SYM_VARIABLE: var4 (id=00035, line=-0001, pos=-001, type=TT_INTEGER, dval=0.0000 SYM_FUNCTION: bar
-

Definedness


+

Definedness



 (integer) defined <identifier>
@@ -353,7 +353,7 @@ SYM_FUNCTION: bar
 
... tries to undefine/delete the "identifier". Returns 1 if it succeeded, otherwise 0 is returned.

-

System


+

System



These are some system and interpreter specific built-in functions supported:

@@ -395,7 +395,7 @@ if pid {
It returns the number of items freed! You may wonder why most of the time, it will produce a value of 0! Fype tries to free not needed memory ASAP. This may change in future versions to gain faster execution speed!

-

I/O


+

I/O



 (any) put <any>
@@ -415,9 +415,9 @@ if pid {
 
... just prints a new line.

-

Procedures and functions


+

Procedures and functions



-

Procedures


+

Procedures



A procedure can be defined with the "proc" keyword and deleted with the "undef" keyword. A procedure does not return any value and does not support parameter passing. It's using already defined variables (e.g. global variables). A procedure does not have its own namespace. It's using the calling namespace. It is possible to define new variables inside of a procedure in the current namespace.

@@ -433,7 +433,7 @@ foo; # Run the procedure. Print out "11\n" say c; # Print out "6\n";

-

Nested procedures


+

Nested procedures



It's possible to define procedures inside of procedures. Since procedures don't have their own scope, nested procedures will be available to the current scope as soon as the main procedure has run the first time. You may use the "defined" keyword to check if a procedure has been defined or not.

@@ -456,7 +456,7 @@ bar; # Now the procedure bar is defined! foo; # Here the procedure foo will redefine bar again!

-

Functions


+

Functions



A function can be defined with the "func" keyword and deleted with the "undef" keyword. Function do not yet return values and do not yet supports parameter passing. It's using local (lexical scoped) variables. If a certain variable does not exist, when It's using already defined variables (e.g. one scope above).

@@ -472,7 +472,7 @@ foo; # Run the procedure. Print out "11\n" say c; # Will produce an error because c is out of scope!
-

Nested functions


+

Nested functions



Nested functions work the same way the nested procedures work, except that nested functions will not be available anymore after the function has been left!

@@ -489,7 +489,7 @@ foo; bar; # Will produce an error because bar is out of scope!
-

Arrays


+

Arrays



Some progress on arrays has been made too. The following example creates a multidimensional array "foo". Its first element is the return value of the func which is "bar". The fourth value is a string" 3" converted to a double number. The last element is an anonymous array which itself contains another anonymous array as its final element:

@@ -512,11 +512,11 @@ BA BB
-

Fancy stuff


+

Fancy stuff



Fancy stuff like OOP or Unicode or threading is not planed. But fancy stuff like function pointers and closures may be considered.:)

-

May the source be with you


+

May the source be with you



You can find all of this on the GitHub page. There is also an "examples" folders containing some Fype scripts!

diff --git a/gemfeed/2011-05-07-perl-daemon-service-framework.html b/gemfeed/2011-05-07-perl-daemon-service-framework.html index 66e2690a..34ee06d9 100644 --- a/gemfeed/2011-05-07-perl-daemon-service-framework.html +++ b/gemfeed/2011-05-07-perl-daemon-service-framework.html @@ -8,7 +8,7 @@ -

Perl Daemon (Service Framework)


+

Perl Daemon (Service Framework)



Published at 2011-05-07T22:26:02+01:00; Updated at 2021-05-07

@@ -21,7 +21,7 @@
PerlDaemon is a minimal daemon for Linux and other Unix like operating systems programmed in Perl. It is a minimal but pretty functional and fairly generic service framework. This means that it does not do anything useful other than providing a framework for starting, stopping, configuring and logging. To do something useful, a module (written in Perl) must be provided.

-

Features


+

Features



PerlDaemon supports:

@@ -35,7 +35,7 @@
  • Easy to extend
  • Multi-instance support (just use a different directory for each instance).

  • -

    Quick Guide


    +

    Quick Guide




    To stop a daemon from running in foreground mode, "Ctrl+C" must be hit. To see more available startup options run "./control" without any argument.

    -

    How to configure


    +

    How to configure



    The daemon instance can be configured in "./conf/perldaemon.conf". If you want to change a property only once, it is also possible to specify it on the command line (which will take precedence over the config file). All available config properties can be displayed via "./control keys":

    @@ -87,7 +87,7 @@ daemon.alivefile.wd=./
    -

    Example


    +

    Example



    So let's start the daemon with a loop interval of 10 seconds:

    @@ -117,13 +117,13 @@ http://www.gnu.org/software/src-highlite -->
    $ ./control keys daemon.loopinterval=10 > new.conf; mv new.conf conf/perldaemon.conf
     

    -

    HiRes event loop


    +

    HiRes event loop



    PerlDaemon uses Time::HiRes to make sure that all the events run incorrect intervals. For each loop run, a time carry value is recorded and added to the next loop run to catch up on lost time.

    -

    Writing your own modules


    +

    Writing your own modules



    -

    Example module


    +

    Example module



    This is one of the example modules you will find in the source code. It should be pretty self-explanatory if you know Perl :-).

    @@ -162,7 +162,7 @@ http://www.gnu.org/software/src-highlite --> 1;
    -

    Your own module


    +

    Your own module



    Want to give it some better use? It's just as easy as:

    @@ -181,7 +181,7 @@ http://www.gnu.org/software/src-highlite -->
    BTW: You can install as many modules within the same instance as desired. But they are run in sequential order (in future, they can also run in parallel using several threads or processes).

    -

    May the source be with you


    +

    May the source be with you



    You can find PerlDaemon (including the examples) at:

    diff --git a/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.html b/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.html index 06f3a867..35725876 100644 --- a/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.html +++ b/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.html @@ -8,7 +8,7 @@ -

    The fibonacci.pl.raku.c Polyglot


    +

    The fibonacci.pl.raku.c Polyglot



    Published at 2014-03-24T21:32:53+00:00; Updated at 2022-04-23

    @@ -16,7 +16,7 @@
    https://en.wikipedia.org/wiki/Polyglot_(computing)

    -

    The Fibonacci numbers


    +

    The Fibonacci numbers



    For fun, I programmed my own Polyglot, which is both valid Perl, Raku, C and C++ code (I have added C++ and Raku support in 2022). The exciting part about C and C++ is that $ is a valid character to start variable names with:

    @@ -71,7 +71,7 @@ BEGIN {
    https://codeberg.org/snonux/perl-c-fibonacci

    -

    Let's run it with C and C++


    +

    Let's run it with C and C++



    exit # Leave adb shell
    -

    Setup of various scripts


    +

    Setup of various scripts



    jessie.sh deals with all the loopback mount magic and so on. It will be run later every time you start Debroid on your phone.

    @@ -164,7 +164,7 @@ apt-get dist-upgrade exit # Exit chroot
    -

    Entering Debroid and enable a service


    +

    Entering Debroid and enable a service



    This enters Debroid on your phone and starts the example service uptimed:

    @@ -187,7 +187,7 @@ chmod 0755 /etc/rc.deb exit # Exit adb shell
    -

    Include to Android startup:


    +

    Include to Android startup:



    If you want to start Debroid automatically whenever your phone starts, then do the following:

    diff --git a/gemfeed/2016-04-03-offsite-backup-with-zfs.html b/gemfeed/2016-04-03-offsite-backup-with-zfs.html index 5c3043b1..c7a5bee8 100644 --- a/gemfeed/2016-04-03-offsite-backup-with-zfs.html +++ b/gemfeed/2016-04-03-offsite-backup-with-zfs.html @@ -8,7 +8,7 @@ -

    Offsite backup with ZFS


    +

    Offsite backup with ZFS



    Published at 2016-04-03T22:43:42+01:00

    @@ -28,25 +28,25 @@ Offsite backup with ZFS Part 1 (you are reading this atm.)
    Offsite backup with ZFS Part 2

    -

    Please don't lose all my pictures again!


    +

    Please don't lose all my pictures again!



    When it comes to data storage and potential data loss, I am a paranoid person. It is due to my job and a personal experience I encountered over ten years ago: A single drive failure and loss of all my data (pictures, music, etc.).

    A little about my personal infrastructure: I am running my own (mostly FreeBSD based) root servers (across several countries: Two in Germany, one in Canada, one in Bulgaria) which store all my online data (E-Mail and my Git repositories). I am syncing incremental (and encrypted) ZFS snapshots between these servers forth and back so either data can be recovered from the other server.

    -

    Local storage box for offline data


    +

    Local storage box for offline data



    Also, I am operating a local server (an HP MicroServer) at home in my apartment. Full snapshots of all ZFS volumes are pulled from the "online" servers to the local server every other week and the incremental ZFS snapshots every day. That local server has a ZFS ZMIRROR with three disks configured (local triple redundancy). I keep up to half a year worth of ZFS snapshots of all volumes. That local server also contains all my offline data such as pictures, private documents, videos, books, various other backups, etc.

    Once weekly, all the local server data is copied to two external USB drives as a backup (without the historic snapshots). For simplicity, these USB drives are not formatted with ZFS but with good old UFS. This gives me a chance to recover from a (potential) ZFS disaster. ZFS is a complex thing. Sometimes it is good not to trust complicated things!

    -

    Storing it at my apartment is not enough


    +

    Storing it at my apartment is not enough



    Now I am thinking about an offsite backup of all this local data. The problem is that all the data remains on a single physical location: My local MicroServer. What happens when the house burns or my server, including the internal disks and the attached USB drives, gets stolen? My first thought was to back up everything to the "cloud". However, the significant issue here is the limited amount of available upload bandwidth (only 1MBit/s).

    The solution is adding another USB drive (2TB) with an encryption container (GELI) and a ZFS pool. The GELI encryption requires a secret key and a secret passphrase. I am updating the data to that drive once every three months (my calendar is reminding me about it), and afterwards, I keep that drive at a secret location outside of my apartment. All the information needed to decrypt (mounting the GELI container) is stored at another (secure) place. Key and passphrase are kept at different sites, though. Even if someone knew of it, he would not be able to decrypt it as some additional insider knowledge would be required as well.

    -

    Walking one round less


    +

    Walking one round less



    I am thinking of buying a second 2TB USB drive and setting it up the same way as the first one. So I could alternate the backups. One drive would be at the secret location, and the other drive would be at home. And these drives would swap place after each cycle. This would give some security about the failure of that drive, and I would have to go to the secret location only once (swapping the drives) instead of twice (picking that drive up to update the data + bringing it back to the remote location).

    diff --git a/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html b/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html index ac6c664f..3393e028 100644 --- a/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html +++ b/gemfeed/2016-04-09-jails-and-zfs-on-freebsd-with-puppet.html @@ -8,7 +8,7 @@ -

    Jails and ZFS with Puppet on FreeBSD


    +

    Jails and ZFS with Puppet on FreeBSD



    Published at 2016-04-09T18:29:47+01:00

    @@ -34,7 +34,7 @@
    Over the last couple of years I wrote quite a few Puppet modules in order to manage my personal server infrastructure. One of them manages FreeBSD Jails and another one ZFS file systems. I thought I would give a brief overview in how it looks and feels.

    -

    ZFS


    +

    ZFS



    The ZFS module is a pretty basic one. It does not manage ZFS pools yet as I am not creating them often enough which would justify implementing an automation. But let's see how we can create a ZFS file system (on an already given ZFS pool named ztank):

    @@ -105,7 +105,7 @@ zsh: done df | zsh: exit 1 grep foo
    -

    Jails


    +

    Jails



    Here is an example in how a FreeBSD Jail can be created. The Jail will have its own public IPv6 address. And it will have its own internal IPv4 address with IPv4 NAT to the internet (this is due to the limitation that the host server only got one public IPv4 address which requires sharing between all the Jails).

    @@ -242,7 +242,7 @@ lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384 nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    -

    Inside-Jail Puppet


    +

    Inside-Jail Puppet



    To automatically setup the applications running in the Jail I am using Puppet as well. I wrote a few scripts which bootstrap Puppet inside of a newly created Jail. It is doing the following:

    @@ -383,7 +383,7 @@ Notice: /Stage[main]/S_user::Root_files/S_user::My_files[root]/File[/root/.task] Notice: Finished catalog run in 206.09 seconds
    -

    Managing multiple Jails


    +

    Managing multiple Jails



    Of course I am operating multiple Jails on the same host this way with Puppet:

    diff --git a/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.html b/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.html index e9aebb26..ce199ab8 100644 --- a/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.html +++ b/gemfeed/2016-04-16-offsite-backup-with-zfs-part2.html @@ -8,7 +8,7 @@ -

    Offsite backup with ZFS (Part 2)


    +

    Offsite backup with ZFS (Part 2)



    Published at 2016-04-16T22:43:42+01:00

    diff --git a/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.html b/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.html index a4cd7559..9dcafdfc 100644 --- a/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.html +++ b/gemfeed/2016-05-22-spinning-up-my-own-authoritative-dns-servers.html @@ -8,17 +8,17 @@ -

    Spinning up my own authoritative DNS servers


    +

    Spinning up my own authoritative DNS servers



    Published at 2016-05-22T18:59:01+01:00

    -

    Background


    +

    Background



    Finally, I had time to deploy my authoritative DNS servers (master and slave) for my domains "buetow.org" and "buetow.zone". My domain name provider is Schlund Technologies. They allow their customers to edit the DNS records (BIND files) manually. And they also allow you to set your authoritative DNS servers for your domains. From now, I am making use of that option.

    Schlund Technologies

    -

    All FreeBSD Jails


    +

    All FreeBSD Jails



    To set up my authoritative DNS servers, I installed a FreeBSD Jail dedicated for DNS with Puppet on my root machine as follows:

    @@ -55,7 +55,7 @@ class { 'jail': }
    -

    PF firewall


    +

    PF firewall



    Please note that "dns.ian.buetow.org" is just the Jail name of the master DNS server (and "caprica.ian.buetow.org" the name of the Jail for the slave DNS server) and that I am using the DNS names "dns1.buetow.org" (master) and "dns2.buetow.org" (slave) for the actual service names (these are the DNS servers visible to the public). Please also note that the IPv4 address is an internal one. I have a PF to use NAT and PAT. The DNS ports are being forwarded (TCP and UDP) to that Jail. By default, all ports are blocked, so I am adding an exception rule for the IPv6 address. These are the PF rules in use:

    @@ -72,7 +72,7 @@ pass in on re0 inet6 proto udp from any to 2a01:4f8:120:30e8::15 port {53} flags .
    -

    Puppet managed BIND zone files


    +

    Puppet managed BIND zone files



    In "manifests/dns.pp" (the Puppet manifest for the Master DNS Jail itself), I configured the BIND DNS server this way:

    @@ -146,7 +146,7 @@ zone "buetow.zone" { };
    -

    The result


    +

    The result



    The result looks like this now:

    @@ -206,7 +206,7 @@ dns2.buetow.org. 86400 IN AAAA 2a03:2500:1:6:20:: ;; MSG SIZE rcvd: 322
    -

    Monitoring


    +

    Monitoring



    For monitoring, I am using Icinga2 (I am operating two Icinga2 instances in two different DCs). I may have to post another blog article about Icinga2, but to get the idea, these were the snippets added to my Icinga2 configuration:

    @@ -233,7 +233,7 @@ apply Service "dig6" { }
    -

    DNS update workflow


    +

    DNS update workflow



    Whenever I have to change a DNS entry, all I have to do is:

    diff --git a/gemfeed/2016-11-20-object-oriented-programming-with-ansi-c.html b/gemfeed/2016-11-20-object-oriented-programming-with-ansi-c.html index 05ec8102..3c8e6fad 100644 --- a/gemfeed/2016-11-20-object-oriented-programming-with-ansi-c.html +++ b/gemfeed/2016-11-20-object-oriented-programming-with-ansi-c.html @@ -8,7 +8,7 @@ -

    Object oriented programming with ANSI C


    +

    Object oriented programming with ANSI C



    Published at 2016-11-20T22:10:57+00:00; Updated at 2022-01-29

    @@ -23,7 +23,7 @@
    You can do a little of object-oriented programming in the C Programming Language. However, that is, in my humble opinion, limited. It's easier to use a different programming language than C for OOP. But still it's an interesting exercise to try using C for this.

    -

    Function pointers


    +

    Function pointers



    Let's have a look at the following sample program. All you have to do is to add a function pointer such as "calculate" to the definition of struct "something_s". Later, during the struct initialization, assign a function address to that function pointer:

    @@ -98,7 +98,7 @@ Division(3.000000 Not complicated at all, but nice to know and helps to make the code easier to read!

    -

    That's not OOP, though


    +

    That's not OOP, though



    However, that's not really how it works in object-oriented languages such as Java and C++. The method call in this example is not a method call as "mult" and "div" in this example are not "message receivers". I mean that the functions can not access the state of the "mult" and "div" struct objects. In C, you would need to do something like this instead if you wanted to access the state of "mult" from within the calculate function, you would have to pass it as an argument:

    @@ -109,13 +109,13 @@ http://www.gnu.org/software/src-highlite -->
    mult.calculate(mult,a,b));
     

    -

    Real object oriented programming with C


    +

    Real object oriented programming with C



    If you want to take it further, hit "Object-Oriented Programming with ANSI-C" into your favourite internet search engine or follow the link below. It goes as far as writing a C preprocessor in AWK, which takes some object-oriented pseudo-C and transforms it to plain C so that the C compiler can compile it to machine code. This is similar to how the C++ language had its origins.

    https://www.cs.rit.edu/~ats/books/ooc.pdf

    -

    OOP design patterns in the Linux Kernel


    +

    OOP design patterns in the Linux Kernel



    Big C software projects, like Linux, also follow some OOP techniques:

    diff --git a/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.html b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.html index 80bc585e..b544bcbd 100644 --- a/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.html +++ b/gemfeed/2018-06-01-realistic-load-testing-with-ioriot-for-linux.html @@ -8,7 +8,7 @@ -

    Realistic load testing with I/O Riot for Linux


    +

    Realistic load testing with I/O Riot for Linux



    Published at 2018-06-01T14:50:29+01:00; Updated at 2021-05-08

    @@ -23,7 +23,7 @@ jgs\__/'---'\__/
    -

    Foreword


    +

    Foreword



    This text first was published in the german IT-Administrator computer Magazine. 3 years have passed since and I decided to publish it on my blog too.

    @@ -35,13 +35,13 @@ jgs\__/'---'\__/
    Pleace notice that some of the screenshots show the command "ioreplay" instead of "ioriot". That's because the name has changed after taking those.

    -

    The article


    +

    The article



    With I/O Riot IT administrators can load test and optimize the I/O subsystem of Linux-based operating systems. The tool makes it possible to record I/O patterns and replay them at a later time as often as desired. This means bottlenecks can be reproduced and eradicated.

    When storing huge amounts of data, such as more than 200 billion archived emails at Mimecast, it's not only the available storage capacity that matters, but also the data throughput and latency. At the same time, operating costs must be kept as low as possible. The more systems involved, the more important it is to optimize the hardware, the operating system and the applications running on it.

    -

    Background: Existing Techniques


    +

    Background: Existing Techniques



    Conventional I/O benchmarking: Administrators usually use open source benchmarking tools like IOZone and bonnie++. Available database systems such as Redis and MySQL come with their own benchmarking tools. The common problem with these tools is that they work with prescribed artificial I/O patterns. Although this can test both sequential and randomized data access, the patterns do not correspond to what can be found on production systems.

    @@ -49,17 +49,17 @@ jgs\__/'---'\__/
    Testing in the production environment: For these reasons, benchmarks are often carried out in the production environment. In order to derive value from this such tests are especially performed during peak hours when systems are under high load. However, testing on production systems is associated with risks and can lead to failure or loss of data without adequate protection.

    -

    Benchmarking the Email Cloud at Mimecast


    +

    Benchmarking the Email Cloud at Mimecast



    For email archiving, Mimecast uses an internally developed microservice, which is operated directly on Linux-based storage systems. A storage cluster is divided into several replication volumes. Data is always replicated three times across two secure data centers. Customer data is automatically allocated to one or more volumes, depending on throughput, so that all volumes are automatically assigned the same load. Customer data is archived on conventional, but inexpensive hard disks with several terabytes of storage capacity each. I/O benchmarking proved difficult for all the reasons mentioned above. Furthermore, there are no ready-made tools for this purpose in the case of self-developed software. The service operates on many block devices simultaneously, which can make the RAID controller a bottleneck. None of the freely available benchmarking tools can test several block devices at the same time without extra effort. In addition, emails typically consist of many small files. Randomized access to many small files is particularly inefficient. In addition to many software adaptations, the hardware and operating system must also be optimized.

    Mimecast encourages employees to be innovative and pursue their own ideas in the form of an internal competition, Pet Project. The goal of the pet project I/O Riot was to simplify OS and hardware level I/O benchmarking. The first prototype of I/O Riot was awarded an internal roadmap prize in the spring of 2017. A few months later, I/O Riot was used to reduce write latency in the storage clusters by about 50%. The improvement was first verified by I/O replay on a test system and then successively applied to all storage systems. I/O Riot was also used to resolve a production incident caused by disk I/O load.

    -

    Using I/O Riot


    +

    Using I/O Riot



    First, all I/O events are logged to a file on a production system with I/O Riot. It is then copied to a test system where all events are replayed in the same way. The crucial point here is that you can reproduce I/O patterns as they are found on a production system as often as you like on a test system. This results in the possibility of optimizing the set screws on the system after each run.

    -

    Installation


    +

    Installation



    I/O Riot was tested under CentOS 7.2 x86_64. For compiling, the GNU C compiler and Systemtap including kernel debug information are required. Other Linux distributions are theoretically compatible but untested. First of all, you should update the systems involved as follows:

    @@ -81,7 +81,7 @@ jgs\__/'---'\__/
    Note: It is not best practice to install any compilers on production systems. For further information please have a look at the enclosed README.md.

    -

    Recording of I/O events


    +

    Recording of I/O events



    All I/O events are kernel related. If a process wants to perform an I/O operation, such as opening a file, it must inform the kernel of this by a system call (short syscall). I/O Riot relies on the Systemtap tool to record I/O syscalls. Systemtap, available for all popular Linux distributions, helps you to take a look at the running kernel in productive environments, which makes it predestined to monitor all I/O-relevant Linux syscalls and log them to a file. Other tools, such as strace, are not an alternative because they slow down the system too much.

    @@ -95,7 +95,7 @@ jgs\__/'---'\__/
    A Ctrl-C (SIGINT) stops recording prematurely. Otherwise, ioriot terminates itself automatically after 1 hour. Depending on the system load, the output file can grow to several gigabytes. Only metadata is logged, not the read and written data itself. When replaying later, only random data is used. Under certain circumstances, Systemtap may omit some system calls and issue warnings. This is to ensure that Systemtap does not consume too many resources.

    -

    Test preparation


    +

    Test preparation



    Then copy io.capture to a test system. The log also contains all accesses to the pseudo file systems devfs, sysfs and procfs. This makes little sense, which is why you must first generate a cleaned and playable version io.replay from io.capture as follows:

    @@ -105,7 +105,7 @@ jgs\__/'---'\__/
    The parameter -n allows you to assign a freely selectable test name. An arbitrary system user under which the test is to be played is specified via paramater -u.

    -

    Test Initialization


    +

    Test Initialization



    The test will most likely want to access existing files. These are files the test wants to read but does not create by itself. The existence of these must be ensured before the test. You can do this as follows:

    @@ -119,7 +119,7 @@ jgs\__/'---'\__/
    You must re-initialize the environment before each run. Data from previous tests will be moved to a trash directory automatically, which can be finally deleted with "sudo ioriot -P".

    -

    Replay


    +

    Replay



    After initialization, you can replay the log with -r. You can use -R to initiate both test initialization and replay in a single command and -S can be used to specify a file in which statistics are written after the test run.

    @@ -175,13 +175,13 @@ Total time: 1213.00s
    Output of iostat. The block device sdy seems to be almost fully utilized by 99%.

    -

    I/O Riot is Open Source


    +

    I/O Riot is Open Source



    The tool has already proven to be very useful and will continue to be actively developed as time and priority permits. Mimecast intends to be an ongoing contributor to Open Source. You can find I/O Riot at:

    https://github.com/mimecast/ioriot

    -

    Systemtap


    +

    Systemtap



    Systemtap is a tool for the instrumentation of the Linux kernel. The tool provides an AWK-like programming language. Programs written in it are compiled from Systemtap to C- and then into a dynamically loadable kernel module. Loaded into the kernel, the program has access to Linux internals. A Systemtap program written for I/O Riot monitors when, with which parameters, at which time, and from which process I/O syscalls take place and their return values.

    @@ -189,7 +189,7 @@ Total time: 1213.00s
    https://sourceware.org/systemtap/

    -

    More refereces


    +

    More refereces



    IOZone
    Bonnie++
    diff --git a/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.html b/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.html index 68fcfcf7..48b450c0 100644 --- a/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.html +++ b/gemfeed/2021-04-22-dtail-the-distributed-log-tail-program.html @@ -8,7 +8,7 @@ -

    DTail - The distributed log tail program


    +

    DTail - The distributed log tail program



    Published at 2021-04-22T19:28:41+01:00; Updated at 2021-04-26

    @@ -26,7 +26,7 @@
    Think of DTail as a distributed version of the tail program which is very useful when you have a distributed application running on many servers. DTail is an Open-Source, cross-platform, fairly easy to use, support and maintain log file analysis & statistics gathering tool designed for Engineers and Systems Administrators. It is programmed in Google Go.

    -

    A Mimecast Pet Project


    +

    A Mimecast Pet Project



    DTail got its inspiration from public domain tools available already in this area but it is a blue sky from-scratch development which was first presented at Mimecast’s annual internal Pet Project competition (awarded with a Bronze prize). It has gained popularity since and is one of the most widely deployed DevOps tools at Mimecast (reaching nearly 10k server installations) and many engineers use it on a regular basis. The Open-Source version of DTail is available at:

    @@ -34,7 +34,7 @@
    Try it out — We would love any feedback. But first, read on…

    -

    Differentiating from log management systems


    +

    Differentiating from log management systems



    Why not just use a full-blown log management system? There are various Open-Source and commercial log management solutions available on the market you could choose from (e.g. the ELK stack). Most of them store the logs in a centralized location and are fairly complex to set up and operate. Possibly they are also pretty expensive to operate if you have to buy dedicated hardware (or pay fees to your cloud provider) and have to hire support staff for it.

    @@ -44,7 +44,7 @@
    As a downside, you won’t be able to access any logs with DTail when the server is down. Furthermore, a server can store logs only up to a certain capacity as disks will fill up. For the purpose of ad-hoc debugging, these are not typically issues. Usually, it’s the application you want to debug and not the server. And disk space is rarely an issue for bare metal and VM-based systems these days, with sufficient space for several weeks’ worth of log storage being available. DTail also supports reading compressed logs. The currently supported compression algorithms are gzip and zstd.

    -

    Combining simplicity, security and efficiency


    +

    Combining simplicity, security and efficiency



    DTail also has a client component that connects to multiple servers concurrently for log files (or any other text files).

    @@ -54,7 +54,7 @@
    Recent log files are very likely still in the file system caches on the servers. Therefore, there tends to be a minimal I/O overhead involved.

    -

    The DTail family of commands


    +

    The DTail family of commands



    Following the UNIX philosophy, DTail includes multiple command-line commands each of them for a different purpose:

    @@ -67,7 +67,7 @@
    DGrep sample session animated gif

    -

    Usage example


    +

    Usage example



    The use of these commands is almost self-explanatory for a person already used to the standard command line in Unix systems. One of the main goals is to make DTail easy to use. A tool that is too complicated to use under high-pressure scenarios (e.g., during an incident) can be quite detrimental.

    @@ -85,11 +85,11 @@ dtail –servers serverlist.txt –files ‘/var/log/*.log’ –regex ‘(?i:er
    You could also provide a comma-separated list of servers as opposed to a text file. There are many more options you could use. The ones listed here are just the very basic ones. There are more instructions and usage examples on the GitHub page. Also, you can study even more of the available options via the –help switch (some real treasures might be hidden there).

    -

    Fitting it in


    +

    Fitting it in



    DTail integrates nicely into the user management of existing infrastructure. It follows normal system permissions and does not open new “holes” on the server which helps to keep security departments happy. The user would not have more or less file read permissions than he would have via a regular SSH login shell. There is a full SSH key, traditional UNIX permissions, and Linux ACL support. There is also a very low resource footprint involved. On average for tailing and searching log files less than 100MB RAM and less than a quarter of a CPU core per participating server are required. Complex map-reduce queries on big data sets will require more resources accordingly.

    -

    Advanced features


    +

    Advanced features



    The features listed here are out of the scope of this blog post but are worthwhile to mention:

    @@ -100,7 +100,7 @@ dtail –servers serverlist.txt –files ‘/var/log/*.log’ –regex ‘(?i:er
  • Server-side stats streaming with continuous map-reduce queries. This for example can be used to periodically generate stats from the logs at a configured interval, e.g., log error counts by the minute. These then can be sent to a time-series database (e.g., Graphite) and then plotted in a Grafana dashboard.
  • Support for custom extensions. E.g., for different server discovery methods (so you don’t have to rely on plain server lists) and log file formats (so that map-reduce queries can parse more stats from the logs).

  • -

    For the future


    +

    For the future



    There are various features we want to see in the future.

    @@ -110,7 +110,7 @@ dtail –servers serverlist.txt –files ‘/var/log/*.log’ –regex ‘(?i:er
  • A more complex change would be the support of federated queries. You can connect to thousands of servers from a single client running on a laptop. But does it scale to 100k of servers? Some of the servers could be used as middleware for connecting to even more servers.
  • Another aspect is to extend the documentation. Especially the advanced features such as map-reduce query language and how to configure the server-side queries currently do require more documentation. For now, you can read the code, sample config files or just ask the author for that! But this will be certainly addressed in the future.

  • -

    Open Source


    +

    Open Source



    Mimecast highly encourages you to have a look at DTail and submit an issue for any features you would like to see. Have you found a bug? Maybe you just have a question or comment? If you want to go a step further: We would also love to see pull requests for any features or improvements. Either way, if in doubt just contact us via the DTail GitHub page.

    diff --git a/gemfeed/2021-04-24-welcome-to-the-geminispace.html b/gemfeed/2021-04-24-welcome-to-the-geminispace.html index 27ce2d7a..60c2dc73 100644 --- a/gemfeed/2021-04-24-welcome-to-the-geminispace.html +++ b/gemfeed/2021-04-24-welcome-to-the-geminispace.html @@ -8,7 +8,7 @@ -

    Welcome to the Geminispace


    +

    Welcome to the Geminispace



    Published at 2021-04-24T19:28:41+01:00; Updated at 2021-06-18

    @@ -39,19 +39,19 @@
    -

    Motivation


    +

    Motivation



    -

    My urge to revamp my personal website


    +

    My urge to revamp my personal website



    For some time, I had to urge to revamp my personal website. Not to update the technology and its design but to update all the content (+ keep it current) and start a small tech blog again. So unconsciously, I began to search for an excellent platform to do all of that in a KISS (keep it simple & stupid) way.

    -

    My still great Laptop running hot


    +

    My still great Laptop running hot



    Earlier this year (2021), I noticed that my almost seven-year-old but still great Laptop started to become hot and slowed down while surfing the web. Also, the Laptop's fan became quite noisy. This was all due to the additional bloat such as JavaScript, excessive use of CSS, tracking cookies+pixels, ads, and so on there was on the website.

    All I wanted was to read an interesting article, but after a big advertising pop-up banner appeared and made everything worse, I gave up and closed the browser tab.

    -

    Discovering the Gemini internet protocol


    +

    Discovering the Gemini internet protocol



    Around the same time, I discovered a relatively new, more lightweight protocol named Gemini, which does not support all these CPU-intensive features like HTML, JavaScript, and CSS. Also, tracking and ads are unsupported by the Gemini protocol.

    @@ -62,7 +62,7 @@
    Why is there a need for a new protocol? As the modern web is a superset of Gemini, can't we use simple HTML 1.0 instead? That's a good and valid question. It is not a technical problem but a human problem. We tend to abuse the features once they are available. You can ensure that things stay efficient and straightforward as long as you are using the Gemini protocol. On the other hand, you can't force every website on the modern web to only create plain and straightforward-looking HTML pages.

    -

    My own Gemini capsule


    +

    My own Gemini capsule



    As it is effortless to set up and maintain your own Gemini capsule (Gemini server + content composed via the Gemtext markup language), I decided to create my own. What I like about Gemini is that I can use my favourite text editor and get typing. I don't need to worry about the style and design of the presence, and I also don't have to test anything in ten different web browsers. I can only focus on the content! As a matter of fact, I am using the Vim editor + its spellchecker + auto word completion functionality to write this.

    @@ -70,7 +70,7 @@
    Gemtexter - One Bash script to rule it all

    -

    Gemini advantages summarised


    +

    Gemini advantages summarised




    -

    Dive into deep Gemini space


    +

    Dive into deep Gemini space



    Check out one of the following links for more information about Gemini. For example, you will find a FAQ that explains why the protocol is named Gemini. Many Gemini capsules are dual-hosted via Gemini and HTTP(S) so that people new to Gemini can sneak peek at the content with a regular web browser. Some people go as far as tri-hosting all their content via HTTP(S), Gemini and Gopher.

    diff --git a/gemfeed/2021-05-16-personal-bash-coding-style-guide.html b/gemfeed/2021-05-16-personal-bash-coding-style-guide.html index c11554dc..ab1aea8c 100644 --- a/gemfeed/2021-05-16-personal-bash-coding-style-guide.html +++ b/gemfeed/2021-05-16-personal-bash-coding-style-guide.html @@ -8,7 +8,7 @@ -

    Personal Bash coding style guide


    +

    Personal Bash coding style guide



    Published at 2021-05-16T14:51:57+01:00

    @@ -29,11 +29,11 @@
    Google Shell Style Guide

    -

    My modifications


    +

    My modifications



    These are my modifications to the Google Guide.

    -

    Shebang


    +

    Shebang



    Google recommends using always...

    @@ -53,7 +53,7 @@ http://www.gnu.org/software/src-highlite -->
    #!/usr/bin/env bash
     

    -

    Two space soft-tabs indentation


    +

    Two space soft-tabs indentation



    I know there have been many tab- and soft-tab wars on this planet. Google recommends using two space soft-tabs for Bash scripts.

    @@ -63,7 +63,7 @@ http://www.gnu.org/software/src-highlite -->
    I hit the 80 character line length quicker with the four spaces than with two spaces, but that makes me refactor the Bash code more aggressively, which is a good thing.

    -

    Breaking long pipes


    +

    Breaking long pipes



    Google recommends breaking up long pipes like this:

    @@ -96,7 +96,7 @@ command1 |
    Update: It's 2023 now, and I have changed my mind. I think Google's way is the better one. It may be a bit more to type, but the leading | are a nice eye catcher, so you know immediately what is going on!

    -

    Quoting your variables


    +

    Quoting your variables



    Google recommends always quote your variables. Generally, it would be best if you did that only for variables where you are unsure about the content/values of the variables (e.g., content is from an external input source and may contain whitespace or other special characters). In my opinion, the code will become quite noisy when you always quote your variables like this:

    @@ -137,7 +137,7 @@ echo "foo${FOO}baz"
    A few more words on always quoting the variables: For the sake of consistency (and for making ShellCheck happy), I am not against quoting everything I encounter. I also think that the larger the Bash script becomes, the more critical it becomes always to quote variables. That's because it will be more likely that you might not remember that some of the functions don't work on values with spaces in them, for example. It's just that I won't quote everything in every small script I write.

    -

    Prefer built-in commands over external commands


    +

    Prefer built-in commands over external commands



    Google recommends using the built-in commands over available external commands where possible:

    @@ -162,9 +162,9 @@ http://www.gnu.org/software/src-highlite -->
    I even didn't get started with what you can do with awk (especially GNU Awk), a fully-fledged programming language. Tiny Awk snippets tend to be used quite often in Shell scripts without honouring the real power of Awk. But if you did everything in Perl or Awk or another scripting language, then it wouldn't be a Bash script anymore, wouldn't it? ;-)

    -

    My additions


    +

    My additions



    -

    Use of 'yes' and 'no'


    +

    Use of 'yes' and 'no'



    Bash does not support a boolean type. I tend just to use the strings 'yes' and 'no' here. I used 0 for false and 1 for true for some time, but I think that the yes/no strings are easier to read. Yes, the Bash script would need to perform string comparisons on every check, but if performance is crucial to you, you wouldn't want to use a Bash script anyway, correct?

    @@ -188,7 +188,7 @@ http://www.gnu.org/software/src-highlite --> buy_soda $I_NEED_THE_BUZZ
    -

    Non-evil alternative to variable assignments via eval


    +

    Non-evil alternative to variable assignments via eval



    Google is in the opinion that eval should be avoided. I think so too. They list these examples in their guide:

    @@ -232,7 +232,7 @@ Hello paul, it is Sat 15 May 19:21:12 BST 2021
    The downside is that ShellCheck won't be able to follow the dynamic sourcing anymore.

    -

    Prefer pipes over arrays for list processing


    +

    Prefer pipes over arrays for list processing



    When I do list processing in Bash, I prefer to use pipes. You can chain them through Bash functions as well, which is pretty neat. Usually, my list processing scripts are of a structure like this:

    @@ -277,7 +277,7 @@ main
    The stdout is always passed as a pipe to the next following stage. The stderr is used for info logging.

    -

    Assign-then-shift


    +

    Assign-then-shift



    I often refactor existing Bash code. That leads me to add and removing function arguments quite often. It's pretty repetitive work changing the $1, $2.... function argument numbers every time you change the order or add/remove possible arguments.

    @@ -329,7 +329,7 @@ http://www.gnu.org/software/src-highlite -->
    As you can see, I didn't need to change any other assignments within the function. Of course, you would also need to change the function argument lists at every occasion where the function is invoked - you would do that within the same refactoring session.

    -

    Paranoid mode


    +

    Paranoid mode



    I call this the paranoid mode. The Bash will stop executing when a command exits with a status not equal to 0:

    @@ -370,11 +370,11 @@ http://www.gnu.org/software/src-highlite --> }
    -

    Learned


    +

    Learned



    There are also a couple of things I've learned from Google's guide.

    -

    Unintended lexicographical comparison.


    +

    Unintended lexicographical comparison.



    The following looks like a valid Bash code:

    @@ -410,7 +410,7 @@ http://www.gnu.org/software/src-highlite --> fi
    -

    PIPESTATUS


    +

    PIPESTATUS



    I have never used the PIPESTATUS variable before. I knew that it's there, but I never bothered to understand how it works until now thoroughly.

    @@ -442,7 +442,7 @@ http://www.gnu.org/software/src-highlite --> fi
    -

    Use common sense and BE CONSISTENT.


    +

    Use common sense and BE CONSISTENT.



    The following two paragraphs are thoroughly quoted from the Google guidelines. But they hit the hammer on the head:

    @@ -451,7 +451,7 @@ http://www.gnu.org/software/src-highlite --> The point of having style guidelines is to have a common vocabulary of coding so people can concentrate on what you are saying rather than on how you are saying it. We present global style rules here, so people know the vocabulary. But local style is also important. If the code you add to a file looks drastically different from the existing code around it, the discontinuity throws readers out of their rhythm when they go to read it. Try to avoid this.


    -

    Advanced Bash learning pro tip


    +

    Advanced Bash learning pro tip



    I also highly recommend having a read through the "Advanced Bash-Scripting Guide" (not from Google). I use it as the universal Bash reference and learn something new every time I look at it.

    diff --git a/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.html b/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.html index 93ac8aea..edbdab2b 100644 --- a/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.html +++ b/gemfeed/2021-06-05-gemtexter-one-bash-script-to-rule-it-all.html @@ -8,7 +8,7 @@ -

    Gemtexter - One Bash script to rule it all


    +

    Gemtexter - One Bash script to rule it all



    Published at 2021-06-05T19:03:32+01:00

    @@ -57,7 +57,7 @@
    This comes with the benefit that I can write content in my favourite text editor (Vim).

    -

    Motivation


    +

    Motivation



    Another benefit of using Gemini is that the Gemtext markup language is easy to parse. As my site is dual-hosted (Gemini+HTTP), I could, in theory, just write a shell script to deal with the conversion from Gemtext to HTML; there is no need for a full-featured programming language here. I have done a lot of Bash in the past, but I am also often revisiting old tools and techniques for refreshing and keeping the knowledge up to date here.

    @@ -69,7 +69,7 @@
    In short, Gemtexter is a static site generator and blogging engine that uses Gemtext as its input format.

    -

    Output formats


    +

    Output formats



    Gemtexter takes the Gemtext Markup files as the input and generates the following outputs from it (you find examples for each of these output formats on the Gemtexter GitHub page):

    @@ -82,11 +82,11 @@
    I could have done all of that with a more robust language than Bash (such as Perl, Ruby, Go...), but I didn't. The purpose of this exercise was to challenge what I can do with a "simple" Bash script and learn new things.

    -

    Taking it as far as I should, but no farther


    +

    Taking it as far as I should, but no farther



    The Bash is suitable very well for small scripts and ad-hoc automation on the command line. But it is for sure not a robust programming language. Writing this blog post, Gemtexter is nearing 1000 lines of code, which is actually a pretty large Bash script.

    -

    Modularization


    +

    Modularization



    I modularized the code so that each core functionality has its own file in ./lib. All the modules are included from the main Gemtexter script. For example, there is one module for HTML generation, one for Markdown generation, and so on.

    @@ -110,7 +110,7 @@ http://www.gnu.org/software/src-highlite -->
    This way, the script could grow far beyond 1000 lines of code and still be maintainable. With more features, execution speed may slowly become a problem, though. I already notice that Gemtexter doesn't produce results instantly but requires few seconds of runtime already. That's not a problem yet, though.

    -

    Bash best practises and ShellCheck


    +

    Bash best practises and ShellCheck



    While working on Gemtexter, I also had a look at the Google Shell Style Guide and wrote a blog post on that:

    @@ -126,7 +126,7 @@ http://www.gnu.org/software/src-highlite -->
    https://shellcheck.net

    -

    Unit testing


    +

    Unit testing



    There is a basic unit test module in ./lib/assert.source.sh, which is used for unit testing. I found this to be very beneficial for cross-platform development. For example, I noticed that some unit tests failed on macOS while everything still worked fine on my Fedora Linux laptop.

    @@ -134,7 +134,7 @@ http://www.gnu.org/software/src-highlite -->
    It has been proven quite helpful to have unit tests in place for the HTML part already when working on the Markdown generator part. To test the Markdown part, I copied the HTML unit tests and changed the expected outcome in the assertions. This way, I could implement the Markdown generator in a test-driven way (writing the test first and afterwards the implementation).

    -

    HTML unit test example


    +

    HTML unit test example




    Especially macOS users didn't read the README carefully enough to install GNU Grep, GNU Sed and GNU Date before using Gemtexter.

    -

    Backticks now produce inline code blocks in the HTML output


    +

    Backticks now produce inline code blocks in the HTML output



    The Gemtext format doesn't support inline code blocks, but Gemtexter now produces inline code blocks (means, small code fragments can be placed in the middle of a paragraph) in the HTML output when the code block is enclosed with Backticks. There were no adjustments required for the Markdown output format, because Markdown supports it already out of the box.

    -

    Cache for Atom feed generation


    +

    Cache for Atom feed generation



    The Bash is not the most performant language. Gemtexter already takes a couple of seconds only to generate the Atom feed for around two hand full of articles on my slightly underpowered Surface Go 2 Linux tablet. Therefore, I introduced a cache, so that subsequent Atom feed generation runs finish much quicker. The cache uses a checksum of the Gemtext .gmi file to decide whether anything of the content has changed or not.

    -

    Input filter support


    +

    Input filter support



    Once your capsule reaches a certain size, it can become annoying to re-generate everything if you only want to preview the HTML or Markdown output of one single content file. The following will add a filter to only generate the files matching a regular expression:

    @@ -80,22 +80,22 @@ http://www.gnu.org/software/src-highlite -->
    ./gemtexter --generate '.*hello.*'
     

    -

    Revamped git support


    +

    Revamped git support



    The Git support has been completely rewritten. It's now more reliable and faster too. Have a look at the README for more information.

    -

    Addition of htmlextras and web font support


    +

    Addition of htmlextras and web font support



    The htmlextras folder now contains all extra files required for the HTML output format such as cascading style sheet (CSS) files and web fonts.

    -

    Sub-section support


    +

    Sub-section support



    It's now possible to define sub-sections within a Gemtexter capsule. For the HTML output, each sub-section can use its own CSS and web font definitions. E.g.:

    The foo.zone main site
    The notes sub-section (with different fonts)

    -

    More


    +

    More



    Additionally, there were a couple of bug fixes, refactorings and overall improvements in the documentation made.

    diff --git a/gemfeed/2022-09-30-after-a-bad-nights-sleep.html b/gemfeed/2022-09-30-after-a-bad-nights-sleep.html index b2eb4912..28a4e485 100644 --- a/gemfeed/2022-09-30-after-a-bad-nights-sleep.html +++ b/gemfeed/2022-09-30-after-a-bad-nights-sleep.html @@ -8,7 +8,7 @@ -

    After a bad night's sleep


    +

    After a bad night's sleep



    Published at 2022-09-30T09:53:23+03:00; Updated at 2022-10-12

    @@ -28,15 +28,15 @@ jgs (________\ \
    Everyone has it once in a while: A bad night's sleep. Here I attempt to list valuable tips on how to deal with it.

    -

    Don't take the day off.


    +

    Don't take the day off.



    Don't take a day off after not sleeping enough the previous night. That would be wasting the holiday allowance. It wouldn't be possible to enjoy my free time anyway, so why not just work? There's still a way for an IT Engineer to be productive (sometimes even more) with half or less of the concentration power available!

    -

    Start work early


    +

    Start work early



    Probably I am already awake early and am unable to fall asleep again. My strategy here is to "attack" the day: Start work early and finish early. The early bird will also encounter fewer distractions from colleagues.

    -

    Sweat the small stuff


    +

    Sweat the small stuff



    There's never a shortage of small items to hook off my list. Most of these items don't require my full concentration power, and I will be happy to get them off my list so that the next day, after a good night's sleep, I can immerse myself again in focused, deep work with all concentration powers at hand.

    @@ -50,57 +50,57 @@ jgs (________\ \
  • Going through any tedious paperwork.
  • Catch up with the journal and mark off all trivial action items.

  • -

    Enter the flow state


    +

    Enter the flow state



    I find it easy to enter the "flow state" after a bad night's sleep. All I need to do is to put on some ambient music (preferably instrumental chill house) and start to work on a not-too-difficult ticket.

    Usually, the "flow state" is associated with deep-focused work, but deep-focused work isn't easily possible under sleep deprivation. It's still possible to be in the flow by working on more manageable tasks and leaving the difficult ones for the next day.

    -

    Reschedule meetings


    +

    Reschedule meetings



    I find engaging in discussions and demanding meetings challenging after a lousy night's sleep. I still attend the sessions I am invited to as "only" a participant, but I prefer to reschedule all meetings I am the primary driver of.

    This, unfortunately, also includes interviews. Interviews require full concentration power. So for interviews, I would find a colleague to step in for me or ask to reschedule the interview altogether. Everything else wouldn't make it justice and would waste everyone's time!

    -

    Invent


    +

    Invent



    The mind works differently under sleep deprivation: It's easier to invent new stuff as it's easier to have a look at things from different perspectives. Until an hour ago, I didn't know yet what I would be blogging about for this month, and then I just started writing this, and it took me only half an hour to write the first draft of this blog post!

    -

    Fast


    +

    Fast



    I don't eat breakfast, and I don't eat lunch on these days. I only have dinner. Not eating means my mind doesn't get foggy, and I keep up the work momentum. This is called intermittent fasting, which not only generally helps to keep the weight under control and boosts the concentration power. Furthermore, intermittent fasting is healthy. You should include it in your routine, even after a good night's sleep.

    -

    Stretch


    +

    Stretch



    I won't have enough energy for strenuous physical exercise on those days, but a 30 to a 60-minute stretching session can make the day. Stretching will even hurt less under sleep deprivation! The stretching could also be substituted with a light Yoga session.

    -

    Walk


    +

    Walk



    Walking is healthy, and the time can be used to listen to interesting podcasts. The available concentration power might not be enough for more sophisticated audio literature. I will have enough energy for one or two daily walks (~10k steps for the day in total). Sometimes, I listen to music during walks. I also try to catch the bright sunlight.

    -

    Red Bull


    +

    Red Bull



    I don't think that Red Bull is a healthy drink. But once in a while, a can in the early afternoon brings wonders, and productivity will skyrocket. Other than Red Bull, drink a lot of water throughout the day. Don't forget to drink the sugar-free version; otherwise, your intermittent fast will be broken.

    -

    Power nap


    +

    Power nap



    I don't know how to "enforce" a nap, but sometimes I manage to power nap, and it helps wonders. A 30-minute nap sometimes brings me back to normal. If you don't tend to fast as you are too hungry, it helps to try to nap approximately 30 minutes after eating something.

    -

    Don't take anything personally.


    +

    Don't take anything personally.



    It's much more challenging to keep the mind "under control" in this state. Every annoyance can potentially upset, which could reflect on the work colleagues. It is wise to attempt to go with a positive attitude into the day, always smile and be polite to the family and colleagues at work. Don't let anything drop out to the people next; they don't deserve it as they didn't do anything wrong! Also, remember, it can't be controlled at all. It's time to let go of the annoyances for the day.

    -

    Meditate


    +

    Meditate



    To keep the good vibe, it helps to meditate for 10 minutes. Meditation must nothing be fancy. It can be just lying on the sofa and observing your thoughts as they come and go. Don't judge your thoughts, as that could put you in a negative mood. It's not necessary to sit in an uncomfortable Yoga pose, and it is not required to chant "Ohhmmmmm".

    -

    Write things down


    +

    Write things down



    Sometimes something requiring more concentration power demands time. This is where it helps to write a note in a journal and return to it another day. This doesn't mean slacking off but managing the rarely available concentration power for the day. I might repeat myself: Today, sweat all the small stuff. Tomorrow, do the deep-focused work on that crucial project again.

    It's easier to forget things on those days, so everything should be written down so that it can be worked off later. Things written down will not be overlooked!

    -

    Social media


    +

    Social media



    I wouldn't say I like checking social media, as it can consume a lot of time and can become addictive. But once in a while, I want to catch up with my "networks". After a bad night's sleep, it's the perfect time to check your social media. Once done, you don't have to do it anymore for the next couple of days!

    diff --git a/gemfeed/2022-10-30-installing-dtail-on-openbsd.html b/gemfeed/2022-10-30-installing-dtail-on-openbsd.html index c167cdfa..22df6000 100644 --- a/gemfeed/2022-10-30-installing-dtail-on-openbsd.html +++ b/gemfeed/2022-10-30-installing-dtail-on-openbsd.html @@ -8,7 +8,7 @@ -

    Installing DTail on OpenBSD


    +

    Installing DTail on OpenBSD



    Published at 2022-10-30T11:03:19+02:00

    @@ -61,7 +61,7 @@
    I will also mention some relevant Rexfile snippets in this post!

    -

    Compile it


    +

    Compile it



    First of all, DTail needs to be downloaded and compiled. For that, git, go, and gmake are required:

    @@ -96,7 +96,7 @@ $ doas pkg_delete git go gmake
    One day I shall create an official OpenBSD port for DTail.

    -

    Install it


    +

    Install it



    Installing the binaries is now just a matter of copying them to /usr/local/bin as follows:

    @@ -138,7 +138,7 @@ END $ doas chmod 755 /etc/rc.d/dserver
    -

    Rexification


    +

    Rexification



    This is the task for setting it up via Rex. Note the . . . ., that's a placeholder which we will fill up more and more during this blog post:

    @@ -165,7 +165,7 @@ task 'dtail', group => 'frontends', };
    -

    Configure it


    +

    Configure it



    Now, DTail is fully installed but still needs to be configured. Grab the default config file from GitHub ...

    @@ -188,7 +188,7 @@ $ curl https://raw.githubusercontent.com/mimecast/dtail/master/examples/dtail.js }
    -

    Rexification


    +

    Rexification



    That's as simple as adding the following to the Rex task:

    @@ -204,7 +204,7 @@ file '/etc/dserver/dtail.json', on_change => sub { $restart = TRUE };
    -

    Update the key cache for it


    +

    Update the key cache for it



    DTail relies on SSH for secure authentication and communication. However, the system user _dserver has no permission to read the SSH public keys from the user's home directories, so the DTail server also checks for available public keys in an alternative path /var/run/dserver/cache.

    @@ -257,7 +257,7 @@ $ echo /usr/local/bin/dserver-update-key-cache.sh | doas tee -a /etc/daily.local /usr/local/bin/dserver-update-key-cache.sh
    -

    Rexification


    +

    Rexification



    That's done by adding ...

    @@ -273,7 +273,7 @@ append_if_no_such_line '/etc/daily.local', '/usr/local/bin/dserver-u
    ... to the Rex task!

    -

    Start it


    +

    Start it



    Now, it's time to enable and start the DTail server:

    @@ -313,7 +313,7 @@ Caching /home/rex/.ssh/authorized_keys -> /var/cache/dserver/rex.authorized_k All set...
    -

    Use it


    +

    Use it



    The DTail server is now ready to serve connections. You can use any DTail commands, such as dtail, dgrep, dmap, dcat, dtailhealth, to do so. Checkout out all the usage examples on the official DTail page.

    @@ -339,7 +339,7 @@ REMOTE|blowfish|100|7|fstab|31bfd9d9a6788844.h /usr/local ffs rw,wxallowed,nodev REMOTE|fishfinger|100|7|fstab|093f510ec5c0f512.h /usr/local ffs rw,wxallowed,nodev 1 2
    -

    Conclusions


    +

    Conclusions



    It's a bit of manual work, but it's ok on this small scale! I shall invest time in creating an official OpenBSD port, though. That would render most of the manual steps obsolete, as outlined in this post!

    diff --git a/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.html b/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.html index f9fd05d5..8a1fa368 100644 --- a/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.html +++ b/gemfeed/2022-11-24-i-tried-emacs-but-i-switched-back-to-neovim.html @@ -8,7 +8,7 @@ -

    I tried (Doom) Emacs, but I switched back to (Neo)Vim


    +

    I tried (Doom) Emacs, but I switched back to (Neo)Vim



    Published at 2022-11-24T11:17:15+02:00; Updated at 2022-11-26

    @@ -37,13 +37,13 @@ Art by \ \_! / __!
    So why did I switch back to the Vi-family?

    -

    Emacs is a giant dragon


    +

    Emacs is a giant dragon



    Emacs feels like a giant dragon as it is much more than an editor or an integrated development environment. Emacs is a whole platform on its own. There's an E-Mail client, an IRC client, or even games you can run within Emacs. And you can also change Emacs within Emacs using its own Lisp dialect, Emacs Lisp (Emacs is programmed in Emacs Lisp). Therefore, Emacs is also its own programming language. You can change every aspect of Emacs within Emacs itself. People jokingly state Emacs is an operating system and that you should directly use it as the init 1 process (if you don't know what the init 1 process is: Under UNIX and similar operating systems, it's the very first userland processed launched. That's usually systemd on Linux-based systems, launchd on macOS, or any other init script or init system used by the OS)!

    In many aspects, Emacs is like shooting at everything with a bazooka! However, I prefer it simple. I only wanted Emacs to be a good editor (which it is, too), but there's too much other stuff in Emacs that I don't need to care about! Vim and NeoVim do one thing excellent: Being great text editors and, when loaded with plugins, decent IDEs, too.

    -

    Magit love


    +

    Magit love



    I almost fell in love with Magit, an integrated Git client for Emacs. But I think the best way to interact with Git is to use the git command line directly. I don't worry about typing out all the commands, as the most commonly used commands are in my shell history. Other useful Git programs I use frequently are bit and tig. Also, get a mechanical keyboard that makes hammering whole commands into the terminal even more enjoyable.

    @@ -52,13 +52,13 @@ Art by \ \_! / __!
    Magit is pretty neat for basic Git operations, but I found myself searching the internet for the correct sub-commands to do the things I wanted to do in Git. Mainly, the way how branches are managed is confusing. Often, I fell back to the command line to fix up the mess I produced with Magit (e.g. accidentally pushing to the wrong remote branch, so I found myself fixing things manually on the terminal with the git command with forced pushes....). Magit is hotkey driven, and common commands are quickly explorable through built-in hotkey menus. Still, I found it challenging to navigate to more advanced Git sub-commands that way which was much easier accomplished by using the git command directly.

    -

    Graphical UI


    +

    Graphical UI



    If there is one thing I envy about Emacs is that it's a graphical program, whereas the Vi-family of editors are purely terminal-based. I see the benefits of being a graphical program as this enables the use of multiple fonts simultaneously to embed pictures and graphs (that would be neat as a Markdown preview, for example). There's also GVim (Vim with GTK UI), but that's more of an afterthought.

    There are now graphical front-end clients for NeoVim, but I still need to dig into them. Let me know your experience if you have one. Luckily, I don't rely on something graphical in my text editor, but it would improve how the editor looks and feels. UTF8 can already do a lot in the terminal, and terminal emulators also allow you to use TrueType fonts. Still, you will always be limited to one TTF font for the whole terminal, and it isn't possible to have, for example, a different font for headings, paragraphs, etc... you get the idea. TTF+UTF8 can't beat authentic graphics.

    -

    Scripting it


    +

    Scripting it



    It is possible to customize every aspect of Emacs through Emacs Lisp. I have done some Elk Scheme programming in the past (a dialect of Lisp), but that was a long time ago, and I am not willing to dive here again to customize my environment. I would instead take the pragmatic approach and script what I need in VimScript (a terrible language, but it gets the job done!). I watched Damian Conway's VimScript course on O'Reilly Safari Books Online, which I greatly recommend. Yes, VimScript feels clunky, funky and weird and is far less elegant than Lisp, but it gets its job done - in most cases! (That reminds me that the Vim team has announced a new major version of VimScript with improvements and language changes made - I haven't gotten to it yet - but I assume that VimScript will always stay VimScript).

    @@ -87,7 +87,7 @@ nmap ,i !wpbpaste<C
    That's only a very few lines and does precisely what I want. It's quick and dirty but get's the job done! If VimScript becomes too cumbersome, I can use Lua for NeoVim scripting.

    -

    The famous Emacs Org mode


    +

    The famous Emacs Org mode



    Org-mode is an Emacs mode for keeping notes, authoring documents, computational notebooks, literate programming, maintaining to-do lists, planning projects, and more — in a fast and effective plain-text system. There's even a dedicated website for it:

    @@ -107,13 +107,13 @@ nmap ,i !wpbpaste<C Z shell
    tmux terminal multiplexer

    -

    Seeking simplicity


    +

    Seeking simplicity



    I am not ready to dive deep into the whole world of Emacs. I prefer small and simple tools as opposed to complex tools. Emacs comes with many features out of the box, whereas in Vim/NeoVim, you would need to install many plugins to replicate some of the behaviour. Yes, I need to invest time managing all the Vim/NeoVim plugins I use, but I feel more in control compared to Doom Emacs, where a framework around vanilla Emacs manages all the plugins. I could use vanilla Emacs and manage all my plugins the vanilla way, but for me, it's not worth the effort to learn and dive into that as all that I want to do I can already do with Vim/NeoVim.

    I am not saying that Vim/NeoVim are simple programs, but they are much simpler than Emacs with much smaller footprints; furthermore, they appear to be more straightforward as I am used to them. I only need Vim/NeoVim to be an editor, an IDE (through some plugins), and nothing more.

    -

    Conclusion


    +

    Conclusion



    I understand the Emacs users now. Emacs is an incredibly powerful platform for almost everything, not just text editing. With Emacs, you can do nearly everything (Writing, editing, programming, calendar scheduling and note taking, Jira integration, playing games, listening to music, reading/writing emails, browsing the web, using as a calculator, generating HTML pages, configuring interactive menus, jumping around between every feature and every file within one single session, chat on IRC, surf the Gopherspace, ... the options are endless....). If you want to have one piece of software which rules it all and you are happy to invest a large part of your time in your platform: Pick Emacs, and over time Emacs will become "your" Emacs, customized to your own needs and change the way it works, which makes the Emacs users stick even more to it.

    diff --git a/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.html b/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.html index 2ab0a8fb..7db09ffc 100644 --- a/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.html +++ b/gemfeed/2022-12-24-ultrarelearning-java-my-takeaways.html @@ -8,7 +8,7 @@ -

    (Re)learning Java - My takeaways


    +

    (Re)learning Java - My takeaways



    Published at 2022-12-24T23:18:40+02:00

    @@ -26,13 +26,13 @@
    At my workplace, as an SRE, I don't do Java a lot. I have been reading Java code to understand the software better so I can apply and suggest workarounds or fixes to existing issues and bugs. However, most of our stack is in Java, and our Software Engineers use Java as their primary programming language.

    -

    Stuck at Java 1.4


    +

    Stuck at Java 1.4



    Over time, I had been missing out on many new features that were added to the language since Java 1.4, so I decided to implement my next Pet Project in Java and learn every further aspect of the language as my main goal. Of course, I still liked the idea of winning a Pet Project Prize, but my main objective was to level up my Java skills.

    -

    (Re)learning & upskilling to Java 18


    +

    (Re)learning & upskilling to Java 18



    -

    Effective Java


    +

    Effective Java



    This book was recommended by my brother and also by at least another colleague at work to be one of the best, if not the best, book about Java programming. I read the whole book from the beginning to the end and immersed myself in it. I fully agree; this is a great book. Every Java developer or Java software engineer should read it!

    @@ -42,30 +42,30 @@
    Kyle Carter's 90-part Effective Java Series

    -

    Java Pub House


    +

    Java Pub House



    During my lunch breaks, I usually have a walk around the block or in a nearby park. I used that time to listen to the Java Pub House podcast. I listened to *every* episode and learned tons of new stuff. I can highly recommend this podcast. Especially GraalVM, a high-performance JDK distribution written for Java and other JVM languages, captured my attention. GraalVM can compile Java code into native binaries, improving performance and easing the distribution of Java programs. Because of the latter, I should release a VS-Sim GraalVM edition one day through a Linux AppImage ;-).

    https://www.javapubhouse.com
    https://www.graalvm.org

    -

    Java Concurrency course


    +

    Java Concurrency course



    I also watched a course on O'Reilly Safari Books online about Java Concurrency. That gave an excellent refresher on how the Java thread pools work and what were the concurrency primitives available in the standard library.

    -

    Read a lot of Java code


    +

    Read a lot of Java code



    First, the source code is often the best documentation (if programmed nicely), and second, it helps to get the hang of the language and standard practices. I started to read more and more Java code at work. I did that whenever I had to understand how something, in particular, worked (e.g. while troubleshooting and debugging an issue).

    -

    Observed Java code reviews


    +

    Observed Java code reviews



    Another great way to get the hang of Java again was to sneak into the code reviews of the Software Engineer colleagues. They are the expert on the matter and are a great source to copy knowledge. It's OK to stay passive and only follow the reviews. Sometimes, it's OK to step up and take ownership of the review. The developers will also always be happy to answer any naive questions which come up.

    -

    Took ownership of a roadmap-Java project


    +

    Took ownership of a roadmap-Java project



    Besides my Pet Project, I also took ownership of a regular roadmap Java project at work, making an internal Java service capable of running in Kubernetes. This was a bunch of minor changes and adding a bunch of classes and unit tests dealing with the statelessness and a persistent job queue in Redis. The job also involved reading and understanding a lot of already existing Java code. It wasn't part of my job description, but it was fun, and I learned a lot. The service runs smoothly in production now. Of course, all of my code got reviewed by my Software Engineering colleagues.

    -

    The good


    +

    The good



    From the new language features and syntaxes, there are many personal takeaways, and I can't possibly list them all, but here are some of my personal highlights:

    @@ -86,7 +86,7 @@
  • Lambdas are much cleaner, shorter and easier to read than anonymous classes. Many Java libraries require passing instances of (anonymous) classes (e.g. in Swing) to other objects. Lambdas are so lovely because they are primarily compatible with the passing of anonymous classes, so they are a 1:1 replacement in many instances. Lambdas also play very nicely together with the Java functional interfaces, as each Lambda got a type, and the type can be an already existing functional interface (or, if you got a particular case, you could define your custom functional interface for your own set of Lambdas, of course).
  • I love the concept of Java records. You can think of a record as an immutable object holding some data (as members). They are ideal for pipe and stream processing. They are much easier to define (with much less boilerplate) and come with write protection out of the box.

  • -

    The bad and the ugly


    +

    The bad and the ugly



    There are also many ugly corners in Java. Many are doomed to stay there forever due to historical decisions and ensuring backward compatibility with older versions of the Java language and the Java standard library.

    @@ -100,7 +100,7 @@
  • Being a bit spoiled by Golang's Goroutines, I was shocked about the limitations of the Java threads. They are resource hungry, and you can't just spin up millions of them as you would with Goroutines. I knew this limitation of threads already (as it's not a problem of the language but of how threads work in the OS), but still, I was pretty shocked when I got reminded of them again. Of course, there's a workaround: Use asynchronous sockets so that you don't waste a whole thread on a single I/O operation (in my case, waiting for a network response). Golang's runtime does that automatically for you: An OS thread will be re-used for other tasks until the network socket unblocks. Every modern programming language should support lightweight threads or Coroutines like Go's Goroutines.


  • -

    Conclusion


    +

    Conclusion



    While (re)learning Java, I felt like a student again and was quite enthusiastic about it initially. I invested around half a year, immersing myself intensively in Java (again). The last time I did that was many years ago as a university student. I even won a Silver Prize at work, implementing a project this year (2022 as of writing this). I feel confident now with understanding, debugging and patching Java code at work, which boosted my debugging and troubleshooting skills.

    diff --git a/gemfeed/2023-01-23-why-grapheneos-rox.html b/gemfeed/2023-01-23-why-grapheneos-rox.html index dcd37e04..367cb01c 100644 --- a/gemfeed/2023-01-23-why-grapheneos-rox.html +++ b/gemfeed/2023-01-23-why-grapheneos-rox.html @@ -8,7 +8,7 @@ -

    Why GrapheneOS rox


    +

    Why GrapheneOS rox



    Published at 2023-01-23T15:31:52+02:00

    @@ -48,7 +48,7 @@ Art by Joan Stark https://GrapheneOS.org
    https://LineageOS.org

    -

    User Profiles


    +

    User Profiles



    GrapheneOS allows configuring up to 32 user profiles (including a guest profile) on a single phone. A profile is a completely different environment within the phone, and it is possible to switch between them instantly. Sessions of a profile can continue running in the background or be fully terminated. Each profile can have completely different settings and different applications installed.

    @@ -58,7 +58,7 @@ Art by Joan Stark
    You notice how much longer (multiple days) your phone can be on a single charge when Google Play Services isn't running in the background. This tells a lot about the background activities and indicates that using Google Play shouldn't be the norm.

    -

    Proxying some of the Google offerings


    +

    Proxying some of the Google offerings



    There's also the case that I am using an app from the Google Play store (as the app isn't available from F-Droid), which doesn't require Google Play Services to run in the background. Here's where I use the Aurora Android store. The Aurora store can be installed through F-Droid. Aurora acts as an anonymous proxy from your phone to the Google Play Store and lets you install apps from there. No Google credentials are required for that!

    @@ -66,7 +66,7 @@ Art by Joan Stark
    There's a similar solution for watching videos on YouTube. You can use the NewPipe app (also from F-Droid), which acts as an anonymous proxy for watching videos from YouTube. So there isn't any need to install the official YouTube app, and there isn't any need to login to your Google account. What's so bad about the official app? You don't know which data it is sending about you to Google, so it is a privacy concern.

    -

    Google Play Sandboxing


    +

    Google Play Sandboxing



    Before switching to GrapheneOS, I had been using LineageOS on one of my phones for a couple of years. Still, I always had to have a secondary personal phone with all of these proprietary apps which (partially) only work with Google Play on the phone (e.g. Banking, Navigation, various travel apps from various Airlines, etc.) somewhere around as I didn't install Google Play on my LineageOS phone due to privacy concerns and only installed apps from the F-Droid store on it. When travelling, I always had to carry around a second phone with Google Play on it, as without it; life would become inconvenient pretty soon.

    @@ -84,7 +84,7 @@ Art by Joan Stark
    It is great to have the flexibility to use any proprietary Android app when needed. That only applies to around 1% of my phone usage time, but you often don't always know when you need "that one app now". So it's perfect that it's covered with the phone you always have with you.

    -

    The camera and the cloud


    +

    The camera and the cloud



    I really want my phone to shoot good looking pictures, so that I can later upload them to the Irregular Ninja:

    @@ -104,7 +104,7 @@ Art by Joan Stark
    I also use NextCloud to synchronize my notes (NextCloud Notes), my RSS news feeds (NextCloud News) and contacts (DAVx5). All apps required are available in the F-Droid store.

    -

    Fine granular permissions


    +

    Fine granular permissions



    Another great thing about GrapheneOS is that, besides putting your apps into different profiles, you can also restrict network access and configure storage scopes per app individually.

    @@ -112,7 +112,7 @@ Art by Joan Stark
    The app also wants to store and read some data from your phone (e.g. it could be a proprietary app for enhancing photos, and therefore storage access to a photo folder would be required). In GrapheneOS, you can configure a storage scope for that particular app, e.g. only read and write from one folder but still forbid access to all other folders on your phone.

    -

    Termux


    +

    Termux



    Termux can be installed on any Android phone through F-Droid, so it doesn't need to be a GrapheneOS phone. But I have to mention Termux here as it significantly adds value to my phone experience.

    @@ -124,7 +124,7 @@ Art by Joan Stark
    There are Pixel phones with a screen size of 6", and that's decent enough for occasional use like that, and everything (the phone, the BT keyboard, maybe an external battery pack) all fit nicely in a small travel pocket.

    -

    So, why not use a pure Linux phone?


    +

    So, why not use a pure Linux phone?



    Strictly speaking, an Android phone is a Linux phone, but it's heavily modified and customized. For me, a "pure" Linux phone is a more streamlined Linux kernel running in a distribution like Ubuntu Touch or Mobian.

    @@ -139,7 +139,7 @@ Art by Joan Stark
    SailfishOS

    -

    Small GrapheneOS downsides


    +

    Small GrapheneOS downsides



    Sometimes, switching a profile to use a different app is annoying, and you can't copy and paste from the system clipboard from one profile to another. But that's a small price I am willing to pay!

    diff --git a/gemfeed/2023-02-26-how-to-shut-down-after-work.html b/gemfeed/2023-02-26-how-to-shut-down-after-work.html index 8cb4d077..a56770ae 100644 --- a/gemfeed/2023-02-26-how-to-shut-down-after-work.html +++ b/gemfeed/2023-02-26-how-to-shut-down-after-work.html @@ -8,7 +8,7 @@ -

    How to shut down after work


    +

    How to shut down after work



    Published at 2023-02-26T23:48:01+02:00

    @@ -29,13 +29,13 @@
    Do you need help fully discharging from work in the evenings or for the weekend? Shutting down from work won't just improve your work-life balance; it will also significantly improve the quality of your personal life and work. After a restful weekend, you will be much more energized and productive the next working day. So it should not just be in your own, but also your employers' interest that you fully relax and shut down after work.

    -

    Have a shutdown routine


    +

    Have a shutdown routine



    Have a routine. Try to finish work around the same time every day. Write any outstanding tasks down for the next day, so you are sure you will remember them. Writing them down brings wonders as you can remove them from your mind for the remainder of the day (or the upcoming weekend) as you know you will surely pick them up the next working day. Tidying up your workplace could also count toward your daily shutdown routine.

    A commute home from the office also greatly helps, as it disconnects your work from your personal life. Don't work on your commute home, though! If you don't commute but work from home, then it helps to walk around the block or in a nearby park to disconnect from work.

    -

    Don't work when you officially don't work


    +

    Don't work when you officially don't work



    Unless you are self-employed, you have likely signed an N-hour per week contract with your employer, and your regular working times are from X o'clock in the morning to Y o'clock in the evening (with M minutes lunch break in the middle). And there might be some flexibility in your working times, too. But that kind of flexibility (e.g. extending the lunch break so that there is time to pick up a family member from the airport) will be agreed upon, and you will counteract it, for example, by starting working earlier the next day or working late, that one exception. But overall, your weekly working time will stay N hours.

    @@ -49,7 +49,7 @@
    Checking for your messages constantly outside of regular office times makes it impossible to shut down and relax from work altogether.

    -

    Distract your mind


    +

    Distract your mind



    Often, your mind goes back to work-related stuff even after work. That's normal as you concentrated highly on your work throughout the day. The brain unconsciously continues to work and will automatically present you with random work-related thoughts. You can counteract this by focusing on non-work stuff, which may include:

    @@ -62,23 +62,23 @@
    Some of these can be habit-stacked: Exercise could be combined with watching videos about your passion project (e.g. watching lectures about that new programming language you are currently learning for fun). With walking, for example, you could combine listening to an Audiobook or music, or you could also think about your passion project during that walk.

    -

    Get a pet


    +

    Get a pet



    Even if you have children, it helps wonders to get a pet. My cat, for example, will remind me a few times daily to take a few minute's breaks to pet, play or give food. So my cat not only helps me after work but throughout the day.

    My neighbour also works from home, and he has dogs, which he regularly has to take out to the park.

    -

    Journal your day


    +

    Journal your day



    If you are upset about something, making it impossible to shut down from work, write down everything (e.g., with a pen in a paper journal). Writing things down helps you to "get rid" of the negative. Especially after conflicts with colleagues or company decisions, you don't agree on. This kind of self-therapy is excellent. Brainstorm all your emotions and (even if opinionated) opinions so you have everything on paper. Once done, you don't think about it so much anymore, as you know you can access that information if required. But stopping ruminating about it will be much easier now. You will likely never access that information again, though. But at least writing the thoughts down saved your day.

    Write down three things which went well for the day. This helps you to appreciate the day.

    -

    Don't stress about what your employer expects from you


    +

    Don't stress about what your employer expects from you



    Think about what's fun and motivates you. Maybe the next promotion to Principal or a Manager role isn't for you. Many fall into the trap of stressing themselves out to satisfy the employer so that the next upgrade will happen and think about it constantly, even after work. But it is more important that you enjoy your craftsmanship. Work on what you expect from yourself. Ideally, your goals should be aligned with your employer. I am not saying you should abandon everything what your manager is asking you to do, but it is, after all, your life. And you have to decide where and on what you want to work. But don't sell yourself short. Keep track of your accomplishments.

    -

    Call it a day


    +

    Call it a day



    Every day you gave your best was good; the day's outcome doesn't matter. What matters is that you know you gave your best and are closer to your goals than the previous day. This gives you a sense of progress and accomplishment.

    diff --git a/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.html b/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.html index a1751909..cc0ae248 100644 --- a/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.html +++ b/gemfeed/2023-03-16-the-pragmatic-programmer-book-notes.html @@ -8,7 +8,7 @@ -

    "The Pragmatic Programmer" book notes


    +

    "The Pragmatic Programmer" book notes



    Published at 2023-03-16T00:55:20+02:00

    @@ -59,7 +59,7 @@
    Do what works and not what's fashionable. E.g. does SCRUM make sense? The goal is to deliver deliverables and not to "become" agile.

    -

    Continuous learning


    +

    Continuous learning



    Add new tools to your repertoire every day and keep the momentum up. Learning new things is your most crucial aspect. Invest regularly in your knowledge portfolio. The learning process extends your thinking. It does not matter if you will never use it.

    @@ -70,7 +70,7 @@
    Think critically about everything you learn. Use paper for your notes. There is something special about it.

    -

    Stay connected


    +

    Stay connected



    It's your life, and you own it. Bruce Lee once said:

    @@ -83,7 +83,7 @@
    It's your life. Share it, celebrate it, be proud and have fun.

    -

    The story of stone soup


    +

    The story of stone soup



    How to motivate others to contribute something (e.g. ideas to a startup):

    diff --git a/gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.html b/gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.html index 862258a6..478cee72 100644 --- a/gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.html +++ b/gemfeed/2023-03-25-gemtexter-2.0.0-lets-gemtext-again-2.html @@ -8,7 +8,7 @@ -

    Gemtexter 2.0.0 - Let's Gemtext again²


    +

    Gemtexter 2.0.0 - Let's Gemtext again²



    Published at 2023-03-25T17:50:32+02:00

    @@ -33,7 +33,7 @@
    Let's list what's new!

    -

    Minimal template engine


    +

    Minimal template engine



    Gemtexter now supports templating, enabling dynamically generated content to .gmi files before converting anything to any output format like HTML and Markdown.

    @@ -99,7 +99,7 @@ See more entries about DTail and Golang: Blablabla...
    -

    Added hooks


    +

    Added hooks



    You can configure PRE_GENERATE_HOOK and POST_PUBLISH_HOOK to point to scripts to be executed before running --generate, or after running --publish. E.g. you could populate some of the content by an external script before letting Gemtexter do its thing or you could automatically deploy the site after running --publish.

    @@ -113,11 +113,11 @@ http://www.gnu.org/software/src-highlite --> declare -xr POST_PUBLISH_HOOK=./post_publish_hook.sh
    -

    Use of safer Bash options


    +

    Use of safer Bash options



    Gemtexter now does set -euf -o pipefile, which helps to eliminate bugs and to catch scripting errors sooner. Previous versions only set -e.

    -

    Meta cache made obsolete


    +

    Meta cache made obsolete



    Here is the breaking change to older versions of Gemtexter. The $BASE_CONTENT_DIR/meta directory was made obsolete. meta was used to store various information about all the blog post entries to make generating an Atom feed in Bash easier. Especially the publishing dates of each post were stored there. Instead, the publishing date is now encoded in the .gmi file. And if it is missing, Gemtexter will set it to the current date and time at first run.

    @@ -147,11 +147,11 @@ http://www.gnu.org/software/src-highlite --> The remaining content of the Gemtext file...
    -

    XMLLint support


    +

    XMLLint support



    Optionally, when the xmllint binary is installed, Gemtexter will perform a simple XML lint check against the Atom feed generated. This is a double-check of whether the Atom feed is a valid XML.

    -

    More


    +

    More



    Additionally, there were a couple of bug fixes, refactorings and overall improvements in the documentation made.

    diff --git a/gemfeed/2023-04-01-never-split-the-difference-book-notes.html b/gemfeed/2023-04-01-never-split-the-difference-book-notes.html index 7770095a..e7300573 100644 --- a/gemfeed/2023-04-01-never-split-the-difference-book-notes.html +++ b/gemfeed/2023-04-01-never-split-the-difference-book-notes.html @@ -8,7 +8,7 @@ -

    "Never split the difference" book notes


    +

    "Never split the difference" book notes



    Published at 2023-04-01T20:00:17+03:00

    @@ -26,7 +26,7 @@ '''
    -

    Tactical listening, spreading empathy


    +

    Tactical listening, spreading empathy



    Be a mirror, copy each other to be comfy with each other to build up trust. Mirroring is mainly body language. A mirror is to repeat the words the other just said. Simple but effective.

    @@ -37,7 +37,7 @@
    Mirror training is like Jedi training. Simple but effective. A mirror needs space. Be silent after "you want this?"

    -

    Mindset of discovery


    +

    Mindset of discovery



    Try to have multiple realities in your mind and use facts to distinguish between real and false.

    @@ -49,7 +49,7 @@
    Try: to put a label on someone's emotion and then be silent. Wait for the other to reveal himself. "You seem unhappy about this?"

    -

    More tips


    +

    More tips



    • Put on a poker face and don't show emotions.
    • @@ -58,7 +58,7 @@
    • Being right is not the key to successful negotiation; being mindful is.
    • Be in the safe zone of empathy and acknowledge bad news.

    -

    "No" starts the conversation


    +

    "No" starts the conversation



    When the opponent starts with a "no", he feels in control and comfortable. That's why he has to start with "no".

    @@ -71,11 +71,11 @@
    Get a "That's right" when negotiating. Don't get a "you're right". You can summarise the opponent to get a "that's right".

    -

    Win-win


    +

    Win-win



    Win-win is a naive approach when encountering the win-lose counterpart, but always cooperate. Don't compromise, and don't split the difference. We don't compromise because it's right; we do it because it is easy. You must embrace the hard stuff; that's where the great deals are.

    -

    On Deadlines


    +

    On Deadlines



    • All deadlines are imaginary.
    • @@ -83,7 +83,7 @@
    • They push a deal to a conclusion.
    • They rush the counterpart to cause pressure and anxiety.

    -

    Analyse the opponent


    +

    Analyse the opponent



    • Understand the motivation of people behind the table as well.
    • @@ -93,7 +93,7 @@

    The person on the other side is never the issue; the problem is the issue. Keep this in mind to avoid emotional issues with the person and focus on the problem, not the person. The bond is essential; never create an enemy.

    -

    Use different ways of saying "no."


    +

    Use different ways of saying "no."



    I had paid my rent always in time. I had positive experiences with the building and would be sad for the landlord to lose a good tenant. I am looking for a win-win agreement between us. Pulling out the research, other neighbours offer much lower prices even if your building is a better location and services. How can I effort 200 more....

    @@ -101,7 +101,7 @@
    You always have to embrace thoughtful confrontation for good negotiation and life. Don't avoid honest, clear conflict. It will give you the best deals. Compromises are mostly bad deals for both sides. Most people don't negotiate a win-win but a win-lose. Know the best and worst outcomes and what is acceptable for you.

    -

    Calibrated question


    +

    Calibrated question



    Calibrated questions. Give the opponent a sense of power. Ask open-how questions to get the opponent to solve your problem and move him in your direction. Calibrated questions are the best tools. Summarise everything, and then ask, "how I am supposed to do that?". Asking for help this way with a calibrated question is a powerful tool for joint problem solving

    @@ -117,11 +117,11 @@
    Prepare 3 to 5 calibrated questions for your counterpart. Be curious what is really motivating the other side. You can get out the "Black Swan".

    -

    The black swan


    +

    The black swan



    What we don't know can break our deal. Uncovering it can bring us unexpected success. You get what you ask for in this world, but you must learn to ask correctly. Reveal the black swan by asking questions.

    -

    More


    +

    More



    Establish a range at top places like corp. I get... (e.g. remote London on a project basis). Set a high salary range and not a number. Also, check on LinkedIn premium for the salaries.

    diff --git a/gemfeed/2023-04-09-algorithms-and-data-structures-in-golang-part-1.html b/gemfeed/2023-04-09-algorithms-and-data-structures-in-golang-part-1.html index 103aefae..bc6d9b75 100644 --- a/gemfeed/2023-04-09-algorithms-and-data-structures-in-golang-part-1.html +++ b/gemfeed/2023-04-09-algorithms-and-data-structures-in-golang-part-1.html @@ -8,7 +8,7 @@ -

    Algorithms and Data Structures in Go - Part 1


    +

    Algorithms and Data Structures in Go - Part 1



    Published at 2023-04-09T22:31:42+03:00

    @@ -32,7 +32,7 @@
    This post is about setting up some basic data structures and methods for this blog series. I promise, everything will be easy to follow in this post. It will become more interesting later in this series.

    -

    Type constraints


    +

    Type constraints



    First, the package ds (data structures) defines the types.go. All examples will either operate on the Integer or Number type:

    @@ -56,7 +56,7 @@ http://www.gnu.org/software/src-highlite -->
    -

    ArrayList


    +

    ArrayList



    Next comes the arraylist.go, which defines the underlying data structure all the algorithms of this series will use. ArrayList is just a type alias of a Go array (or slice) with custom methods on it:

    @@ -116,7 +116,7 @@ http://www.gnu.org/software/src-highlite --> }
    -

    Helper methods


    +

    Helper methods



    The FirstN method only returns the first N elements of the ArrayList. This is useful for printing out only parts of the data structure:

    @@ -175,7 +175,7 @@ http://www.gnu.org/software/src-highlite -->
    -

    Sleep sort


    +

    Sleep sort



    Let's implement our first algorithm, sleep sort. Sleep sort is a non-traditional and unconventional sorting algorithm based on the idea of waiting a certain amount of time corresponding to the value of each element in the input ArrayList. It's more of a fun, creative concept rather than an efficient or practical sorting technique. This is not a sorting algorithm you would use in any production code. As you can imagine, it is quite an inefficient sorting algorithm (it's only listed here as a warm-up exercise). This sorting method may also return false results depending on how the Goroutines are scheduled by the Go runtime.

    @@ -222,7 +222,7 @@ http://www.gnu.org/software/src-highlite -->
    This Go code implements the sleep sort algorithm using generics and goroutines. The main function Sleep[V ds.Integer](a ds.ArrayList[V]) ds.ArrayList[V] takes a generic ArrayList as input and returns a sorted ArrayList. The code creates a separate goroutine for each element in the input array, sleeps for a duration proportional to the element's value, and then sends the element to a channel. Another goroutine waits for all the sleeping goroutines to finish and then closes the channel. The sorted result ArrayList is constructed by appending the elements received from the channel in the order they arrive. The sync.WaitGroup is used to synchronize goroutines and ensure that all of them have completed before closing the channel.

    -

    Testing


    +

    Testing



    For testing, we only allow values up to 10, as otherwise, it would take too long to finish:

    diff --git a/gemfeed/2023-05-01-unveiling-guprecords:-uptime-records-with-raku.html b/gemfeed/2023-05-01-unveiling-guprecords:-uptime-records-with-raku.html index b2068199..29e46420 100644 --- a/gemfeed/2023-05-01-unveiling-guprecords:-uptime-records-with-raku.html +++ b/gemfeed/2023-05-01-unveiling-guprecords:-uptime-records-with-raku.html @@ -8,7 +8,7 @@ -

    Unveiling guprecords.raku: Global Uptime Records with Raku


    +

    Unveiling guprecords.raku: Global Uptime Records with Raku



    Published at 2023-04-30T13:10:26+03:00

    @@ -29,7 +29,7 @@ +-----+-----------------+-----------------------------+
    -

    Introduction


    +

    Introduction



    For fun, I am tracking the uptime of various personal machines (servers, laptops, workstations...). I have been doing this for over ten years now, so I have a lot of statistics collected.

    @@ -52,7 +52,7 @@
    And I have been following the Raku newsletter, and sometimes I have been lurking around in the IRC channels, too. Watching Raku coding challenges on YouTube was pretty fun, too. However, nothing beats actually using Raku to learn the language. After reading all of these resources, I may have a good idea about the features and paradigms, but I am by far not an expert.

    -

    How Guprecords works


    +

    How Guprecords works



    Guprecords works in three stages:

    @@ -78,7 +78,7 @@ http://www.gnu.org/software/src-highlite -->
  • Output formats available: Plaintext, Markdown, and Gemtext
  • Provides top entries based on the specified limit

  • -

    Example


    +

    Example



    You have already seen an example at the very top of this post, where the hosts were grouped by their total lifespans (uptime+downtime). Here's an example of what the global uptime report (grouped by total host uptimes) might look like:

    @@ -149,7 +149,7 @@ no1 in 455 days, 18:52:44 | at Sun Jul 21 07:37:51 2024 %up 99.997 | since Tue Dec 18 10:16:08 2018
    -

    Conclusion


    +

    Conclusion



    Guprecords is a small, yet powerful tool for analyzing uptime statistics. While developing Guprecords, I have come to truly appreciate and love Raku's expressiveness. The language is designed to be both powerful and flexible, allowing developers to express their intentions and logic more clearly and concisely.

    diff --git a/gemfeed/2023-05-06-the-obstacle-is-the-way-book-notes.html b/gemfeed/2023-05-06-the-obstacle-is-the-way-book-notes.html index df1974d9..3c2ae97a 100644 --- a/gemfeed/2023-05-06-the-obstacle-is-the-way-book-notes.html +++ b/gemfeed/2023-05-06-the-obstacle-is-the-way-book-notes.html @@ -8,7 +8,7 @@ -

    "The Obstacle is the Way" book notes


    +

    "The Obstacle is the Way" book notes



    Published at 2023-05-06T17:23:16+03:00

    @@ -29,7 +29,7 @@
    "The obstacle is the way" is a powerful statement that encapsulates the wisdom of turning challenges into opportunities for growth and success. We will explore using obstacles as fuel, transforming weaknesses into strengths, and adopting a mindset that allows us to be creative and persistent in the face of adversity.

    -

    Reframe your perspective


    +

    Reframe your perspective



    The obstacle in your path can become your path to success. Instead of being paralyzed by challenges, see them as opportunities to learn and grow. Remember, the things that hurt us often instruct us.

    @@ -38,37 +38,37 @@ Don't always try to use the front door; a backdoor could open. It's nonsense. Don't fight the judo master with judo. Non-action can be action, exposing the weaknesses of others.


    -

    Embrace rationality


    +

    Embrace rationality



    It is a superpower to see things rationally when others are fearful. Focus on the reality of the situation without letting emotions, such as anger, cloud your judgment. This ability will enable you to make better decisions in adversity. Ability to see things what they really are. E.g. wine is old fermented grapes, or other people behaving like animals during a fight. Show the middle finger if someone persists on the stupid rules occasionally.

    -

    Control your response


    +

    Control your response



    You can choose how you respond to obstacles. Focus on what you can control, and don't let yourself feel harmed by external circumstances. Remember, you decide how things affect you; nobody else does. Choose to feel good in response to any situation. Embrace the challenges and obstacles that come your way, as they are opportunities for growth and learning.

    -

    Practice emotional and physical resilience


    +

    Practice emotional and physical resilience



    Martial artists know the importance of developing physical and emotional strength. Cultivate the art of not panicking; it will help you avoid making mistakes during high-pressure situations.

    Focus on what you can control. Don't choose to feel harmed, and then you won't be harmed. I decide things that affect me; nobody else does. E.g., in prison, your mind stays your own. Don't ignore fear but explain it away, have a different view.

    -

    Persistence and patience


    +

    Persistence and patience



    Practice persistence and patience in your pursuits. Focus on the process rather than the prize and take one step at a time. Remember, the journey is about finishing tasks, projects, or workouts to the best of your ability. Never be in a hurry and never be desperate. There is no reason to be rushed; there are all in the long haul. Follow the process and not the price. Take it one step at a time. The process is about finishing (workout, task, project, etc.).

    -

    Embrace failure


    +

    Embrace failure



    Failure is a natural part of life and can make us stronger. Treat defeat as a stepping stone to success and education. What is defeat? The first step to education. Failure makes you stronger. If we do our best, we can be proud of it, regardless of the result. Do your job, but do it right. Only an asshole thinks he is too good at the things he does. Also, asking for forgiveness is easier than asking for permission.

    -

    Be adaptable


    +

    Be adaptable



    There are many ways to achieve your goals; sometimes, unconventional methods are necessary. Feel free to break the rules or go off the beaten path if it will lead to better results. Transform weaknesses into strengths. We have a choice of how to respond to things. It's not about being positive but to be creative. Aim high, but stuff will happen; E.g., surprises will always happen.

    -

    Embrace non-action


    +

    Embrace non-action



    We constantly push to the next thing. Sometimes the best course of action is standing still or even going backwards. Obstacles might resolve by themselves. Or going sideways. Sometimes, the best action is to stand still, go sideways, or even go backwards. Obstacles may resolve themselves or present new opportunities if you're patient and observant. People always want your input before you have all the facts. They want you to play after their rules. The question is, do you let them? The English call it the cool head. Being in control of Stress; requires practice. Appear, the absence of fear (Greek). When all others do it one way, it does not mean it is the correct or best practice.

    -

    Leverage crisis


    +

    Leverage crisis



    In times of crisis, seize the chance to do things never done before. Great people use negative situations to their advantage and become the most effective in challenging circumstances.

    @@ -76,19 +76,19 @@
    Be prepared for nothing to work. Problems are an opportunity to do your best, not to do miracles. Always manage your expectations. It will suck, but it will be ok. Be prepared to begin from the beginning. Be cheerful and eagerly work on the next obstacle. Each time you become better. Life is not a sprint but a marathon. After each obstacle lies another obstacle, there won't be anything without obstacles. Passing one means you are ready for the next.

    -

    Build your inner citadel


    +

    Build your inner citadel



    Develop your inner strength during good times so you can rely on it in bad times. Always prepare for adversity and face it with calmness and resilience. Be humble enough that things which happen will happen. Build your inner citadel. In good times strengthen it. In bad times rely on it.

    We should always prepare for things to get tough. Your house burns down: no worries, we eliminated much rubbish. Imagine what can go wrong before things go wrong. We are prepared for adversity; it's other people who aren't. Phil Jackson's hip problem example. To receive unexpected benefits, you must first accept the unexpected obstacles. Meditate on death. It's a universal obstacle. Use it as a reminder to do your best.

    -

    Love everything that happens


    +

    Love everything that happens



    Turn an obstacle the other way around for your benefit. Use it at fuel. It's simple but challenging. Most are paralyzed instead. The obstacle in the path becomes the path. Obstacles are neither good nor bad. The things which hurt, instruct.

    Should I hate people who hate me? That's their problem and not mine. Be always calm and relaxed during the fight. The story of the battle is the story of the smile. Cheerfulness in all situations, especially the bad ones. Love for everything that happens; if it happens, it was meant to happen. We can choose how we react to things, so why not choose to feel good? I love everything that happens. You must never lower yourself to the person you don't like.

    -

    Conclusion


    +

    Conclusion



    Life is a marathon, not a sprint. Each obstacle we overcome prepares us for the next one. Remember, the obstacle is not just a barrier to be turned upside down; it can also be used as a catapult to propel us forward. By embracing challenges and using them as opportunities for growth, we become stronger, more adaptable, and, ultimately, more successful.

    diff --git a/gemfeed/2023-06-01-kiss-server-monitoring-with-gogios.html b/gemfeed/2023-06-01-kiss-server-monitoring-with-gogios.html index f799e41f..f79b7b62 100644 --- a/gemfeed/2023-06-01-kiss-server-monitoring-with-gogios.html +++ b/gemfeed/2023-06-01-kiss-server-monitoring-with-gogios.html @@ -8,13 +8,13 @@ -

    KISS server monitoring with Gogios


    +

    KISS server monitoring with Gogios



    Published at 2023-06-01T21:10:17+03:00

    Gogios logo

    -

    Introduction


    +

    Introduction



    Gogios is a minimalistic and easy-to-use monitoring tool I programmed in Google Go designed specifically for small-scale self-hosted servers and virtual machines. The primary purpose of Gogios is to monitor my personal server infrastructure for foo.zone, my MTAs, my authoritative DNS servers, my NextCloud, Wallabag and Anki sync server installations, etc.

    @@ -45,7 +45,7 @@ The original can be found at https://asciiart.website/index.php?art=objects/computers
    -

    Motivation


    +

    Motivation



    With experience in monitoring solutions like Nagios, Icinga, Prometheus and OpsGenie, these tools often came with many features that I didn't necessarily need for personal use. Contact groups, host groups, check clustering, and the requirement of operating a DBMS and a WebUI added complexity and bloat to my monitoring setup.

    @@ -53,7 +53,7 @@ https://asciiart.website/index.php?art=objects/computers
    This led me to create Gogios, a lightweight monitoring tool tailored to my specific needs. I chose the Go programming language for this project as it comes, in my opinion, with the best balance of ease to use and performance.

    -

    Features


    +

    Features



    • Compatible with Nagios Check scripts: Gogios leverages the widely-used Nagios Check API, allowing to use existing Nagios plugins.
    • @@ -64,7 +64,7 @@ https://asciiart.website/index.php?art=objects/computers
    • Email Notifications: Gogios can send email notifications regarding the status of monitored services, ensuring you stay informed about potential issues.
    • CRON-based Execution: Gogios can be quickly scheduled to run periodically via CRON, allowing you to automate monitoring without needing a complex setup.

    -

    Example alert


    +

    Example alert



    This is an example alert report received via E-Mail. Whereas, [C:2 W:0 U:0 OK:51] means that we've got two alerts in status critical, 0 warnings, 0 unknowns and 51 OKs.

    @@ -86,9 +86,9 @@ CRITICAL: Check ICMP6 vulcan.buetow.org: Check command timed out Have a nice day!
    -

    Installation


    +

    Installation



    -

    Compiling and installing Gogios


    +

    Compiling and installing Gogios



    This document is primarily written for OpenBSD, but applying the corresponding steps to any Unix-like (e.g. Linux-based) operating system should be easy. On systems other than OpenBSD, you may always have to replace does with the sudo command and replace the /usr/local/bin path with /usr/bin.

    @@ -120,7 +120,7 @@ go build -o gogios cmd/gogios/main.go
    https://www.rexify.org

    -

    Setting up user, group and directories


    +

    Setting up user, group and directories



    It is best to create a dedicated system user and group for Gogios to ensure proper isolation and security. Here are the steps to create the _gogios user and group under OpenBSD:

    @@ -137,7 +137,7 @@ doas chmod 750 /var/run/gogios
    Please note that creating a user and group might differ depending on your operating system. For other operating systems, consult their documentation for creating system users and groups.

    -

    Installing monitoring plugins


    +

    Installing monitoring plugins



    Gogios relies on external Nagios or Icinga monitoring plugin scripts. On OpenBSD, you can install the monitoring-plugins package with Gogios. The monitoring-plugins package is a collection of monitoring plugins, similar to Nagios plugins, that can be used to monitor various services and resources:

    @@ -151,9 +151,9 @@ doas pkg_add nrpe # If you want to execute checks remot
    Once the installation is complete, you can find the monitoring plugins in the /usr/local/libexec/nagios directory, which then can be configured to be used in gogios.json.

    -

    Configuration


    +

    Configuration



    -

    MTA


    +

    MTA



    Gogios requires a local Mail Transfer Agent (MTA) such as Postfix or OpenBSD SMTPD running on the same server where the CRON job (see about the CRON job further below) is executed. The local MTA handles email delivery, allowing Gogios to send email notifications to monitor status changes. Before using Gogios, ensure that you have a properly configured MTA installed and running on your server to facilitate the sending of emails. Once the MTA is set up and functioning correctly, Gogios can leverage it to send email notifications.

    @@ -165,7 +165,7 @@ echo 'This is a test email from OpenBSD.' | mail -s 'Test Email'
    Check the recipient's inbox to confirm the delivery of the test email. If the email is delivered successfully, it indicates that your email server is configured correctly and functioning. Please check your MTA logs in case of issues.

    -

    Configuring Gogios


    +

    Configuring Gogios



    To configure Gogios, create a JSON configuration file (e.g., /etc/gogios.json). Here's an example configuration:

    @@ -228,7 +228,7 @@ http://www.gnu.org/software/src-highlite -->
    The state.json file mentioned above keeps track of the monitoring state and check results between Gogios runs, enabling Gogios only to send email notifications when there are changes in the check status.

    -

    Running Gogios


    +

    Running Gogios



    Now it is time to give it a first run. On OpenBSD, do:

    @@ -250,7 +250,7 @@ http://www.gnu.org/software/src-highlite -->
    Gogios is now configured to run every five minutes from 8 am to 10 pm via CRON as the _gogios user. It will execute the checks and send monitoring status whenever a check status changes via email according to your configuration. Also, Gogios will run once at 7 am every morning and re-notify all unhandled alerts as a reminder.

    -

    High-availability


    +

    High-availability



    To create a high-availability Gogios setup, you can install Gogios on two servers that will monitor each other using the NRPE (Nagios Remote Plugin Executor) plugin. By running Gogios in alternate CRON intervals on both servers, you can ensure that even if one server goes down, the other will continue monitoring your infrastructure and sending notifications.

    @@ -263,7 +263,7 @@ http://www.gnu.org/software/src-highlite -->
    There are plans to make it possible to execute certain checks only on certain nodes (e.g. on elected leader or master nodes). This is still in progress (check out my Gorum Git project).

    -

    Conclusion:


    +

    Conclusion:



    Gogios is a lightweight and straightforward monitoring tool that is perfect for small-scale environments. With its compatibility with the Nagios Check API, email notifications, and CRON-based scheduling, Gogios offers an easy-to-use solution for those looking to monitor a limited number of resources. I personally use it to execute around 500 checks on my personal server infrastructure. I am very happy with this solution.

    diff --git a/gemfeed/2023-07-17-career-guide-and-soft-skills-book-notes.html b/gemfeed/2023-07-17-career-guide-and-soft-skills-book-notes.html index 965b3a5f..88d8de7f 100644 --- a/gemfeed/2023-07-17-career-guide-and-soft-skills-book-notes.html +++ b/gemfeed/2023-07-17-career-guide-and-soft-skills-book-notes.html @@ -8,7 +8,7 @@ -

    "Software Developmers Career Guide and Soft Skills" book notes


    +

    "Software Developmers Career Guide and Soft Skills" book notes



    Published at 2023-07-17T04:56:20+03:00

    @@ -26,9 +26,9 @@ '''
    -

    Improve


    +

    Improve



    -

    Always learn new things


    +

    Always learn new things



    When you learn something new, e.g. a programming language, first gather an overview, learn from multiple sources, play around and learn by doing and not consuming and form your own questions. Don't read too much upfront. A large amount of time is spent in learning technical skills which were never use. You want to have a practical set of skills you are actually using. You need to know 20 percent to get out 80 percent of the results.

    @@ -46,11 +46,11 @@
    Boot camps: The advantage of a boot camp is to pragmatically learn things fast. We almost always overestimate what we can do in a day. Especially during boot camps. Connect to others during the boot camps

    -

    Set goals


    +

    Set goals



    Your own goals are important but the manager also looks at how the team performs and how someone can help the team perform better. Check whether you are on track with your goals every 2 weeks in order to avoid surprises for the annual review. Make concrete goals for next review. Track and document your progress. Invest in your education. Make your goals known. If you want something, then ask for it. Nobody but you knows what you want.

    -

    Ratings


    +

    Ratings



    That's a trap: If you have to rate yourself, that's a trap. That never works in an unbiased way. Rate yourself always the best way but rate your weakest part as high as possible minus one point. Rate yourself as good as you can otherwise. Nobody is putting for fun a gun on his own head.

    @@ -58,7 +58,7 @@
  • Don't do peer rating, it can fire back on you. What if the colleague becomes your new boss?
  • Cooperate rankings are unfortunately HR guidelines and politics and only mirror a little your actual performance.

  • -

    Promotions


    +

    Promotions



    The most valuable employees are the ones who make themselves obsolete and automate all away. Keep a safety net of 3 to 6 months of finances. Safe at least 10 percent of your earnings. Also, if you make money it does not mean that you have to spent more money. Is a new car better than a used car which both can bring you from A to B? Liability vs assets.

    @@ -71,7 +71,7 @@
  • If you want a raise be specific how much and know to back your demands. Don't make a thread and no ultimatums.
  • Best way for a promotion is to switch jobs. You can even switch back with a better salary.

  • -

    Finish things


    +

    Finish things



    Hard work is necessary for accomplish results. However, work smarter not harder. Furthermore, working smart is not a substitute for working hard. Work both, hard and smart.

    @@ -86,7 +86,7 @@
    Defeat is finally give up. Failure is the road to success, embrace it. Failure does not define you but how you respond to it. Events don't make your unhappy, but how you react to events do.

    -

    Expand the empire


    +

    Expand the empire



    The larger your empire is, the larger your circle of influence is. The larger the circle of influence is, the more opportunities you have.

    @@ -97,7 +97,7 @@
    Become visible, keep track that you accomplishments. E.g. write a weekly summary. Do presentations, be seen. Learn new things and share your learnings. Be the problem solver and not the blamer.

    -

    Be pragmatic and also manage your time


    +

    Be pragmatic and also manage your time



    Make use of time boxing via the Pomodoro technique: Set a target of rounds and track the rounds. That give you exact focused work time. That's really the trick. For example set a goal of 6 daily pomodores.

    @@ -107,7 +107,7 @@
    You should feel good of the work done even if you don't finished the task. You will feel good about pomodoro wise even you don't finish the task on hand yet. Helps you to enjoy time off more. Working longer may not sell anything.

    -

    The quota system


    +

    The quota system



    Defined quota of things done. E.g. N runs per week or M Blog posts per month or O pomodoros per week. This helps with consistency. Truly commit to these quotas. Failure is not an option. Start with small commitments. Don't commit to something you can't fulfill otherwise you set yourself up for failure.

    @@ -116,7 +116,7 @@
  • Internal motivation is more important over external motivation. Check out Daniels book drive.
  • Multitasking: Batching is effective. E.g. emails twice daily at pre-set times..

  • -

    Don't waste time


    +

    Don't waste time



    The biggest time waster is TV watching. The TV is programming you. It's insane that Americans watch so much TV as they work full time. Schedule one show at a time and watch it when you want to watch it. Most movies are crap anyways. The good movies will come to you as people will talk about them.

    @@ -125,7 +125,7 @@
  • Meetings can waste time as well. Simply don't go to them. Try to cancel meeting if it can be dealt with via email.
  • Enjoying things is not a waste of time. E.g. you could still play a game once in a while. It is important not to cut away all you enjoy from your life.

  • -

    Habits


    +

    Habits



    Try to have as many good habits as possible. Start with easy habits, and make them a little bit more challenging over time. Set ankers and rewards. Over time the routines will become habits naturally.

    @@ -135,7 +135,7 @@
  • We don't have control over our habits but our own routines.
  • Routines help to form the habits, though.

  • -

    Work-life balance


    +

    Work-life balance



    Avoid overwork hours. That's not as beneficial as you might think and comes only with very small rewards. Invest rather in yourself and not in your employer.

    @@ -147,7 +147,7 @@
    Use your most productive hours to work on you. Make that your priority. Take care of yourself a priority (E.g. do workouts or learn a new language). You can always workout 2 or 1 hour per day, but will you pay the price?

    -

    Mental health


    +

    Mental health



    • Friendships and positive thinking help to have and maintain better health, longer Life, better productivity and increased happiness.
    • @@ -158,7 +158,7 @@
      In most cases burnout is just an illusion. If you don't have motivation push through the wall. People usually don't pass the wall as they feel they are burned out. After pushing through the wall you will have the most fun, for example you will be able playing the guitar greatly.

      -

      Physical health


      +

      Physical health



      Utilise a standing desk and treadmill (you could walk and type at the same time). Increase the incline in order to burn more calories. Even on the standing desk you burn more calories than sitting. When you use pomodoro then you can use the small breaks for push-ups (maybe won't do as good when you are in a fasted state).

      @@ -170,7 +170,7 @@

    Intermittent fasting is an effective method to maintain weight and health. But it does not mean that you can only eat junk food in the feeding windows. Also, diet and nutrition is the most important for health and fitness. They make it also easier to stay focused and positive.

    -

    No drama


    +

    No drama



    Avoid drama at work. Where are humans there is drama. You can decide where to spent your energy in. But don't avoid conflict. Conflict is healthy in any kind of relationship. Be tactful and state your opinion. The goal is to find the best solution to the problem.

    @@ -186,13 +186,13 @@
    You have to learn how to work in a team. Be honest but tactful. It's not too be the loudest but about selling your ideas. Don't argue otherwise you won't sell anything. Be persuasive by finding the common ground. Or lead the colleagues to your idea and don't sell it upfront. Communicate clearly.

    -

    Personal brand


    +

    Personal brand



    • Invest your value outside the company. Build your personal brand. Show how valuable you are, also to other companies. Become an asset.
    • Invest in your education. Make your goals known. If you want something ask for it (see also the sections about goals in this document).

    -

    Market yourself


    +

    Market yourself



    • The best way to market yourself is to make you usable.
    • @@ -205,11 +205,11 @@
    • Have an elevator pitch: "buetow.org - Having fun with computers!"
    • Have social media accounts, especially the ones which are more tech related.

    -

    Networking


    +

    Networking



    Ask people so they talk about themselves. They are not really interested in you. Use meetup.com to find groups you are interested and build up the network over time. Don't drink on social networking events even when others do. Talking to other people at events only has upsides. Just saying "hi" and introducing yourself is enough. What worse can happen? If the person rejects you so what, life goes on. Ask open questions and no "yes" and "no" questions. E.g.: "What is your story, why are you here?".

    -

    Public speaking


    +

    Public speaking



    Before your talk go on stage 10 minutes in advance. Introduce yourself to the front row people. During the talk they will smile at you and encourage you during your talk.

    @@ -219,9 +219,9 @@
    Just do it. Just go to conferences. Even if you are not speaking. Sell your boss what you would learn and "this and that" and you would present the learnings to the team afterwards.

    -

    New job


    +

    New job



    -

    For the interview


    +

    For the interview



    • Build up a network before the interview. E.g., follow and comment blogs. Or go to meet-ups and conferences. Join user groups.
    • @@ -230,7 +230,7 @@

    If you are specialized then there is a better chance to get a fitting job. No one will hire a general lawyer if there are specialized lawyers available. Even if you are specialized, you will have a wide range of skills (T-shape knowledge).

    -

    Find the right type of company


    +

    Find the right type of company



    Not all companies are equal. They have individual cultures and guidelines.

    @@ -242,7 +242,7 @@
    Work in a tech. company if you want to work on/with cutting edge technologies.

    -

    Apply for the new job


    +

    Apply for the new job



    Get a professional resume writer. Get referrals of writers and get samples from there. Get sufficient with algorithm and data structures interview questions. Cracking the coding interview book and blog

    @@ -255,7 +255,7 @@
    Invest in your dress code as appearance masters. It does make sense to invest in your style. You could even hire a professional stylist (not my personal way though).

    -

    Negotiation


    +

    Negotiation



    • Whoever names the number first loses. You don't know what someone else is expecting unless told. Low ball number may be an issue but you have to know the market.
    • @@ -273,21 +273,21 @@
      • Never spilt the difference is the best book for learning negotiation techniques..

      -

      Leaving the old job


      +

      Leaving the old job



      When leaving a job make a clean and non personal as possible. Never complain and never explain. Don't worry about abandonment of the team. Everybody is replacement and you make a business decision. Don't threaten to quit as you are replaceable.

      -

      Other things


      +

      Other things



      • As a leader lead by example and don't lead from the Eiffel tower.
      • As a leader you are responsible for the team. If the team fails then it's your fault only.

      -

      Testing


      +

      Testing



      Unit testing Vs regression testing: Unit tests test the smallest possible unit and get rewritten if the unit gets changed. It's like programming against a specification n. Regression tests test whether the software still works after the change. Now you know more than most software engineers.

      -

      Books to read


      +

      Books to read



      • Clean Code
      • diff --git a/gemfeed/2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.html b/gemfeed/2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.html index a9249f90..732d285e 100644 --- a/gemfeed/2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.html +++ b/gemfeed/2023-07-21-gemtexter-2.1.0-lets-gemtext-again-3.html @@ -8,7 +8,7 @@ -

        Gemtexter 2.1.0 - Let's Gemtext again³


        +

        Gemtexter 2.1.0 - Let's Gemtext again³



        Published at 2023-07-21T10:19:31+03:00

        @@ -29,17 +29,17 @@
        https://codeberg.org/snonux/gemtexter

        -

        Why Bash?


        +

        Why Bash?



        This project is too complex for a Bash script. Writing it in Bash was to try out how maintainable a "larger" Bash script could be. It's still pretty maintainable and helps me try new Bash tricks here and then!

        Let's list what's new!

        -

        Switch to GPL3 license


        +

        Switch to GPL3 license



        Many (almost all) of the tools and commands (GNU Bash, GMU Sed, GNU Date, GNU Grep, GNU Source Highlight) used by Gemtexter are licensed under the GPL anyway. So why not use the same? This was an easy switch, as I was the only code contributor so far!

        -

        Source code highlighting support


        +

        Source code highlighting support



        The HTML output now supports source code highlighting, which is pretty neat if your site is about programming. The requirement is to have the source-highlight command, which is GNU Source Highlight, to be installed. Once done, you can annotate a bare block with the language to be highlighted. E.g.:

        @@ -64,11 +64,11 @@ http://www.gnu.org/software/src-highlite -->
        Please run source-highlight --lang-list for a list of all supported languages.

        -

        HTML exact variant


        +

        HTML exact variant



        Gemtexter is there to convert your Gemini Capsule into other formats, such as HTML and Markdown. An HTML exact variant can now be enabled in the gemtexter.conf by adding the line declare -rx HTML_VARIANT=exact. The HTML/CSS output changed to reflect a more exact Gemtext appearance and to respect the same spacing as you would see in the Geminispace.

        -

        Use of Hack webfont by default


        +

        Use of Hack webfont by default



        The Hack web font is a typeface designed explicitly for source code. It's a derivative of the Bitstream Vera and DejaVu Mono lineage, but it features many improvements and refinements that make it better suited to reading and writing code.

        @@ -76,7 +76,7 @@ http://www.gnu.org/software/src-highlite -->
        Hack is open-source and freely available for use and modification under the MIT License.

        -

        HTML Mastodon verification support


        +

        HTML Mastodon verification support



        The following link explains how URL verification works in Mastodon:

        @@ -106,7 +106,7 @@ http://www.gnu.org/software/src-highlite -->
        <a href='https://fosstodon.org/@snonux' rel='me'>Me at Mastodon</a>
         

        -

        More


        +

        More



        Additionally, there were a couple of bug fixes, refactorings and overall improvements in the documentation made.

        diff --git a/gemfeed/2023-08-18-site-reliability-engineering-part-1.html b/gemfeed/2023-08-18-site-reliability-engineering-part-1.html index c93a4cfb..2b136934 100644 --- a/gemfeed/2023-08-18-site-reliability-engineering-part-1.html +++ b/gemfeed/2023-08-18-site-reliability-engineering-part-1.html @@ -8,7 +8,7 @@ -

        Site Reliability Engineering - Part 1: SRE and Organizational Culture


        +

        Site Reliability Engineering - Part 1: SRE and Organizational Culture



        Published at 2023-08-18T22:43:47+03:00

        @@ -40,7 +40,7 @@ DC on fire: ░░░░░░░░░░▒▒░░░░░░░░░░░░░░░░░░░░░░░░▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒░░░░░░░░░░░░░░░░░░
        -

        SRE and Organizational Culture: Navigating the Nexus


        +

        SRE and Organizational Culture: Navigating the Nexus



        At the heart of SRE lies the proactive mindset of "prevention over cure." Traditional IT models focused predominantly on reactive solutions, but SRE mandates a shift towards foresight. By adopting Service Level Indicators (SLIs) and Service Level Objectives (SLOs), teams are equipped with clear metrics and goals that guide them toward ensuring reliability and user satisfaction. They reflect an organisational culture prioritising user experience and constant system alignment with user needs.

        diff --git a/gemfeed/2023-09-25-dtail-usage-examples.html b/gemfeed/2023-09-25-dtail-usage-examples.html index 231cf3dc..f07fed00 100644 --- a/gemfeed/2023-09-25-dtail-usage-examples.html +++ b/gemfeed/2023-09-25-dtail-usage-examples.html @@ -8,7 +8,7 @@ -

        DTail usage examples


        +

        DTail usage examples



        Published at 2023-09-25T14:57:42+03:00

        @@ -42,7 +42,7 @@
      • Use dmap to aggregate logs and other text files already written
      • dserver is the DTail server, where all the clients can connect to

      -

      Following logs


      +

      Following logs



      The following example demonstrates how to follow logs of several servers at once. The server list is provided as a flat text file. The example filters all records containing the string INFO. Any other Go compatible regular expression can also be used instead of INFO.

      @@ -66,7 +66,7 @@ http://www.gnu.org/software/src-highlite -->
      % dtail --servers serverlist.txt --grep INFO "/var/log/dserver/*.log"
       

      -

      Aggregating logs


      +

      Aggregating logs



      To run ad-hoc map-reduce aggregations on newly written log lines you must add a query. The following example follows all remote log lines and prints out every few seconds the result to standard output.

      @@ -123,7 +123,7 @@ http://www.gnu.org/software/src-highlite --> --query 'from STATS select ... outfile append result.csv'
      -

      How to use dcat


      +

      How to use dcat



      The following example demonstrates how to cat files (display the full content of the files) on several servers at once.

      @@ -147,7 +147,7 @@ http://www.gnu.org/software/src-highlite -->
      % dcat --servers serverlist.txt /etc/hostname
       

      -

      How to use dgrep


      +

      How to use dgrep



      The following example demonstrates how to grep files (display only the lines which match a given regular expression) of multiple servers at once. In this example, we look after some entries in /etc/passwd. This time, we don't provide the server list via an file but rather via a comma separated list directly on the command line. We also explore the -before, -after and -max flags (see animation).

      @@ -166,7 +166,7 @@ http://www.gnu.org/software/src-highlite -->
      Hint: -regex is an alias for -grep.

      -

      How to use dmap


      +

      How to use dmap



      To run a map-reduce aggregation over logs written in the past, the dmap command can be used. The following example aggregates all map-reduce fields dmap will print interim results every few seconds. You can also write the result to an CSV file by adding outfile result.csv to the query.

      @@ -184,7 +184,7 @@ http://www.gnu.org/software/src-highlite -->
      DMap example

      -

      How to use the DTail serverless mode


      +

      How to use the DTail serverless mode



      Until now, all examples so far required to have remote server(s) to connect to. That makes sense, as after all DTail is a *distributed* tool. However, there are circumstances where you don't really need to connect to a server remotely. For example, you already have a login shell open to the server an all what you want is to run some queries directly on local log files.

      @@ -192,7 +192,7 @@ http://www.gnu.org/software/src-highlite -->
      All commands shown so far also work in a serverless mode. All what needs to be done is to omit a server list. The DTail client then starts in serverless mode.

      -

      Serverless map-reduce query


      +

      Serverless map-reduce query



      The following dmap example is the same as the previously shown one, but the difference is that it operates on a local log file directly:

      @@ -227,7 +227,7 @@ http://www.gnu.org/software/src-highlite --> lifetimeConnections group by $hostname order by max($cgocalls)'
      -

      Aggregating CSV files


      +

      Aggregating CSV files



      In essence, this works exactly like aggregating logs. All files operated on must be valid CSV files and the first line of the CSV must be the header. E.g.:

      @@ -249,7 +249,7 @@ Einstein,Albert
      DMap can also be used to query and aggregate CSV files from remote servers.

      -

      Other serverless commands


      +

      Other serverless commands



      The serverless mode works transparently with all other DTail commands. Here are some examples:

      diff --git a/gemfeed/2023-10-29-kiss-static-web-photo-albums-with-photoalbum.sh.html b/gemfeed/2023-10-29-kiss-static-web-photo-albums-with-photoalbum.sh.html index 49338f09..0293ba9c 100644 --- a/gemfeed/2023-10-29-kiss-static-web-photo-albums-with-photoalbum.sh.html +++ b/gemfeed/2023-10-29-kiss-static-web-photo-albums-with-photoalbum.sh.html @@ -8,7 +8,7 @@ -

      KISS static web photo albums with photoalbum.sh


      +

      KISS static web photo albums with photoalbum.sh



      Published at 2023-10-29T22:25:04+02:00

      @@ -29,7 +29,7 @@ '._____________________________________________.'
      -

      Motivation


      +

      Motivation



      Once in a while, I share photos on the inter-web with either family and friends or on my The Irregular Ninja photo site. One hobby of mine is photography (even though I don't have enough time for it - so I am primarily a point-and-shoot photographer).

      @@ -37,11 +37,11 @@
      I value KISS (keep it simple and stupid) and simplicity. All that's required for a web photo album is some simple HTML and spice it up with CSS. No need for JavaScript, no need for a complex dynamic website.

      -

      Introducing photoalbum.sh


      +

      Introducing photoalbum.sh



      photoalbum.sh is a minimal Bash (Bourne Again Shell) script for Unix-like operating systems (such as Linux) to generate static web photo albums. The resulting static photo album is pure HTML+CSS (without any JavaScript!). It is specially designed to be as simple as possible.

      -

      Installation


      +

      Installation



      Installation is straightforward. All required is a recent version of GNU Bash, GNU Make, Git and ImageMagick. On Fedora, the dependencies are installed with:

      @@ -84,7 +84,7 @@ cp ./src/photoalbum.default.conf /etc/default/photoalbum This is Photoalbum Version 0.5.1
      -

      Setting it up


      +

      Setting it up



      Now, it's time to set up the Irregular Ninja static web photo album (or any other web photo album you may be setting up!)! Create a directory (here: irregular.ninja for the Irregular Ninja Photo site - or any oter sub-directory reflecting your album's name), and inside of that directory, create an incoming directory. The incoming directory. Copy all photos to be part of the album there.

      @@ -197,7 +197,7 @@ http://www.gnu.org/software/src-highlite -->
      So I changed the album title, adjusted some image and thumbnail dimensions, and I want all images to be randomly shuffled every time the album is generated! I also have all my photos in my Nextcloud Photo directory and don't want to copy them to the local incoming directory. Also, a tarball containing the whole album as a download isn't provided.

      -

      Generating the static photo album


      +

      Generating the static photo album



      Let's generate it. Depending on the image sizes and count, the following step may take a while.

      @@ -260,15 +260,15 @@ blurs html index.html photos thumbs
      PS: There's also a server-side synchronisation script mirroring the same content to another server for high availability reasons (out of scope for this blog post).

      -

      Cleaning it up


      +

      Cleaning it up



      A simple make clean will clean up the ./dist directory and all other (if any) temp files created.

      -

      HTML templates


      +

      HTML templates



      Poke around in this source directory. You will find a bunch of Bash-HTML template files. You could tweak them to your liking.

      -

      Conclusion


      +

      Conclusion



      A decent looking (in my opinion, at least) in less than 500 (273 as of this writing, to be precise) lines of Bash code and with minimal dependencies; what more do you want? How many LOCs would this be in Raku with the same functionality (can it be sub-100?).

      diff --git a/gemfeed/2023-11-11-mind-management-book-notes.html b/gemfeed/2023-11-11-mind-management-book-notes.html index 79dc980d..5773f671 100644 --- a/gemfeed/2023-11-11-mind-management-book-notes.html +++ b/gemfeed/2023-11-11-mind-management-book-notes.html @@ -8,7 +8,7 @@ -

      "Mind Management" book notes


      +

      "Mind Management" book notes



      Published at 2023-11-11T22:21:47+02:00

      @@ -32,11 +32,11 @@
    • The point of diminishing returns
    • The point of negative return

    -

    Empty slots in the calendar


    +

    Empty slots in the calendar



    If we do more things in less time and use all possible slots, speed read, etc., we are more productive. But in reality, that's not the entire truth. You also exchange one thing against everything else.... You cut out too much from your actual life.

    -

    When you safe time...


    +

    When you safe time...



    ...keep it.

    @@ -45,7 +45,7 @@
  • Creative thinking needs space. It will pay dividends tomorrow.
  • You will be rewarded with the "Eureka effect" - a sudden new insight.

  • -

    Follow your mood


    +

    Follow your mood



    Ask yourself: what is my mood now? We never have the energy to do anything, so the better strategy is to follow your current mode and energy. E.g.:

    @@ -53,7 +53,7 @@
  • Didn't sleep enough today? Then, do simple, non-demanding tasks at work
  • Had a great sleep, and there is even time before work starts? Pull in a workout...

  • -

    Boosting creativity


    +

    Boosting creativity



    The morning without coffee is a gift for creativity, but you often get distracted. Minimize distractions, too. I have no window to stare out but a plain blank wall.

    @@ -63,7 +63,7 @@
  • Don't race with time but walk alongside it as rough time lines.
  • Don't judge every day after the harvest, but the seed you lay

  • -

    The right mood for the task at hand


    +

    The right mood for the task at hand



    We need to try many different combinations. Limiting ourselves and trying too hard makes us frustrated and burn out. Creativity requires many iterations.

    @@ -77,7 +77,7 @@
    It gives you pleasure and is in a good mood. This increases creativity if you do what you want to do.

    -

    Creativity hacks


    +

    Creativity hacks



    • Coffee can cause anxiety.
    • @@ -88,7 +88,7 @@
    • Go to open spaces for creativity.
    • Go to closed spaces for polishing.

    -

    Planning and strategizing


    +

    Planning and strategizing



    Minds work better in sprints and not in marathons. Have a weekly plan, not a daily one.

    @@ -101,7 +101,7 @@
    You could schedule exploratory tasks when you are under grief. Sound systems should create slack for creativity. Plan only for a few minutes.

    -

    Fake it until you make it.


    +

    Fake it until you make it.



    • E.g. act calm if you want to be calm.
    • diff --git a/gemfeed/2023-11-19-site-reliability-engineering-part-2.html b/gemfeed/2023-11-19-site-reliability-engineering-part-2.html index 74fd6f02..84eed92e 100644 --- a/gemfeed/2023-11-19-site-reliability-engineering-part-2.html +++ b/gemfeed/2023-11-19-site-reliability-engineering-part-2.html @@ -8,7 +8,7 @@ -

      Site Reliability Engineering - Part 2: Operational Balance in SRE


      +

      Site Reliability Engineering - Part 2: Operational Balance in SRE



      Published at 2023-11-19T00:18:18+03:00

      @@ -33,7 +33,7 @@ ⠀⠀⠀⠀⠀⠀⠴⠶⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠶⠦⠀⠀
      -

      Operational Balance in SRE: Finding the Equilibrium in Reliability and Velocity


      +

      Operational Balance in SRE: Finding the Equilibrium in Reliability and Velocity



      Site Reliability Engineering has established itself as more than just a set of best practices or methodologies. Instead, it stands as a beacon of operational excellence, which guides engineering teams through the turbulent waters of modern software development and system management.

      diff --git a/gemfeed/2023-12-10-bash-golf-part-3.html b/gemfeed/2023-12-10-bash-golf-part-3.html index bd9b3521..021faf6f 100644 --- a/gemfeed/2023-12-10-bash-golf-part-3.html +++ b/gemfeed/2023-12-10-bash-golf-part-3.html @@ -8,7 +8,7 @@ -

      Bash Golf Part 3


      +

      Bash Golf Part 3



      Published at 2023-12-10T11:35:54+02:00

      @@ -29,7 +29,7 @@ jgs^^^^^^^`^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2022-01-01 Bash Golf Part 2
      2023-12-10 Bash Golf Part 3 (You are currently reading this)

      -

      FUNCNAME


      +

      FUNCNAME



      FUNCNAME is an array you are looking for a way to dynamically determine the name of the current function (which could be considered the callee in the context of its own execution), you can use the special variable FUNCNAME. This is an array variable that contains the names of all shell functions currently in the execution call stack. The element FUNCNAME[0] holds the name of the currently executing function, FUNCNAME[1] the name of the function that called that, and so on.

      @@ -69,7 +69,7 @@ http://www.gnu.org/software/src-highlite --> INFO|20231210-082732|123002|at_home_friday_evening|One Peperoni Pizza, please
      -

      :(){ :|:& };:


      +

      :(){ :|:& };:



      This one may be widely known already, but I am including it here as I found a cute image illustrating it. But to break :(){ :|:& };: down:

      @@ -92,7 +92,7 @@ INFO|20231210- Bash fork bomb

      -

      Inner functions


      +

      Inner functions



      Bash defines variables as it is interpreting the code. The same applies to function declarations. Let's consider this code:

      @@ -161,7 +161,7 @@ Wintel inside! Wintel inside!
      -

      Exporting functions


      +

      Exporting functions



      Have you ever wondered how to execute a shell function in parallel through xargs? The problem is that this won't work:

      @@ -251,7 +251,7 @@ http://www.gnu.org/software/src-highlite -->
      ... because some_other_function isn't exported! You will also need to add an export -f some_other_function!

      -

      Dynamic variables with local


      +

      Dynamic variables with local



      You may know that local is how to declare local variables in a function. Most don't know that those variables actually have dynamic scope. Let's consider the following example:

      @@ -291,7 +291,7 @@ foo What happened? The variable foo (declared with local) is available in the function it was declared in and in all other functions down the call stack! We can even modify the value of foo, and the change will be visible up the call stack. It's not a global variable; on the last line, echo "$foo" echoes the global variable content.


      -

      if conditionals


      +

      if conditionals



      Consider all variants here more or less equivalent:

      @@ -342,7 +342,7 @@ ok4a ok4b
      -

      Multi-line comments


      +

      Multi-line comments



      You all know how to comment. Put a # in front of it. You could use multiple single-line comments or abuse heredocs and redirect it to the : no-op command to emulate multi-line comments.

      @@ -366,7 +366,7 @@ COMMENT
      I will not demonstrate the execution of this script, as it won't print anything! It's obviously not the most pretty way of commenting on your code, but it could sometimes be handy!

      -

      Don't change it while it's executed


      +

      Don't change it while it's executed



      Consider this script:

      diff --git a/gemfeed/2024-01-09-site-reliability-engineering-part-3.html b/gemfeed/2024-01-09-site-reliability-engineering-part-3.html index 75792507..2b556e33 100644 --- a/gemfeed/2024-01-09-site-reliability-engineering-part-3.html +++ b/gemfeed/2024-01-09-site-reliability-engineering-part-3.html @@ -8,7 +8,7 @@ -

      Site Reliability Engineering - Part 3: On-Call Culture and the Human Aspect


      +

      Site Reliability Engineering - Part 3: On-Call Culture and the Human Aspect



      Published at 2024-01-09T18:35:48+02:00

      @@ -44,7 +44,7 @@
      -

      On-Call Culture and the Human Aspect: Prioritising Well-being in the Realm of Reliability


      +

      On-Call Culture and the Human Aspect: Prioritising Well-being in the Realm of Reliability



      Site Reliability Engineering is synonymous with ensuring system reliability, but the human factor is an often-underestimated part of this discipline. Ensuring an healthy on-call culture is as critical as any technical solution. The well-being of the engineers is an important factor.

      diff --git a/gemfeed/2024-01-13-one-reason-why-i-love-openbsd.html b/gemfeed/2024-01-13-one-reason-why-i-love-openbsd.html index b3b417d6..49c2ed28 100644 --- a/gemfeed/2024-01-13-one-reason-why-i-love-openbsd.html +++ b/gemfeed/2024-01-13-one-reason-why-i-love-openbsd.html @@ -8,7 +8,7 @@ -

      One reason why I love OpenBSD


      +

      One reason why I love OpenBSD



      Published at 2024-01-13T22:55:33+02:00

      diff --git a/gemfeed/2024-02-04-from-babylon5.buetow.org-to-.cloud.html b/gemfeed/2024-02-04-from-babylon5.buetow.org-to-.cloud.html index 882b3c71..db7cc6c0 100644 --- a/gemfeed/2024-02-04-from-babylon5.buetow.org-to-.cloud.html +++ b/gemfeed/2024-02-04-from-babylon5.buetow.org-to-.cloud.html @@ -8,7 +8,7 @@ -

      From babylon5.buetow.org to *.buetow.cloud


      +

      From babylon5.buetow.org to *.buetow.cloud



      Published at 2024-02-04T00:50:50+02:00

      @@ -18,7 +18,7 @@
      Old man yells at cloud

      -

      The old *.buetow.org way


      +

      The old *.buetow.org way



      Before the migration, all those services were reachable through buetow.org-subdomains (Buetow is my last name) and ran on Docker containers on a single Rocky Linux 9 VM at Hetzner. And there was a Nginx reverse proxy with TLS offloading (with Let's Encrypt certificates). The Rocky Linux 9's hostname was babylon5.buetow.org (based on the Science Fiction series).

      @@ -38,7 +38,7 @@
    • KISS (Keep it Simple Stupid)
    • Cheap

    -

    I kept my buetow.org OpenBSD boxes alive


    +

    I kept my buetow.org OpenBSD boxes alive



    As pointed out, I only migrated the Docker-based self-hosted services (which run on the Babylon 5 Rocky Linux box) to AWS. Many self-hostable apps come with ready-to-use container images, making deploying them easy.

    @@ -59,7 +59,7 @@ KISS server monitoring with Gogios
    Let's encrypt with OpenBSD and Rex

    -

    The new *.buetow.cloud way


    +

    The new *.buetow.cloud way



    With AWS, I decided to get myself a new domain name, as I could fully separate my AWS setup from my conventional setup and give Route 53 as an authoritative DNS a spin.

    @@ -89,11 +89,11 @@
  • org-buetow-elb sets up the Elastic Load Balancer, a prerequisite for any service running in ECS Fargate.
  • org-buetow-ecs finally sets up and deploys all the Docker apps mentioned above. Any apps can be turned on or off via the variables.tf file.

  • -

    The container apps


    +

    The container apps



    And here, finally, is the list of all the container apps my Terraform manifests deploy. The FQDNs here may not be reachable. I spin them up only on demand (for cost reasons). All services are fully dual-stacked (IPv4 & IPv6).

    -

    flux.buetow.cloud


    +

    flux.buetow.cloud



    Miniflux is a minimalist and opinionated feed reader. With the move to AWS, I also retired my bloated instance of NextCloud. So, with Miniflux, I retired from NextCloud News.

    @@ -102,7 +102,7 @@ https://miniflux.app/


    -

    audiobookshelf.buetow.cloud


    +

    audiobookshelf.buetow.cloud



    Audiobookshelf was the first Docker app I installed. It is a Self-hosted audiobook and podcast server. It comes with a neat web interface, and there is also an Android app available, which works also in offline mode. This is great, as I only have the ECS instance sometimes running for cost savings.

    @@ -110,7 +110,7 @@
    https://www.audiobookshelf.org

    -

    syncthing.buetow.cloud


    +

    syncthing.buetow.cloud



    Syncthing is a continuous file synchronisation program. In real-time, it synchronises files between two or more computers, safely protected from prying eyes. Your data is your own, and you deserve to choose where it is stored, whether it is shared with some third party, and how it's transmitted over the internet.

    @@ -120,7 +120,7 @@
    https://syncthing.net/

    -

    radicale.buetow.cloud


    +

    radicale.buetow.cloud



    Radicale is an excellent minimalist WebDAV calendar and contact synchronisation server. It was good enough to replace my NextCloud Calendar and NextCloud Contacts setup. Unfortunately, there wasn't a ready-to-use Docker image. So, I created my own.

    @@ -130,21 +130,21 @@ https://codeberg.org/snonux/docker-radicale-server
    https://www.davx5.com/

    -

    bag.buetow.cloud


    +

    bag.buetow.cloud



    Wallabag is a self-hostable "save now - read later" service, and it also comes with an Android app which also has an offline mode. Think of Getpocket, but open-source!

    https://wallabag.org/
    https://github.com/wallabag/wallabag

    -

    anki.buetow.cloud


    +

    anki.buetow.cloud



    Anki is a great (the greatest) flash-card learning program. I am currently learning Bulgarian as my 3rd language. There is also an Android app that has an offline mode, and advanced users can also self-host the server anki-sync-server. For some reason (not going into the details here), I had to build my own Docker image for the server.

    https://apps.ankiweb.net/
    https://codeberg.org/snonux/docker-anki-sync-server

    -

    vault.buetow.cloud


    +

    vault.buetow.cloud



    Vaultwarden is an alternative implementation of the Bitwarden server API written in Rust and compatible with upstream Bitwarden clients, perfect for self-hosted deployment where running the official resource-heavy service might not be ideal. So, this is a great password manager server which can be used with any Bitwarden Android app.

    @@ -156,11 +156,11 @@
    Sweating the small stuff

    -

    bastion.buetow.cloud


    +

    bastion.buetow.cloud



    This is a tiny ARM-based Amazon Linux EC2 instance, which I sometimes spin up for investigation or manual work on my EFS file system in AWS.

    -

    Conclusion


    +

    Conclusion



    I have learned a lot about AWS and Terraform during this migration. This was actually my first AWS hands-on project with practical use.

    diff --git a/gemfeed/2024-03-03-a-fine-fyne-android-app-for-quickly-logging-ideas-programmed-in-golang.html b/gemfeed/2024-03-03-a-fine-fyne-android-app-for-quickly-logging-ideas-programmed-in-golang.html index d53117b2..41c26c6e 100644 --- a/gemfeed/2024-03-03-a-fine-fyne-android-app-for-quickly-logging-ideas-programmed-in-golang.html +++ b/gemfeed/2024-03-03-a-fine-fyne-android-app-for-quickly-logging-ideas-programmed-in-golang.html @@ -8,7 +8,7 @@ -

    A fine Fyne Android app for quickly logging ideas programmed in Go


    +

    A fine Fyne Android app for quickly logging ideas programmed in Go



    Published at 2024-03-03T00:07:21+02:00

    @@ -40,7 +40,7 @@
    My Android apps will never be polished, but they will get the job done, and this is precisely how I want them to be. Minimalistic but functional. I could spend more time polishing Quick logger, but my Quick logger app then may be the same as any other notes app out there (complicated or bloated).

    -

    All easy-peasy?


    +

    All easy-peasy?



    I did have some issues with the app logo for Android, though. Android always showed the default app icon and not my custom icon whenever I used a custom AndroidManifest.xml for custom app storage permissions. Without a custom AndroidAmnifest.xml the app icon would be displayed under Android, but then the app would not have the MANAGE_EXTERNAL_STORAGE permission, which is required for Quick logger to write to a custom directory. I found a workaround, which I commented on here at Github:

    diff --git a/gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.html b/gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.html index 36c88618..ffd80d59 100644 --- a/gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.html +++ b/gemfeed/2024-04-01-KISS-high-availability-with-OpenBSD.html @@ -8,7 +8,7 @@ -

    KISS high-availability with OpenBSD


    +

    KISS high-availability with OpenBSD



    Published at 2024-03-30T22:12:56+02:00

    @@ -38,18 +38,20 @@ _____|_:_:_| (o)-(o) |_:_:_|--'`-. ,--. ksh under-water (((\'/
    -Table of contents:
    -    KISS high-availability with OpenBSD
    -        My auto-failover requirements
    -        My HA solution
    -            Only OpenBSD base installation required
    -            Fairly cheap and geo-redundant
    -            Failover time and split-brain
    -            Failover support for multiple protocols
    -            Let's encrypt TLS certificates
    -            Monitoring
    -            Rex automation
    -        More HA
    +Table of contents
    +=================
    +
    +KISS high-availability with OpenBSD
    +    My auto-failover requirements
    +    My HA solution
    +        Only OpenBSD base installation required
    +        Fairly cheap and geo-redundant
    +        Failover time and split-brain
    +        Failover support for multiple protocols
    +        Let's encrypt TLS certificates
    +        Monitoring
    +        Rex automation
    +    More HA
     

    I have always wanted a highly available setup for my personal websites. I could have used off-the-shelf hosting solutions or hosted my sites in an AWS S3 bucket. I have used technologies like (in unsorted and slightly unrelated order) BGP, LVS/IPVS, ldirectord, Pacemaker, STONITH, scripted VIP failover via ARP, heartbeat, heartbeat2, Corosync, keepalived, DRBD, and commercial F5 Load Balancers for high availability at work.
    @@ -60,7 +62,7 @@ Table of contents:
    PS: ASCII-art reflects an OpenBSD under-water world with all the tools available in the base system.

    -

    My auto-failover requirements


    +

    My auto-failover requirements



    • Be OpenBSD-based (I prefer OpenBSD because of the cleanliness and good documentation) and rely on as few external packages as possible.
    • @@ -73,9 +75,9 @@ Table of contents:
    • Have good monitoring in place so I know when a failover was performed and when something went wrong with the failover.
    • Don't configure everything manually. The configuration should be automated and reproducible.

    -

    My HA solution


    +

    My HA solution



    -

    Only OpenBSD base installation required


    +

    Only OpenBSD base installation required



    My HA solution for Web and Gemini is based on DNS (OpenBSD's nsd) and a simple shell script (OpenBSD's ksh and some little sed and awk and grep). All software used here is part of the OpenBSD base system and no external package needs to be installed - OpenBSD is a complete operating system.

    @@ -231,7 +233,7 @@ echo "Failover of zone $zone to $MASTER completed"
    dns-failover.ksh

    -

    Fairly cheap and geo-redundant


    +

    Fairly cheap and geo-redundant



    I am renting two small OpenBSD VMs: One at OpenBSD Amsterdam and the other at Hetzner Cloud. So, both VMs are hosted at another provider, in different IP subnets, and in different countries (the Netherlands and Germany).

    @@ -242,13 +244,13 @@ echo "Failover of zone $zone to $MASTER completed"
    A DNS-based failover is cheap, as there isn't any BGP or fancy load balancer to pay for. Small VMs also cost less than millions.

    -

    Failover time and split-brain


    +

    Failover time and split-brain



    A DNS failover doesn't happen immediately. I've configured a DNS TTL of 300 seconds, and the failover script checks once per minute whether to perform a failover or not. So, in total, a failover can take six minutes (not including other DNS caching servers somewhere in the interweb, but that's fine - eventually, all requests will resolve to the new master after a failover).

    A split-brain scenario between the old master and the new master might happen. That's OK, as my sites are static, and there's no database to synchronise other than HTML, CSS, and images when the site is updated.

    -

    Failover support for multiple protocols


    +

    Failover support for multiple protocols



    With the DNS failover, HTTP, HTTPS, and Gemini protocols are failovered. This works because all domain virtual hosts are configured on either VM's httpd (OpenBSD's HTTP server) and relayd (it's also part of OpenBSD and I use it to TLS offload the Gemini protocol). So, both VMs accept requests for all the hosts. It's just a matter of the DNS entries, which VM receives the requests.

    @@ -259,7 +261,7 @@ echo "Failover of zone $zone to $MASTER completed"
    On DNS failover, master and standby swap roles without config changes other than the DNS entries. That's KISS (keep it simple and stupid)!

    -

    Let's encrypt TLS certificates


    +

    Let's encrypt TLS certificates



    All my hosts use TLS certificates from Let's Encrypt. The ACME automation for requesting and keeping the certificates valid (up to date) requires that the host requesting a certificate from Let's Encrypt is also the host using that certificate.

    @@ -296,7 +298,7 @@ http://www.gnu.org/software/src-highlite --> https://man.OpenBSD.org/acme-client.1
    Let's Encrypt with OpenBSD and Rex

    -

    Monitoring


    +

    Monitoring



    CRON is sending me an E-Mail whenever a failover is performed (or whenever a failover failed). Furthermore, I am monitoring my DNS servers and hosts through Gogios, the monitoring system I have developed.

    @@ -305,7 +307,7 @@ http://www.gnu.org/software/src-highlite -->
    Gogios, as I developed it by myself, isn't part of the OpenBSD base system.

    -

    Rex automation


    +

    Rex automation



    I use Rexify, a friendly configuration management system that allows automatic deployment and configuration.

    @@ -314,7 +316,7 @@ http://www.gnu.org/software/src-highlite -->
    Rex isn't part of the OpenBSD base system, but I didn't need to install any external software on OpenBSD either as Rex is invoked from my Laptop!

    -

    More HA


    +

    More HA



    Other high-available services running on my OpenBSD VMs are my MTAs for mail forwarding (OpenSMTPD - also part of the OpenBSD base system) and the authoritative DNS servers (nsd) for all my domains. No particular HA setup is required, though, as the protocols (SMTP and DNS) already take care of the failover to the next available host!

    diff --git a/gemfeed/2024-05-01-slow-productivity-book-notes.html b/gemfeed/2024-05-01-slow-productivity-book-notes.html index c66494e5..d2e64ad0 100644 --- a/gemfeed/2024-05-01-slow-productivity-book-notes.html +++ b/gemfeed/2024-05-01-slow-productivity-book-notes.html @@ -8,7 +8,7 @@ -

    "Slow Productivity" book notes


    +

    "Slow Productivity" book notes



    Published at 2024-04-27T14:18:51+03:00

    @@ -32,7 +32,7 @@
    "Slow productivity" does not mean being less productive. Cal Newport wants to point out that you can be much more productive with "slow productivity" than you would be without it. It is a different way of working than most of us are used to in the modern workplace, which is hyper-connected and always online.

    -

    Pseudo-productivity and Shallow work


    +

    Pseudo-productivity and Shallow work



    People use visible activity instead of real productivity because it's easier to measure. This is called pseudo-productivity.
    Pseudo-productivity is used as a proxy for real productivity. If you don't look busy, you are dismissed as lazy or lacking a work ethic.
    @@ -41,7 +41,7 @@
    Shallow work usually doesn't help you to accomplish big things. Always have the big picture in mind. Shallow work can't be entirely eliminated, but it can be managed—for example, plan dedicated time slots for certain types of shallow work.

    -

    Accomplishments without burnout


    +

    Accomplishments without burnout



    The overall perception is that if you want to accomplish something, you must put yourself on the verge of burnout. Cal Newport writes about "The lost Art of Accomplishments without Burnouts", where you can accomplish big things without all the stress usually involved.

    @@ -52,7 +52,7 @@
  • Work at a natural pace
  • Obsess over quality

  • -

    Do fewer things


    +

    Do fewer things



    There will always be more work. The faster you finish it, the quicker you will have something new on your plate.

    @@ -86,7 +86,7 @@
    Put tasks on autopilot (regular recurring tasks).

    -

    Work at a natural pace


    +

    Work at a natural pace



    We suffer from overambitious timelines, task lists, and business. Focus on what matters. Don't rush your most important work to achieve better results.

    @@ -102,7 +102,7 @@
    Schedule slow seasons (e.g., when on vacation). Disconnect in the slow season. Doing nothing will not satisfy your mind, though. You could read a book on your subject matter to counteract that.

    -

    Obsess over quality


    +

    Obsess over quality



    Obsess over quality even if you lose short-term opportunities by rejecting other projects. Quality demands you slow down. The two previous two principles (do fewer things and work at a natural pace) are mandatory for this principle to work:

    diff --git a/gemfeed/DRAFT-KISS-high-availability-with-OpenBSD.html b/gemfeed/DRAFT-KISS-high-availability-with-OpenBSD.html index 4f7cddf8..857bcb0f 100644 --- a/gemfeed/DRAFT-KISS-high-availability-with-OpenBSD.html +++ b/gemfeed/DRAFT-KISS-high-availability-with-OpenBSD.html @@ -8,7 +8,7 @@ -

    KISS high-availability with OpenBSD


    +

    KISS high-availability with OpenBSD



     Art by Michael J. Penick (mod. by Paul B)
    @@ -43,7 +43,7 @@ _____|_:_:_|  (o)-(o)  |_:_:_|--'`-.     ,--. ksh under-water (((\'/
     
    PS: ASCII-art reflects the OpenBSD under-water world with all the tools available in the base system.

    -

    My auto-failover requirements


    +

    My auto-failover requirements



    • Be OpenBSD-based (I prefer OpenBSD because of the cleanliness and good documentation) and rely on as few external packages as possible.
    • @@ -56,9 +56,9 @@ _____|_:_:_| (o)-(o) |_:_:_|--'`-. ,--. ksh under-water (((\'/
    • Have good monitoring in place so I know when a failover was performed and when something went wrong with the failover.
    • Don't configure everything manually. The configuration should be automated and reproducible.

    -

    My HA solution


    +

    My HA solution



    -

    Only OpenBSD base installation required


    +

    Only OpenBSD base installation required



    My HA solution for Web and Gemini is based on DNS (OpenBSD's nsd) and a simple shell script (OpenBSD's ksh and some little sed and awk and grep). All software used here is part of the OpenBSD base system and no external package needs to be installed - OpenBSD is a complete operating system.

    @@ -212,7 +212,7 @@ echo "Failover of zone $zone to $MASTER completed"
    https://codeberg.org/snonux/rexfiles/src/branch/master/frontends/scripts/dns-failover.ksh

    -

    Fairly cheap and geo-redundant


    +

    Fairly cheap and geo-redundant



    I am renting two small OpenBSD VMs: One at OpenBSD Amsterdam and the other at Hetzner Cloud. So, both VMs are hosted at another provider, in different IP subnets, and in different countries (the Netherlands and Germany).

    @@ -223,13 +223,13 @@ echo "Failover of zone $zone to $MASTER completed"
    A DNS-based failover is cheap, as there isn't any BGP or fancy load balancer to pay for. Small VMs also cost less than millions.

    -

    Failover time and split-brain


    +

    Failover time and split-brain



    A DNS failover doesn't happen immediately. I've configured a DNS TTL of 300 seconds, and the failover script checks once per minute whether to perform a failover or not. So, in total, a failover can take six minutes (not including other DNS caching servers somewhere in the interweb, but that's fine - eventually, all requests will resolve to the new master after a failover).

    A split-brain scenario between the old master and the new master might happen. That's OK, as my sites are static, and there's no database to synchronise other than HTML, CSS, and images when the site is updated.

    -

    Failover support for multiple protocols


    +

    Failover support for multiple protocols



    With the DNS failover, HTTP, HTTPS, and Gemini protocols are failovered. This works because all domain virtual hosts are configured on either VM's httpd (OpenBSD's HTTP server) and relayd (it's also part of OpenBSD and I use it to TLS offload the Gemini protocol). So, both VMs accept requests for all the hosts. It's just a matter of the DNS entry, which hosts receive the requests.

    @@ -240,7 +240,7 @@ echo "Failover of zone $zone to $MASTER completed"
    On DNS failover, master and standby swap roles without config changes other than the DNS entries. That's KISS (keep it simple and stupid)!

    -

    Let's encrypt TLS certificates


    +

    Let's encrypt TLS certificates



    All my hosts use TLS certificates from Let's Encrypt. The ACME automation for requesting and keeping the certificates valid (up to date) requires that the host requesting a certificate from Let's Encrypt is also the host using that certificate.

    @@ -277,21 +277,21 @@ http://www.gnu.org/software/src-highlite --> https://man.openbsd.org/acme-client.1
    Let's Encrypt with OpenBSD and Rex

    -

    Monitoring


    +

    Monitoring



    CRON is sending me an E-Mail whenever a failover is performed (or whenever a failover failed). Furthermore, I am monitoring my DNS servers and hosts through Gogios, the monitoring system I have developed.

    https://codeberg.org/snonux/gogios
    KISS server monitoring with Gogios

    -

    Rex automation


    +

    Rex automation



    I use Rexify, a friendly configuration management system that allows automatic deployment and configuration.

    https://www.rexify.org
    https://codeberg.org/snonux/rexfiles/src/branch/master/frontends

    -

    More HA


    +

    More HA



    Other high-available services running on my OpenBSD VMs are my MTAs for mail forwarding (OpenSMTPD) and the authoritative DNS servers (nsd) for all my domains. No particular HA setup is required, though, as the protocols (SMTP and DNS) already take care of the failover to the next available host!

    diff --git a/gemfeed/DRAFT-site-reliability-engineering.html b/gemfeed/DRAFT-site-reliability-engineering.html index a80b0e81..dd1b42fd 100644 --- a/gemfeed/DRAFT-site-reliability-engineering.html +++ b/gemfeed/DRAFT-site-reliability-engineering.html @@ -8,7 +8,7 @@ -

    System Design and Incident Analysis: Building Resilience in the SRE Landscape


    +

    System Design and Incident Analysis: Building Resilience in the SRE Landscape



    A significant portion of the work revolves around system design and incident analysis.

    @@ -28,7 +28,7 @@
    6 minutes to wt.

    -

    The Heroic Facade and Team Dynamics: Rethinking Success in SRE


    +

    The Heroic Facade and Team Dynamics: Rethinking Success in SRE



    The realm of Site Reliability Engineering is punctuated by the constant ebb and flow of system challenges. While individual excellence is commendable, the overarching belief in the SRE culture should be that true success lies in cohesive teamwork and not in individual heroics.

    @@ -79,7 +79,7 @@
    To conclude, while the heroics in SRE can often be the stuff of legends, it's vital to see beyond this facade. The countless hours of teamwork, collaboration, and shared responsibility lie in the shadows of these heroic acts. The future of SRE lies not in individual heroics but in teams that operate like well-oiled machines, with every cog, big or small, playing its part to perfection.

    -

    Monitoring, Observability, and the SRE Arsenal: Navigating the Nuances of System Reliability


    +

    Monitoring, Observability, and the SRE Arsenal: Navigating the Nuances of System Reliability



    Site Reliability Engineering is characterised by a relentless quest for reliability, uptime, and seamless user experiences. Within this universe, the notions of monitoring and observability emerge not as mere tools but as critical lifelines that guide decision-making, error diagnosis, and preventive strategies.

    @@ -93,7 +93,7 @@
    To sum it up, monitoring and observability play pivotal roles in the intricate dance of system reliability. They are the compass and map, guiding SREs through the labyrinthine challenges of modern systems. By leveraging them effectively and in conjunction with other SRE methodologies, organisations can achieve the zenith of reliability, ensuring that their services remain robust, resilient, and remarkably user-centric.

    -

    The Ever-evolving Landscape of SRE


    +

    The Ever-evolving Landscape of SRE



    To begin, the very fabric of SRE is interwoven with organisational culture. Successful SRE adoption transcends the mere automation of software operations—it is deeply cultural. It demands a seismic shift in how organisations perceive failures, value preventative work, and prioritise communication. In such an environment, writing is not just a skill but a critical tool for reliability. Precise communication enhances clarity, mitigates risks, and facilitates collaboration.

    @@ -105,7 +105,7 @@
    In conclusion, as a discipline, SRE is a beacon of continuous evolution. As systems grow more complex and user expectations rise, the SRE landscape will inevitably shift, demanding adaptability, resilience, and foresight from its practitioners. But in this ever-changing terrain, the core tenets remain—balancing innovation with reliability, valuing human well-being, and leveraging tools and data for informed decision-making. In the grand tapestry of engineering, SRE stands out as a dynamic, challenging, yet immensely rewarding realm, ever-responsive to the rhythms of technology and human ingenuity.

    -

    Effective Communication and Collaboration in SRE


    +

    Effective Communication and Collaboration in SRE



    Site Reliability Engineering is not merely a technical discipline. At its core, SRE underscores the importance of effective communication and collaboration as critical tenets of a resilient and efficient system.

    @@ -121,7 +121,7 @@
    In conclusion, while SRE is deeply technical, its efficacy is intertwined with the soft skills of communication and collaboration. As systems grow more intricate and the stakes rise, the ability to communicate clearly and collaborate effectively will distinguish successful SRE teams from the rest. It's a reminder that there are people at the heart of every machine, every line of code, and nurturing human connections is paramount to ensuring machine efficiency.

    -

    Inherent Curiosity and Continual Learning in SRE


    +

    Inherent Curiosity and Continual Learning in SRE



    The realm of Site Reliability Engineering is expansive, dynamic, and deeply integrated with the ever-evolving technological landscape. It's evident that an essential trait underpinning successful SRE practice combines inherent curiosity and an unwavering commitment to continual learning.

    @@ -135,7 +135,7 @@
    In conclusion, the world of Site Reliability Engineering is not for the complacent. It's a domain that rewards the curious, the seekers, and those with an insatiable appetite for knowledge. As systems grow in complexity and the stakes become higher, this inherent curiosity and dedication to continual learning will define the success and resilience of SRE endeavours. The journey of an SRE, thus, is one of perpetual exploration, driven by the quest to know more and do better.

    -

    The Iterative Spirit of SRE


    +

    The Iterative Spirit of SRE



    Site Reliability Engineering is more than just a technical discipline; it embodies a mindset that embraces iteration, proactive problem-solving, and continuous enhancement.

    @@ -149,9 +149,9 @@
    In summary, the essence of Site Reliability Engineering is characterised by an iterative spirit, a recognition that perfection is a journey, not a destination. Whether refining system designs, enhancing tooling or fostering collaborative dialogues, SREs are always looking for the next improvement, refinement, and iteration. It's this spirit that ensures systems are reliable and continually evolving to meet the ever-changing demands of the digital age.

    -

    The role of simplicity Simplicity


    +

    The role of simplicity Simplicity



    -

    Book tips


    +

    Book tips



    • 97 Things Every SRE Should Know: Collective Wisdom from the Experts by Emily Stolarsky and Jaime Woo
    • diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml index c0800695..db3da343 100644 --- a/gemfeed/atom.xml +++ b/gemfeed/atom.xml @@ -1,6 +1,6 @@ - 2024-04-27T21:58:16+03:00 + 2024-04-30T13:13:33+03:00 foo.zone feed To be in the .zone! @@ -18,7 +18,7 @@ These are my personal takeaways after reading 'Slow Productivity - The lost Art of Accomplishment Without Burnout' by Cal Newport.
      -

      "Slow Productivity" book notes


      +

      "Slow Productivity" book notes



      Published at 2024-04-27T14:18:51+03:00

      @@ -42,7 +42,7 @@
      "Slow productivity" does not mean being less productive. Cal Newport wants to point out that you can be much more productive with "slow productivity" than you would be without it. It is a different way of working than most of us are used to in the modern workplace, which is hyper-connected and always online.

      -

      Pseudo-productivity and Shallow work


      +

      Pseudo-productivity and Shallow work



      People use visible activity instead of real productivity because it's easier to measure. This is called pseudo-productivity.
      Pseudo-productivity is used as a proxy for real productivity. If you don't look busy, you are dismissed as lazy or lacking a work ethic.
      @@ -51,7 +51,7 @@
      Shallow work usually doesn't help you to accomplish big things. Always have the big picture in mind. Shallow work can't be entirely eliminated, but it can be managed—for example, plan dedicated time slots for certain types of shallow work.

      -

      Accomplishments without burnout


      +

      Accomplishments without burnout



      The overall perception is that if you want to accomplish something, you must put yourself on the verge of burnout. Cal Newport writes about "The lost Art of Accomplishments without Burnouts", where you can accomplish big things without all the stress usually involved.

      @@ -62,7 +62,7 @@
    • Work at a natural pace
    • Obsess over quality

    -

    Do fewer things


    +

    Do fewer things



    There will always be more work. The faster you finish it, the quicker you will have something new on your plate.

    @@ -96,7 +96,7 @@
    Put tasks on autopilot (regular recurring tasks).

    -

    Work at a natural pace


    +

    Work at a natural pace



    We suffer from overambitious timelines, task lists, and business. Focus on what matters. Don't rush your most important work to achieve better results.

    @@ -112,7 +112,7 @@
    Schedule slow seasons (e.g., when on vacation). Disconnect in the slow season. Doing nothing will not satisfy your mind, though. You could read a book on your subject matter to counteract that.

    -

    Obsess over quality


    +

    Obsess over quality



    Obsess over quality even if you lose short-term opportunities by rejecting other projects. Quality demands you slow down. The two previous two principles (do fewer things and work at a natural pace) are mandatory for this principle to work:

    @@ -175,7 +175,7 @@ Art by Michael J. Penick (mod. by Paul B.)
    -

    KISS high-availability with OpenBSD


    +

    KISS high-availability with OpenBSD



    Published at 2024-03-30T22:12:56+02:00

    @@ -205,18 +205,20 @@ _____|_:_:_| (o)-(o) |_:_:_|--'`-. ,--. ksh under-water (((\'/

    -Table of contents:
    -    KISS high-availability with OpenBSD
    -        My auto-failover requirements
    -        My HA solution
    -            Only OpenBSD base installation required
    -            Fairly cheap and geo-redundant
    -            Failover time and split-brain
    -            Failover support for multiple protocols
    -            Let's encrypt TLS certificates
    -            Monitoring
    -            Rex automation
    -        More HA
    +Table of contents
    +=================
    +
    +KISS high-availability with OpenBSD
    +    My auto-failover requirements
    +    My HA solution
    +        Only OpenBSD base installation required
    +        Fairly cheap and geo-redundant
    +        Failover time and split-brain
    +        Failover support for multiple protocols
    +        Let's encrypt TLS certificates
    +        Monitoring
    +        Rex automation
    +    More HA
     

    I have always wanted a highly available setup for my personal websites. I could have used off-the-shelf hosting solutions or hosted my sites in an AWS S3 bucket. I have used technologies like (in unsorted and slightly unrelated order) BGP, LVS/IPVS, ldirectord, Pacemaker, STONITH, scripted VIP failover via ARP, heartbeat, heartbeat2, Corosync, keepalived, DRBD, and commercial F5 Load Balancers for high availability at work.
    @@ -227,7 +229,7 @@ Table of contents:
    PS: ASCII-art reflects an OpenBSD under-water world with all the tools available in the base system.

    -

    My auto-failover requirements


    +

    My auto-failover requirements



    • Be OpenBSD-based (I prefer OpenBSD because of the cleanliness and good documentation) and rely on as few external packages as possible.
    • @@ -240,9 +242,9 @@ Table of contents:
    • Have good monitoring in place so I know when a failover was performed and when something went wrong with the failover.
    • Don't configure everything manually. The configuration should be automated and reproducible.

    -

    My HA solution


    +

    My HA solution



    -

    Only OpenBSD base installation required


    +

    Only OpenBSD base installation required



    My HA solution for Web and Gemini is based on DNS (OpenBSD's nsd) and a simple shell script (OpenBSD's ksh and some little sed and awk and grep). All software used here is part of the OpenBSD base system and no external package needs to be installed - OpenBSD is a complete operating system.

    @@ -398,7 +400,7 @@ echo "Failover of zone $zone to $MASTER completed"
    dns-failover.ksh

    -

    Fairly cheap and geo-redundant


    +

    Fairly cheap and geo-redundant



    I am renting two small OpenBSD VMs: One at OpenBSD Amsterdam and the other at Hetzner Cloud. So, both VMs are hosted at another provider, in different IP subnets, and in different countries (the Netherlands and Germany).

    @@ -409,13 +411,13 @@ echo "Failover of zone $zone to $MASTER completed"
    A DNS-based failover is cheap, as there isn't any BGP or fancy load balancer to pay for. Small VMs also cost less than millions.

    -

    Failover time and split-brain


    +

    Failover time and split-brain



    A DNS failover doesn't happen immediately. I've configured a DNS TTL of 300 seconds, and the failover script checks once per minute whether to perform a failover or not. So, in total, a failover can take six minutes (not including other DNS caching servers somewhere in the interweb, but that's fine - eventually, all requests will resolve to the new master after a failover).

    A split-brain scenario between the old master and the new master might happen. That's OK, as my sites are static, and there's no database to synchronise other than HTML, CSS, and images when the site is updated.

    -

    Failover support for multiple protocols


    +

    Failover support for multiple protocols



    With the DNS failover, HTTP, HTTPS, and Gemini protocols are failovered. This works because all domain virtual hosts are configured on either VM's httpd (OpenBSD's HTTP server) and relayd (it's also part of OpenBSD and I use it to TLS offload the Gemini protocol). So, both VMs accept requests for all the hosts. It's just a matter of the DNS entries, which VM receives the requests.

    @@ -426,7 +428,7 @@ echo "Failover of zone $zone to $MASTER completed"
    On DNS failover, master and standby swap roles without config changes other than the DNS entries. That's KISS (keep it simple and stupid)!

    -

    Let's encrypt TLS certificates


    +

    Let's encrypt TLS certificates



    All my hosts use TLS certificates from Let's Encrypt. The ACME automation for requesting and keeping the certificates valid (up to date) requires that the host requesting a certificate from Let's Encrypt is also the host using that certificate.

    @@ -463,7 +465,7 @@ http://www.gnu.org/software/src-highlite --> https://man.OpenBSD.org/acme-client.1
    Let's Encrypt with OpenBSD and Rex

    -

    Monitoring


    +

    Monitoring



    CRON is sending me an E-Mail whenever a failover is performed (or whenever a failover failed). Furthermore, I am monitoring my DNS servers and hosts through Gogios, the monitoring system I have developed.

    @@ -472,7 +474,7 @@ http://www.gnu.org/software/src-highlite -->
    Gogios, as I developed it by myself, isn't part of the OpenBSD base system.

    -

    Rex automation


    +

    Rex automation



    I use Rexify, a friendly configuration management system that allows automatic deployment and configuration.

    @@ -481,7 +483,7 @@ http://www.gnu.org/software/src-highlite -->
    Rex isn't part of the OpenBSD base system, but I didn't need to install any external software on OpenBSD either as Rex is invoked from my Laptop!

    -

    More HA


    +

    More HA



    Other high-available services running on my OpenBSD VMs are my MTAs for mail forwarding (OpenSMTPD - also part of the OpenBSD base system) and the authoritative DNS servers (nsd) for all my domains. No particular HA setup is required, though, as the protocols (SMTP and DNS) already take care of the failover to the next available host!

    @@ -519,7 +521,7 @@ http://www.gnu.org/software/src-highlite --> I am an ideas person. I find myself frequently somewhere on the streets with an idea in my head but no paper journal noting it down.
    -

    A fine Fyne Android app for quickly logging ideas programmed in Go


    +

    A fine Fyne Android app for quickly logging ideas programmed in Go



    Published at 2024-03-03T00:07:21+02:00

    @@ -551,7 +553,7 @@ http://www.gnu.org/software/src-highlite -->
    My Android apps will never be polished, but they will get the job done, and this is precisely how I want them to be. Minimalistic but functional. I could spend more time polishing Quick logger, but my Quick logger app then may be the same as any other notes app out there (complicated or bloated).

    -

    All easy-peasy?


    +

    All easy-peasy?



    I did have some issues with the app logo for Android, though. Android always showed the default app icon and not my custom icon whenever I used a custom AndroidManifest.xml for custom app storage permissions. Without a custom AndroidAmnifest.xml the app icon would be displayed under Android, but then the app would not have the MANAGE_EXTERNAL_STORAGE permission, which is required for Quick logger to write to a custom directory. I found a workaround, which I commented on here at Github:

    @@ -768,7 +770,7 @@ http://www.gnu.org/software/src-highlite --> HKISSFISHKISSFISHKISSFISHKISSFISH KISS
    -

    One reason why I love OpenBSD


    +

    One reason why I love OpenBSD



    Published at 2024-01-13T22:55:33+02:00

    @@ -849,7 +851,7 @@ $ doas reboot # Just in case, reboot one more timeThis is the third part of my Site Reliability Engineering (SRE) series. I am currently employed as a Site Reliability Engineer and will try to share what SRE is about in this blog series.
    -

    Site Reliability Engineering - Part 3: On-Call Culture and the Human Aspect


    +

    Site Reliability Engineering - Part 3: On-Call Culture and the Human Aspect



    Published at 2024-01-09T18:35:48+02:00

    @@ -885,7 +887,7 @@ $ doas reboot # Just in case, reboot one more time
    -

    On-Call Culture and the Human Aspect: Prioritising Well-being in the Realm of Reliability


    +

    On-Call Culture and the Human Aspect: Prioritising Well-being in the Realm of Reliability



    Site Reliability Engineering is synonymous with ensuring system reliability, but the human factor is an often-underestimated part of this discipline. Ensuring an healthy on-call culture is as critical as any technical solution. The well-being of the engineers is an important factor.

    @@ -921,7 +923,7 @@ $ doas reboot # Just in case, reboot one more timeThis is the third blog post about my Bash Golf series. This series is random Bash tips, tricks, and weirdnesses I have encountered over time.
    -

    Bash Golf Part 3


    +

    Bash Golf Part 3



    Published at 2023-12-10T11:35:54+02:00

    @@ -942,7 +944,7 @@ jgs^^^^^^^`^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2022-01-01 Bash Golf Part 2
    2023-12-10 Bash Golf Part 3 (You are currently reading this)

    -

    FUNCNAME


    +

    FUNCNAME



    FUNCNAME is an array you are looking for a way to dynamically determine the name of the current function (which could be considered the callee in the context of its own execution), you can use the special variable FUNCNAME. This is an array variable that contains the names of all shell functions currently in the execution call stack. The element FUNCNAME[0] holds the name of the currently executing function, FUNCNAME[1] the name of the function that called that, and so on.

    @@ -982,7 +984,7 @@ http://www.gnu.org/software/src-highlite --> INFO|20231210-082732|123002|at_home_friday_evening|One Peperoni Pizza, please
    -

    :(){ :|:& };:


    +

    :(){ :|:& };:



    This one may be widely known already, but I am including it here as I found a cute image illustrating it. But to break :(){ :|:& };: down:

    @@ -1005,7 +1007,7 @@ INFO|20231210- Bash fork bomb

    -

    Inner functions


    +

    Inner functions



    Bash defines variables as it is interpreting the code. The same applies to function declarations. Let's consider this code:

    @@ -1074,7 +1076,7 @@ Wintel inside! Wintel inside!
    -

    Exporting functions


    +

    Exporting functions



    Have you ever wondered how to execute a shell function in parallel through xargs? The problem is that this won't work:

    @@ -1164,7 +1166,7 @@ http://www.gnu.org/software/src-highlite -->
    ... because some_other_function isn't exported! You will also need to add an export -f some_other_function!

    -

    Dynamic variables with local


    +

    Dynamic variables with local



    You may know that local is how to declare local variables in a function. Most don't know that those variables actually have dynamic scope. Let's consider the following example:

    @@ -1204,7 +1206,7 @@ foo What happened? The variable foo (declared with local) is available in the function it was declared in and in all other functions down the call stack! We can even modify the value of foo, and the change will be visible up the call stack. It's not a global variable; on the last line, echo "$foo" echoes the global variable content.


    -

    if conditionals


    +

    if conditionals



    Consider all variants here more or less equivalent:

    @@ -1255,7 +1257,7 @@ ok4a ok4b
    -

    Multi-line comments


    +

    Multi-line comments



    You all know how to comment. Put a # in front of it. You could use multiple single-line comments or abuse heredocs and redirect it to the : no-op command to emulate multi-line comments.

    @@ -1279,7 +1281,7 @@ COMMENT
    I will not demonstrate the execution of this script, as it won't print anything! It's obviously not the most pretty way of commenting on your code, but it could sometimes be handy!

    -

    Don't change it while it's executed


    +

    Don't change it while it's executed



    Consider this script:

    @@ -1338,7 +1340,7 @@ echo baz This is the second part of my Site Reliability Engineering (SRE) series. I am currently employed as a Site Reliability Engineer and will try to share what SRE is about in this blog series.
    -

    Site Reliability Engineering - Part 2: Operational Balance in SRE


    +

    Site Reliability Engineering - Part 2: Operational Balance in SRE



    Published at 2023-11-19T00:18:18+03:00

    @@ -1363,7 +1365,7 @@ echo baz ⠀⠀⠀⠀⠀⠀⠴⠶⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠿⠶⠦⠀⠀
    -

    Operational Balance in SRE: Finding the Equilibrium in Reliability and Velocity


    +

    Operational Balance in SRE: Finding the Equilibrium in Reliability and Velocity



    Site Reliability Engineering has established itself as more than just a set of best practices or methodologies. Instead, it stands as a beacon of operational excellence, which guides engineering teams through the turbulent waters of modern software development and system management.

    @@ -1403,7 +1405,7 @@ echo baz These are my personal takeaways after reading 'Mind Management' by David Kadavy. Note that the book contains much more knowledge wisdom and that these notes only contain points I personally found worth writing down. This is mainly for my own use, but you might find it helpful too.
    -

    "Mind Management" book notes


    +

    "Mind Management" book notes



    Published at 2023-11-11T22:21:47+02:00

    @@ -1427,11 +1429,11 @@ echo baz
  • The point of diminishing returns
  • The point of negative return

  • -

    Empty slots in the calendar


    +

    Empty slots in the calendar



    If we do more things in less time and use all possible slots, speed read, etc., we are more productive. But in reality, that's not the entire truth. You also exchange one thing against everything else.... You cut out too much from your actual life.

    -

    When you safe time...


    +

    When you safe time...



    ...keep it.

    @@ -1440,7 +1442,7 @@ echo baz
  • Creative thinking needs space. It will pay dividends tomorrow.
  • You will be rewarded with the "Eureka effect" - a sudden new insight.

  • -

    Follow your mood


    +

    Follow your mood



    Ask yourself: what is my mood now? We never have the energy to do anything, so the better strategy is to follow your current mode and energy. E.g.:

    @@ -1448,7 +1450,7 @@ echo baz
  • Didn't sleep enough today? Then, do simple, non-demanding tasks at work
  • Had a great sleep, and there is even time before work starts? Pull in a workout...

  • -

    Boosting creativity


    +

    Boosting creativity



    The morning without coffee is a gift for creativity, but you often get distracted. Minimize distractions, too. I have no window to stare out but a plain blank wall.

    @@ -1458,7 +1460,7 @@ echo baz
  • Don't race with time but walk alongside it as rough time lines.
  • Don't judge every day after the harvest, but the seed you lay

  • -

    The right mood for the task at hand


    +

    The right mood for the task at hand



    We need to try many different combinations. Limiting ourselves and trying too hard makes us frustrated and burn out. Creativity requires many iterations.

    @@ -1472,7 +1474,7 @@ echo baz
    It gives you pleasure and is in a good mood. This increases creativity if you do what you want to do.

    -

    Creativity hacks


    +

    Creativity hacks



    • Coffee can cause anxiety.
    • @@ -1483,7 +1485,7 @@ echo baz
    • Go to open spaces for creativity.
    • Go to closed spaces for polishing.

    -

    Planning and strategizing


    +

    Planning and strategizing



    Minds work better in sprints and not in marathons. Have a weekly plan, not a daily one.

    @@ -1496,7 +1498,7 @@ echo baz
    You could schedule exploratory tasks when you are under grief. Sound systems should create slack for creativity. Plan only for a few minutes.

    -

    Fake it until you make it.


    +

    Fake it until you make it.



    • E.g. act calm if you want to be calm.
    • @@ -1531,7 +1533,7 @@ echo baz Once in a while, I share photos on the inter-web with either family and friends or on my The Irregular Ninja photo site. One hobby of mine is photography (even though I don't have enough time for it - so I am primarily a point-and-shoot photographer).
      -

      KISS static web photo albums with photoalbum.sh


      +

      KISS static web photo albums with photoalbum.sh



      Published at 2023-10-29T22:25:04+02:00

      @@ -1552,7 +1554,7 @@ echo baz '._____________________________________________.'
      -

      Motivation


      +

      Motivation



      Once in a while, I share photos on the inter-web with either family and friends or on my The Irregular Ninja photo site. One hobby of mine is photography (even though I don't have enough time for it - so I am primarily a point-and-shoot photographer).

      @@ -1560,11 +1562,11 @@ echo baz
      I value KISS (keep it simple and stupid) and simplicity. All that's required for a web photo album is some simple HTML and spice it up with CSS. No need for JavaScript, no need for a complex dynamic website.

      -

      Introducing photoalbum.sh


      +

      Introducing photoalbum.sh



      photoalbum.sh is a minimal Bash (Bourne Again Shell) script for Unix-like operating systems (such as Linux) to generate static web photo albums. The resulting static photo album is pure HTML+CSS (without any JavaScript!). It is specially designed to be as simple as possible.

      -

      Installation


      +

      Installation



      Installation is straightforward. All required is a recent version of GNU Bash, GNU Make, Git and ImageMagick. On Fedora, the dependencies are installed with:

      @@ -1607,7 +1609,7 @@ cp ./src/photoalbum.default.conf /etc/default/photoalbum This is Photoalbum Version 0.5.1
      -

      Setting it up


      +

      Setting it up



      Now, it's time to set up the Irregular Ninja static web photo album (or any other web photo album you may be setting up!)! Create a directory (here: irregular.ninja for the Irregular Ninja Photo site - or any oter sub-directory reflecting your album's name), and inside of that directory, create an incoming directory. The incoming directory. Copy all photos to be part of the album there.

      @@ -1720,7 +1722,7 @@ http://www.gnu.org/software/src-highlite -->
      So I changed the album title, adjusted some image and thumbnail dimensions, and I want all images to be randomly shuffled every time the album is generated! I also have all my photos in my Nextcloud Photo directory and don't want to copy them to the local incoming directory. Also, a tarball containing the whole album as a download isn't provided.

      -

      Generating the static photo album


      +

      Generating the static photo album



      Let's generate it. Depending on the image sizes and count, the following step may take a while.

      @@ -1783,15 +1785,15 @@ blurs html index.html photos thumbs
      PS: There's also a server-side synchronisation script mirroring the same content to another server for high availability reasons (out of scope for this blog post).

      -

      Cleaning it up


      +

      Cleaning it up



      A simple make clean will clean up the ./dist directory and all other (if any) temp files created.

      -

      HTML templates


      +

      HTML templates



      Poke around in this source directory. You will find a bunch of Bash-HTML template files. You could tweak them to your liking.

      -

      Conclusion


      +

      Conclusion



      A decent looking (in my opinion, at least) in less than 500 (273 as of this writing, to be precise) lines of Bash code and with minimal dependencies; what more do you want? How many LOCs would this be in Raku with the same functionality (can it be sub-100?).

      @@ -1829,7 +1831,7 @@ blurs html index.html photos thumbs Hey there. As I am pretty busy this month personally (I am now on Paternity Leave) and as I still want to post once monthly, the blog post of this month will only be some DTail usage examples. They're from the DTail documentation, but not all readers of my blog may be aware of those!
      -

      DTail usage examples


      +

      DTail usage examples



      Published at 2023-09-25T14:57:42+03:00

      @@ -1863,7 +1865,7 @@ blurs html index.html photos thumbs
    • Use dmap to aggregate logs and other text files already written
    • dserver is the DTail server, where all the clients can connect to

    -

    Following logs


    +

    Following logs



    The following example demonstrates how to follow logs of several servers at once. The server list is provided as a flat text file. The example filters all records containing the string INFO. Any other Go compatible regular expression can also be used instead of INFO.

    @@ -1887,7 +1889,7 @@ http://www.gnu.org/software/src-highlite -->
    % dtail --servers serverlist.txt --grep INFO "/var/log/dserver/*.log"
     

    -

    Aggregating logs


    +

    Aggregating logs



    To run ad-hoc map-reduce aggregations on newly written log lines you must add a query. The following example follows all remote log lines and prints out every few seconds the result to standard output.

    @@ -1944,7 +1946,7 @@ http://www.gnu.org/software/src-highlite --> --query 'from STATS select ... outfile append result.csv'
    -

    How to use dcat


    +

    How to use dcat



    The following example demonstrates how to cat files (display the full content of the files) on several servers at once.

    @@ -1968,7 +1970,7 @@ http://www.gnu.org/software/src-highlite -->
    % dcat --servers serverlist.txt /etc/hostname
     

    -

    How to use dgrep


    +

    How to use dgrep



    The following example demonstrates how to grep files (display only the lines which match a given regular expression) of multiple servers at once. In this example, we look after some entries in /etc/passwd. This time, we don't provide the server list via an file but rather via a comma separated list directly on the command line. We also explore the -before, -after and -max flags (see animation).

    @@ -1987,7 +1989,7 @@ http://www.gnu.org/software/src-highlite -->
    Hint: -regex is an alias for -grep.

    -

    How to use dmap


    +

    How to use dmap



    To run a map-reduce aggregation over logs written in the past, the dmap command can be used. The following example aggregates all map-reduce fields dmap will print interim results every few seconds. You can also write the result to an CSV file by adding outfile result.csv to the query.

    @@ -2005,7 +2007,7 @@ http://www.gnu.org/software/src-highlite -->
    DMap example

    -

    How to use the DTail serverless mode


    +

    How to use the DTail serverless mode



    Until now, all examples so far required to have remote server(s) to connect to. That makes sense, as after all DTail is a *distributed* tool. However, there are circumstances where you don't really need to connect to a server remotely. For example, you already have a login shell open to the server an all what you want is to run some queries directly on local log files.

    @@ -2013,7 +2015,7 @@ http://www.gnu.org/software/src-highlite -->
    All commands shown so far also work in a serverless mode. All what needs to be done is to omit a server list. The DTail client then starts in serverless mode.

    -

    Serverless map-reduce query


    +

    Serverless map-reduce query



    The following dmap example is the same as the previously shown one, but the difference is that it operates on a local log file directly:

    @@ -2048,7 +2050,7 @@ http://www.gnu.org/software/src-highlite --> lifetimeConnections group by $hostname order by max($cgocalls)'
    -

    Aggregating CSV files


    +

    Aggregating CSV files



    In essence, this works exactly like aggregating logs. All files operated on must be valid CSV files and the first line of the CSV must be the header. E.g.:

    @@ -2070,7 +2072,7 @@ Einstein,Albert
    DMap can also be used to query and aggregate CSV files from remote servers.

    -

    Other serverless commands


    +

    Other serverless commands



    The serverless mode works transparently with all other DTail commands. Here are some examples:

    @@ -2149,7 +2151,7 @@ http://www.gnu.org/software/src-highlite --> The universe of Site Reliability Engineering (SRE) is like an intricate tapestry woven with diverse technology, culture, and personal grit threads. Site Reliability Engineering is one of the most demanding jobs. With all the facets, it's impossible to get bored. There is always a new challenge to master, and there is always a new technology to tinker with. It's not just technical; it's also about communication, collaboration and teamwork. I am currently employed as a Site Reliability Engineer and will try to share what SRE is about in this blog series.
    -

    Site Reliability Engineering - Part 1: SRE and Organizational Culture


    +

    Site Reliability Engineering - Part 1: SRE and Organizational Culture



    Published at 2023-08-18T22:43:47+03:00

    @@ -2181,7 +2183,7 @@ DC on fire: ░░░░░░░░░░▒▒░░░░░░░░░░░░░░░░░░░░░░░░▒▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒░░░░░░░░░░░░░░░░░░
    -

    SRE and Organizational Culture: Navigating the Nexus


    +

    SRE and Organizational Culture: Navigating the Nexus



    At the heart of SRE lies the proactive mindset of "prevention over cure." Traditional IT models focused predominantly on reactive solutions, but SRE mandates a shift towards foresight. By adopting Service Level Indicators (SLIs) and Service Level Objectives (SLOs), teams are equipped with clear metrics and goals that guide them toward ensuring reliability and user satisfaction. They reflect an organisational culture prioritising user experience and constant system alignment with user needs.

    @@ -2223,7 +2225,7 @@ DC on fire: I proudly announce that I've released Gemtexter version `2.1.0`. What is Gemtexter? It's my minimalist static site generator for Gemini Gemtext, HTML and Markdown, written in GNU Bash.
    -

    Gemtexter 2.1.0 - Let's Gemtext again³


    +

    Gemtexter 2.1.0 - Let's Gemtext again³



    Published at 2023-07-21T10:19:31+03:00

    @@ -2244,17 +2246,17 @@ DC on fire:
    https://codeberg.org/snonux/gemtexter

    -

    Why Bash?


    +

    Why Bash?



    This project is too complex for a Bash script. Writing it in Bash was to try out how maintainable a "larger" Bash script could be. It's still pretty maintainable and helps me try new Bash tricks here and then!

    Let's list what's new!

    -

    Switch to GPL3 license


    +

    Switch to GPL3 license



    Many (almost all) of the tools and commands (GNU Bash, GMU Sed, GNU Date, GNU Grep, GNU Source Highlight) used by Gemtexter are licensed under the GPL anyway. So why not use the same? This was an easy switch, as I was the only code contributor so far!

    -

    Source code highlighting support


    +

    Source code highlighting support



    The HTML output now supports source code highlighting, which is pretty neat if your site is about programming. The requirement is to have the source-highlight command, which is GNU Source Highlight, to be installed. Once done, you can annotate a bare block with the language to be highlighted. E.g.:

    @@ -2279,11 +2281,11 @@ http://www.gnu.org/software/src-highlite -->
    Please run source-highlight --lang-list for a list of all supported languages.

    -

    HTML exact variant


    +

    HTML exact variant



    Gemtexter is there to convert your Gemini Capsule into other formats, such as HTML and Markdown. An HTML exact variant can now be enabled in the gemtexter.conf by adding the line declare -rx HTML_VARIANT=exact. The HTML/CSS output changed to reflect a more exact Gemtext appearance and to respect the same spacing as you would see in the Geminispace.

    -

    Use of Hack webfont by default


    +

    Use of Hack webfont by default



    The Hack web font is a typeface designed explicitly for source code. It's a derivative of the Bitstream Vera and DejaVu Mono lineage, but it features many improvements and refinements that make it better suited to reading and writing code.

    @@ -2291,7 +2293,7 @@ http://www.gnu.org/software/src-highlite -->
    Hack is open-source and freely available for use and modification under the MIT License.

    -

    HTML Mastodon verification support


    +

    HTML Mastodon verification support



    The following link explains how URL verification works in Mastodon:

    @@ -2321,7 +2323,7 @@ http://www.gnu.org/software/src-highlite -->
    <a href='https://fosstodon.org/@snonux' rel='me'>Me at Mastodon</a>
     

    -

    More


    +

    More



    Additionally, there were a couple of bug fixes, refactorings and overall improvements in the documentation made.

    @@ -2351,7 +2353,7 @@ http://www.gnu.org/software/src-highlite --> These notes are of two books by 'John Sommez' I found helpful. I also added some of my own keypoints to it. These notes are mainly for my own use, but you might find them helpful, too.
    -

    "Software Developmers Career Guide and Soft Skills" book notes


    +

    "Software Developmers Career Guide and Soft Skills" book notes



    Published at 2023-07-17T04:56:20+03:00

    @@ -2369,9 +2371,9 @@ http://www.gnu.org/software/src-highlite --> '''
    -

    Improve


    +

    Improve



    -

    Always learn new things


    +

    Always learn new things



    When you learn something new, e.g. a programming language, first gather an overview, learn from multiple sources, play around and learn by doing and not consuming and form your own questions. Don't read too much upfront. A large amount of time is spent in learning technical skills which were never use. You want to have a practical set of skills you are actually using. You need to know 20 percent to get out 80 percent of the results.

    @@ -2389,11 +2391,11 @@ http://www.gnu.org/software/src-highlite -->
    Boot camps: The advantage of a boot camp is to pragmatically learn things fast. We almost always overestimate what we can do in a day. Especially during boot camps. Connect to others during the boot camps

    -

    Set goals


    +

    Set goals



    Your own goals are important but the manager also looks at how the team performs and how someone can help the team perform better. Check whether you are on track with your goals every 2 weeks in order to avoid surprises for the annual review. Make concrete goals for next review. Track and document your progress. Invest in your education. Make your goals known. If you want something, then ask for it. Nobody but you knows what you want.

    -

    Ratings


    +

    Ratings



    That's a trap: If you have to rate yourself, that's a trap. That never works in an unbiased way. Rate yourself always the best way but rate your weakest part as high as possible minus one point. Rate yourself as good as you can otherwise. Nobody is putting for fun a gun on his own head.

    @@ -2401,7 +2403,7 @@ http://www.gnu.org/software/src-highlite -->
  • Don't do peer rating, it can fire back on you. What if the colleague becomes your new boss?
  • Cooperate rankings are unfortunately HR guidelines and politics and only mirror a little your actual performance.

  • -

    Promotions


    +

    Promotions



    The most valuable employees are the ones who make themselves obsolete and automate all away. Keep a safety net of 3 to 6 months of finances. Safe at least 10 percent of your earnings. Also, if you make money it does not mean that you have to spent more money. Is a new car better than a used car which both can bring you from A to B? Liability vs assets.

    @@ -2414,7 +2416,7 @@ http://www.gnu.org/software/src-highlite -->
  • If you want a raise be specific how much and know to back your demands. Don't make a thread and no ultimatums.
  • Best way for a promotion is to switch jobs. You can even switch back with a better salary.

  • -

    Finish things


    +

    Finish things



    Hard work is necessary for accomplish results. However, work smarter not harder. Furthermore, working smart is not a substitute for working hard. Work both, hard and smart.

    @@ -2429,7 +2431,7 @@ http://www.gnu.org/software/src-highlite -->
    Defeat is finally give up. Failure is the road to success, embrace it. Failure does not define you but how you respond to it. Events don't make your unhappy, but how you react to events do.

    -

    Expand the empire


    +

    Expand the empire



    The larger your empire is, the larger your circle of influence is. The larger the circle of influence is, the more opportunities you have.

    @@ -2440,7 +2442,7 @@ http://www.gnu.org/software/src-highlite -->
    Become visible, keep track that you accomplishments. E.g. write a weekly summary. Do presentations, be seen. Learn new things and share your learnings. Be the problem solver and not the blamer.

    -

    Be pragmatic and also manage your time


    +

    Be pragmatic and also manage your time



    Make use of time boxing via the Pomodoro technique: Set a target of rounds and track the rounds. That give you exact focused work time. That's really the trick. For example set a goal of 6 daily pomodores.

    @@ -2450,7 +2452,7 @@ http://www.gnu.org/software/src-highlite -->
    You should feel good of the work done even if you don't finished the task. You will feel good about pomodoro wise even you don't finish the task on hand yet. Helps you to enjoy time off more. Working longer may not sell anything.

    -

    The quota system


    +

    The quota system



    Defined quota of things done. E.g. N runs per week or M Blog posts per month or O pomodoros per week. This helps with consistency. Truly commit to these quotas. Failure is not an option. Start with small commitments. Don't commit to something you can't fulfill otherwise you set yourself up for failure.

    @@ -2459,7 +2461,7 @@ http://www.gnu.org/software/src-highlite -->
  • Internal motivation is more important over external motivation. Check out Daniels book drive.
  • Multitasking: Batching is effective. E.g. emails twice daily at pre-set times..

  • -

    Don't waste time


    +

    Don't waste time



    The biggest time waster is TV watching. The TV is programming you. It's insane that Americans watch so much TV as they work full time. Schedule one show at a time and watch it when you want to watch it. Most movies are crap anyways. The good movies will come to you as people will talk about them.

    @@ -2468,7 +2470,7 @@ http://www.gnu.org/software/src-highlite -->
  • Meetings can waste time as well. Simply don't go to them. Try to cancel meeting if it can be dealt with via email.
  • Enjoying things is not a waste of time. E.g. you could still play a game once in a while. It is important not to cut away all you enjoy from your life.

  • -

    Habits


    +

    Habits



    Try to have as many good habits as possible. Start with easy habits, and make them a little bit more challenging over time. Set ankers and rewards. Over time the routines will become habits naturally.

    @@ -2478,7 +2480,7 @@ http://www.gnu.org/software/src-highlite -->
  • We don't have control over our habits but our own routines.
  • Routines help to form the habits, though.

  • -

    Work-life balance


    +

    Work-life balance



    Avoid overwork hours. That's not as beneficial as you might think and comes only with very small rewards. Invest rather in yourself and not in your employer.

    @@ -2490,7 +2492,7 @@ http://www.gnu.org/software/src-highlite -->
    Use your most productive hours to work on you. Make that your priority. Take care of yourself a priority (E.g. do workouts or learn a new language). You can always workout 2 or 1 hour per day, but will you pay the price?

    -

    Mental health


    +

    Mental health



    • Friendships and positive thinking help to have and maintain better health, longer Life, better productivity and increased happiness.
    • @@ -2501,7 +2503,7 @@ http://www.gnu.org/software/src-highlite -->
      In most cases burnout is just an illusion. If you don't have motivation push through the wall. People usually don't pass the wall as they feel they are burned out. After pushing through the wall you will have the most fun, for example you will be able playing the guitar greatly.

      -

      Physical health


      +

      Physical health



      Utilise a standing desk and treadmill (you could walk and type at the same time). Increase the incline in order to burn more calories. Even on the standing desk you burn more calories than sitting. When you use pomodoro then you can use the small breaks for push-ups (maybe won't do as good when you are in a fasted state).

      @@ -2513,7 +2515,7 @@ http://www.gnu.org/software/src-highlite -->

    Intermittent fasting is an effective method to maintain weight and health. But it does not mean that you can only eat junk food in the feeding windows. Also, diet and nutrition is the most important for health and fitness. They make it also easier to stay focused and positive.

    -

    No drama


    +

    No drama



    Avoid drama at work. Where are humans there is drama. You can decide where to spent your energy in. But don't avoid conflict. Conflict is healthy in any kind of relationship. Be tactful and state your opinion. The goal is to find the best solution to the problem.

    @@ -2529,13 +2531,13 @@ http://www.gnu.org/software/src-highlite -->
    You have to learn how to work in a team. Be honest but tactful. It's not too be the loudest but about selling your ideas. Don't argue otherwise you won't sell anything. Be persuasive by finding the common ground. Or lead the colleagues to your idea and don't sell it upfront. Communicate clearly.

    -

    Personal brand


    +

    Personal brand



    • Invest your value outside the company. Build your personal brand. Show how valuable you are, also to other companies. Become an asset.
    • Invest in your education. Make your goals known. If you want something ask for it (see also the sections about goals in this document).

    -

    Market yourself


    +

    Market yourself



    • The best way to market yourself is to make you usable.
    • @@ -2548,11 +2550,11 @@ http://www.gnu.org/software/src-highlite -->
    • Have an elevator pitch: "buetow.org - Having fun with computers!"
    • Have social media accounts, especially the ones which are more tech related.

    -

    Networking


    +

    Networking



    Ask people so they talk about themselves. They are not really interested in you. Use meetup.com to find groups you are interested and build up the network over time. Don't drink on social networking events even when others do. Talking to other people at events only has upsides. Just saying "hi" and introducing yourself is enough. What worse can happen? If the person rejects you so what, life goes on. Ask open questions and no "yes" and "no" questions. E.g.: "What is your story, why are you here?".

    -

    Public speaking


    +

    Public speaking



    Before your talk go on stage 10 minutes in advance. Introduce yourself to the front row people. During the talk they will smile at you and encourage you during your talk.

    @@ -2562,9 +2564,9 @@ http://www.gnu.org/software/src-highlite -->
    Just do it. Just go to conferences. Even if you are not speaking. Sell your boss what you would learn and "this and that" and you would present the learnings to the team afterwards.

    -

    New job


    +

    New job



    -

    For the interview


    +

    For the interview



    • Build up a network before the interview. E.g., follow and comment blogs. Or go to meet-ups and conferences. Join user groups.
    • @@ -2573,7 +2575,7 @@ http://www.gnu.org/software/src-highlite -->

    If you are specialized then there is a better chance to get a fitting job. No one will hire a general lawyer if there are specialized lawyers available. Even if you are specialized, you will have a wide range of skills (T-shape knowledge).

    -

    Find the right type of company


    +

    Find the right type of company



    Not all companies are equal. They have individual cultures and guidelines.

    @@ -2585,7 +2587,7 @@ http://www.gnu.org/software/src-highlite -->
    Work in a tech. company if you want to work on/with cutting edge technologies.

    -

    Apply for the new job


    +

    Apply for the new job



    Get a professional resume writer. Get referrals of writers and get samples from there. Get sufficient with algorithm and data structures interview questions. Cracking the coding interview book and blog

    @@ -2598,7 +2600,7 @@ http://www.gnu.org/software/src-highlite -->
    Invest in your dress code as appearance masters. It does make sense to invest in your style. You could even hire a professional stylist (not my personal way though).

    -

    Negotiation


    +

    Negotiation



    • Whoever names the number first loses. You don't know what someone else is expecting unless told. Low ball number may be an issue but you have to know the market.
    • @@ -2616,21 +2618,21 @@ http://www.gnu.org/software/src-highlite -->
      • Never spilt the difference is the best book for learning negotiation techniques..

      -

      Leaving the old job


      +

      Leaving the old job



      When leaving a job make a clean and non personal as possible. Never complain and never explain. Don't worry about abandonment of the team. Everybody is replacement and you make a business decision. Don't threaten to quit as you are replaceable.

      -

      Other things


      +

      Other things



      • As a leader lead by example and don't lead from the Eiffel tower.
      • As a leader you are responsible for the team. If the team fails then it's your fault only.

      -

      Testing


      +

      Testing



      Unit testing Vs regression testing: Unit tests test the smallest possible unit and get rewritten if the unit gets changed. It's like programming against a specification n. Regression tests test whether the software still works after the change. Now you know more than most software engineers.

      -

      Books to read


      +

      Books to read



      • Clean Code
      • @@ -2677,13 +2679,13 @@ http://www.gnu.org/software/src-highlite --> Gogios is a minimalistic and easy-to-use monitoring tool I programmed in Google Go designed specifically for small-scale self-hosted servers and virtual machines. The primary purpose of Gogios is to monitor my personal server infrastructure for `foo.zone`, my MTAs, my authoritative DNS servers, my NextCloud, Wallabag and Anki sync server installations, etc.
        -

        KISS server monitoring with Gogios


        +

        KISS server monitoring with Gogios



        Published at 2023-06-01T21:10:17+03:00

        Gogios logo

        -

        Introduction


        +

        Introduction



        Gogios is a minimalistic and easy-to-use monitoring tool I programmed in Google Go designed specifically for small-scale self-hosted servers and virtual machines. The primary purpose of Gogios is to monitor my personal server infrastructure for foo.zone, my MTAs, my authoritative DNS servers, my NextCloud, Wallabag and Anki sync server installations, etc.

        @@ -2714,7 +2716,7 @@ The original can be found at https://asciiart.website/index.php?art=objects/computers
        -

        Motivation


        +

        Motivation



        With experience in monitoring solutions like Nagios, Icinga, Prometheus and OpsGenie, these tools often came with many features that I didn't necessarily need for personal use. Contact groups, host groups, check clustering, and the requirement of operating a DBMS and a WebUI added complexity and bloat to my monitoring setup.

        @@ -2722,7 +2724,7 @@ https://asciiart.website/index.php?art=objects/computers
        This led me to create Gogios, a lightweight monitoring tool tailored to my specific needs. I chose the Go programming language for this project as it comes, in my opinion, with the best balance of ease to use and performance.

        -

        Features


        +

        Features



        • Compatible with Nagios Check scripts: Gogios leverages the widely-used Nagios Check API, allowing to use existing Nagios plugins.
        • @@ -2733,7 +2735,7 @@ https://asciiart.website/index.php?art=objects/computers
        • Email Notifications: Gogios can send email notifications regarding the status of monitored services, ensuring you stay informed about potential issues.
        • CRON-based Execution: Gogios can be quickly scheduled to run periodically via CRON, allowing you to automate monitoring without needing a complex setup.

        -

        Example alert


        +

        Example alert



        This is an example alert report received via E-Mail. Whereas, [C:2 W:0 U:0 OK:51] means that we've got two alerts in status critical, 0 warnings, 0 unknowns and 51 OKs.

        @@ -2755,9 +2757,9 @@ CRITICAL: Check ICMP6 vulcan.buetow.org: Check command timed out Have a nice day!
        -

        Installation


        +

        Installation



        -

        Compiling and installing Gogios


        +

        Compiling and installing Gogios



        This document is primarily written for OpenBSD, but applying the corresponding steps to any Unix-like (e.g. Linux-based) operating system should be easy. On systems other than OpenBSD, you may always have to replace does with the sudo command and replace the /usr/local/bin path with /usr/bin.

        @@ -2789,7 +2791,7 @@ go build -o gogios cmd/gogios/main.go
        https://www.rexify.org

        -

        Setting up user, group and directories


        +

        Setting up user, group and directories



        It is best to create a dedicated system user and group for Gogios to ensure proper isolation and security. Here are the steps to create the _gogios user and group under OpenBSD:

        @@ -2806,7 +2808,7 @@ doas chmod 750 /var/run/gogios
        Please note that creating a user and group might differ depending on your operating system. For other operating systems, consult their documentation for creating system users and groups.

        -

        Installing monitoring plugins


        +

        Installing monitoring plugins



        Gogios relies on external Nagios or Icinga monitoring plugin scripts. On OpenBSD, you can install the monitoring-plugins package with Gogios. The monitoring-plugins package is a collection of monitoring plugins, similar to Nagios plugins, that can be used to monitor various services and resources:

        @@ -2820,9 +2822,9 @@ doas pkg_add nrpe # If you want to execute checks remot
        Once the installation is complete, you can find the monitoring plugins in the /usr/local/libexec/nagios directory, which then can be configured to be used in gogios.json.

        -

        Configuration


        +

        Configuration



        -

        MTA


        +

        MTA



        Gogios requires a local Mail Transfer Agent (MTA) such as Postfix or OpenBSD SMTPD running on the same server where the CRON job (see about the CRON job further below) is executed. The local MTA handles email delivery, allowing Gogios to send email notifications to monitor status changes. Before using Gogios, ensure that you have a properly configured MTA installed and running on your server to facilitate the sending of emails. Once the MTA is set up and functioning correctly, Gogios can leverage it to send email notifications.

        @@ -2834,7 +2836,7 @@ echo 'This is a test email from OpenBSD.' | mail -s 'Test Email'
        Check the recipient's inbox to confirm the delivery of the test email. If the email is delivered successfully, it indicates that your email server is configured correctly and functioning. Please check your MTA logs in case of issues.

        -

        Configuring Gogios


        +

        Configuring Gogios



        To configure Gogios, create a JSON configuration file (e.g., /etc/gogios.json). Here's an example configuration:

        @@ -2897,7 +2899,7 @@ http://www.gnu.org/software/src-highlite -->
        The state.json file mentioned above keeps track of the monitoring state and check results between Gogios runs, enabling Gogios only to send email notifications when there are changes in the check status.

        -

        Running Gogios


        +

        Running Gogios



        Now it is time to give it a first run. On OpenBSD, do:

        @@ -2919,7 +2921,7 @@ http://www.gnu.org/software/src-highlite -->
        Gogios is now configured to run every five minutes from 8 am to 10 pm via CRON as the _gogios user. It will execute the checks and send monitoring status whenever a check status changes via email according to your configuration. Also, Gogios will run once at 7 am every morning and re-notify all unhandled alerts as a reminder.

        -

        High-availability


        +

        High-availability



        To create a high-availability Gogios setup, you can install Gogios on two servers that will monitor each other using the NRPE (Nagios Remote Plugin Executor) plugin. By running Gogios in alternate CRON intervals on both servers, you can ensure that even if one server goes down, the other will continue monitoring your infrastructure and sending notifications.

        @@ -2932,7 +2934,7 @@ http://www.gnu.org/software/src-highlite -->

      There are plans to make it possible to execute certain checks only on certain nodes (e.g. on elected leader or master nodes). This is still in progress (check out my Gorum Git project).

      -

      Conclusion:


      +

      Conclusion:



      Gogios is a lightweight and straightforward monitoring tool that is perfect for small-scale environments. With its compatibility with the Nagios Check API, email notifications, and CRON-based scheduling, Gogios offers an easy-to-use solution for those looking to monitor a limited number of resources. I personally use it to execute around 500 checks on my personal server infrastructure. I am very happy with this solution.

      @@ -2961,7 +2963,7 @@ http://www.gnu.org/software/src-highlite --> These are my personal takeaways after reading 'The Obstacle Is the Way' by Ryan Holiday. This is mainly for my own use, but you might find it helpful too.
      -

      "The Obstacle is the Way" book notes


      +

      "The Obstacle is the Way" book notes



      Published at 2023-05-06T17:23:16+03:00

      @@ -2982,7 +2984,7 @@ http://www.gnu.org/software/src-highlite -->
      "The obstacle is the way" is a powerful statement that encapsulates the wisdom of turning challenges into opportunities for growth and success. We will explore using obstacles as fuel, transforming weaknesses into strengths, and adopting a mindset that allows us to be creative and persistent in the face of adversity.

      -

      Reframe your perspective


      +

      Reframe your perspective



      The obstacle in your path can become your path to success. Instead of being paralyzed by challenges, see them as opportunities to learn and grow. Remember, the things that hurt us often instruct us.

      @@ -2991,37 +2993,37 @@ http://www.gnu.org/software/src-highlite --> Don't always try to use the front door; a backdoor could open. It's nonsense. Don't fight the judo master with judo. Non-action can be action, exposing the weaknesses of others.


      -

      Embrace rationality


      +

      Embrace rationality



      It is a superpower to see things rationally when others are fearful. Focus on the reality of the situation without letting emotions, such as anger, cloud your judgment. This ability will enable you to make better decisions in adversity. Ability to see things what they really are. E.g. wine is old fermented grapes, or other people behaving like animals during a fight. Show the middle finger if someone persists on the stupid rules occasionally.

      -

      Control your response


      +

      Control your response



      You can choose how you respond to obstacles. Focus on what you can control, and don't let yourself feel harmed by external circumstances. Remember, you decide how things affect you; nobody else does. Choose to feel good in response to any situation. Embrace the challenges and obstacles that come your way, as they are opportunities for growth and learning.

      -

      Practice emotional and physical resilience


      +

      Practice emotional and physical resilience



      Martial artists know the importance of developing physical and emotional strength. Cultivate the art of not panicking; it will help you avoid making mistakes during high-pressure situations.

      Focus on what you can control. Don't choose to feel harmed, and then you won't be harmed. I decide things that affect me; nobody else does. E.g., in prison, your mind stays your own. Don't ignore fear but explain it away, have a different view.

      -

      Persistence and patience


      +

      Persistence and patience



      Practice persistence and patience in your pursuits. Focus on the process rather than the prize and take one step at a time. Remember, the journey is about finishing tasks, projects, or workouts to the best of your ability. Never be in a hurry and never be desperate. There is no reason to be rushed; there are all in the long haul. Follow the process and not the price. Take it one step at a time. The process is about finishing (workout, task, project, etc.).

      -

      Embrace failure


      +

      Embrace failure



      Failure is a natural part of life and can make us stronger. Treat defeat as a stepping stone to success and education. What is defeat? The first step to education. Failure makes you stronger. If we do our best, we can be proud of it, regardless of the result. Do your job, but do it right. Only an asshole thinks he is too good at the things he does. Also, asking for forgiveness is easier than asking for permission.

      -

      Be adaptable


      +

      Be adaptable



      There are many ways to achieve your goals; sometimes, unconventional methods are necessary. Feel free to break the rules or go off the beaten path if it will lead to better results. Transform weaknesses into strengths. We have a choice of how to respond to things. It's not about being positive but to be creative. Aim high, but stuff will happen; E.g., surprises will always happen.

      -

      Embrace non-action


      +

      Embrace non-action



      We constantly push to the next thing. Sometimes the best course of action is standing still or even going backwards. Obstacles might resolve by themselves. Or going sideways. Sometimes, the best action is to stand still, go sideways, or even go backwards. Obstacles may resolve themselves or present new opportunities if you're patient and observant. People always want your input before you have all the facts. They want you to play after their rules. The question is, do you let them? The English call it the cool head. Being in control of Stress; requires practice. Appear, the absence of fear (Greek). When all others do it one way, it does not mean it is the correct or best practice.

      -

      Leverage crisis


      +

      Leverage crisis



      In times of crisis, seize the chance to do things never done before. Great people use negative situations to their advantage and become the most effective in challenging circumstances.

      @@ -3029,19 +3031,19 @@ http://www.gnu.org/software/src-highlite -->
      Be prepared for nothing to work. Problems are an opportunity to do your best, not to do miracles. Always manage your expectations. It will suck, but it will be ok. Be prepared to begin from the beginning. Be cheerful and eagerly work on the next obstacle. Each time you become better. Life is not a sprint but a marathon. After each obstacle lies another obstacle, there won't be anything without obstacles. Passing one means you are ready for the next.

      -

      Build your inner citadel


      +

      Build your inner citadel



      Develop your inner strength during good times so you can rely on it in bad times. Always prepare for adversity and face it with calmness and resilience. Be humble enough that things which happen will happen. Build your inner citadel. In good times strengthen it. In bad times rely on it.

      We should always prepare for things to get tough. Your house burns down: no worries, we eliminated much rubbish. Imagine what can go wrong before things go wrong. We are prepared for adversity; it's other people who aren't. Phil Jackson's hip problem example. To receive unexpected benefits, you must first accept the unexpected obstacles. Meditate on death. It's a universal obstacle. Use it as a reminder to do your best.

      -

      Love everything that happens


      +

      Love everything that happens



      Turn an obstacle the other way around for your benefit. Use it at fuel. It's simple but challenging. Most are paralyzed instead. The obstacle in the path becomes the path. Obstacles are neither good nor bad. The things which hurt, instruct.

      Should I hate people who hate me? That's their problem and not mine. Be always calm and relaxed during the fight. The story of the battle is the story of the smile. Cheerfulness in all situations, especially the bad ones. Love for everything that happens; if it happens, it was meant to happen. We can choose how we react to things, so why not choose to feel good? I love everything that happens. You must never lower yourself to the person you don't like.

      -

      Conclusion


      +

      Conclusion



      Life is a marathon, not a sprint. Each obstacle we overcome prepares us for the next one. Remember, the obstacle is not just a barrier to be turned upside down; it can also be used as a catapult to propel us forward. By embracing challenges and using them as opportunities for growth, we become stronger, more adaptable, and, ultimately, more successful.

      @@ -3073,7 +3075,7 @@ http://www.gnu.org/software/src-highlite --> For fun, I am tracking the uptime of various personal machines (servers, laptops, workstations...). I have been doing this for over ten years now, so I have a lot of statistics collected.
      -

      Unveiling guprecords.raku: Global Uptime Records with Raku


      +

      Unveiling guprecords.raku: Global Uptime Records with Raku



      Published at 2023-04-30T13:10:26+03:00

      @@ -3094,7 +3096,7 @@ http://www.gnu.org/software/src-highlite --> +-----+-----------------+-----------------------------+
      -

      Introduction


      +

      Introduction



      For fun, I am tracking the uptime of various personal machines (servers, laptops, workstations...). I have been doing this for over ten years now, so I have a lot of statistics collected.

      @@ -3117,7 +3119,7 @@ http://www.gnu.org/software/src-highlite -->

    And I have been following the Raku newsletter, and sometimes I have been lurking around in the IRC channels, too. Watching Raku coding challenges on YouTube was pretty fun, too. However, nothing beats actually using Raku to learn the language. After reading all of these resources, I may have a good idea about the features and paradigms, but I am by far not an expert.

    -

    How Guprecords works


    +

    How Guprecords works



    Guprecords works in three stages:

    @@ -3143,7 +3145,7 @@ http://www.gnu.org/software/src-highlite -->
  • Output formats available: Plaintext, Markdown, and Gemtext
  • Provides top entries based on the specified limit

  • -

    Example


    +

    Example



    You have already seen an example at the very top of this post, where the hosts were grouped by their total lifespans (uptime+downtime). Here's an example of what the global uptime report (grouped by total host uptimes) might look like:

    @@ -3214,7 +3216,7 @@ no1 in 455 days, 18:52:44 | at Sun Jul 21 07:37:51 2024 %up 99.997 | since Tue Dec 18 10:16:08 2018
    -

    Conclusion


    +

    Conclusion



    Guprecords is a small, yet powerful tool for analyzing uptime statistics. While developing Guprecords, I have come to truly appreciate and love Raku's expressiveness. The language is designed to be both powerful and flexible, allowing developers to express their intentions and logic more clearly and concisely.

    @@ -3255,7 +3257,7 @@ no1 in 455 days, 18:52:44 | at Sun Jul 21 07:37:51 2024 This is the first blog post about my Algorithms and Data Structures in Go series. I am not a Software Developer in my day job. In my current role, programming and scripting skills are desirable but not mandatory. I have been learning about Data Structures and Algorithms many years ago at University. I thought it would be fun to revisit/refresh my knowledge here and implement many of the algorithms in Go.
    -

    Algorithms and Data Structures in Go - Part 1


    +

    Algorithms and Data Structures in Go - Part 1



    Published at 2023-04-09T22:31:42+03:00

    @@ -3279,7 +3281,7 @@ no1 in 455 days, 18:52:44 | at Sun Jul 21 07:37:51 2024
    This post is about setting up some basic data structures and methods for this blog series. I promise, everything will be easy to follow in this post. It will become more interesting later in this series.

    -

    Type constraints


    +

    Type constraints



    First, the package ds (data structures) defines the types.go. All examples will either operate on the Integer or Number type:

    @@ -3303,7 +3305,7 @@ http://www.gnu.org/software/src-highlite -->
    -

    ArrayList


    +

    ArrayList



    Next comes the arraylist.go, which defines the underlying data structure all the algorithms of this series will use. ArrayList is just a type alias of a Go array (or slice) with custom methods on it:

    @@ -3363,7 +3365,7 @@ http://www.gnu.org/software/src-highlite --> }
    -

    Helper methods


    +

    Helper methods



    The FirstN method only returns the first N elements of the ArrayList. This is useful for printing out only parts of the data structure:

    @@ -3422,7 +3424,7 @@ http://www.gnu.org/software/src-highlite -->
    -

    Sleep sort


    +

    Sleep sort



    Let's implement our first algorithm, sleep sort. Sleep sort is a non-traditional and unconventional sorting algorithm based on the idea of waiting a certain amount of time corresponding to the value of each element in the input ArrayList. It's more of a fun, creative concept rather than an efficient or practical sorting technique. This is not a sorting algorithm you would use in any production code. As you can imagine, it is quite an inefficient sorting algorithm (it's only listed here as a warm-up exercise). This sorting method may also return false results depending on how the Goroutines are scheduled by the Go runtime.

    @@ -3469,7 +3471,7 @@ http://www.gnu.org/software/src-highlite -->
    This Go code implements the sleep sort algorithm using generics and goroutines. The main function Sleep[V ds.Integer](a ds.ArrayList[V]) ds.ArrayList[V] takes a generic ArrayList as input and returns a sorted ArrayList. The code creates a separate goroutine for each element in the input array, sleeps for a duration proportional to the element's value, and then sends the element to a channel. Another goroutine waits for all the sleeping goroutines to finish and then closes the channel. The sorted result ArrayList is constructed by appending the elements received from the channel in the order they arrive. The sync.WaitGroup is used to synchronize goroutines and ensure that all of them have completed before closing the channel.

    -

    Testing


    +

    Testing



    For testing, we only allow values up to 10, as otherwise, it would take too long to finish:

    @@ -3528,7 +3530,7 @@ ok codeberg.org/snonux/algorithms/sort These are my personal takeaways after reading 'Never split the difference' by Chris Voss. Note that the book contains much more knowledge wisdom and that these notes only contain points I personally found worth writing down. This is mainly for my own use, but you might find it helpful too.
    -

    "Never split the difference" book notes


    +

    "Never split the difference" book notes



    Published at 2023-04-01T20:00:17+03:00

    @@ -3546,7 +3548,7 @@ ok codeberg.org/snonux/algorithms/sort
    -

    Tactical listening, spreading empathy


    +

    Tactical listening, spreading empathy



    Be a mirror, copy each other to be comfy with each other to build up trust. Mirroring is mainly body language. A mirror is to repeat the words the other just said. Simple but effective.

    @@ -3557,7 +3559,7 @@ ok codeberg.org/snonux/algorithms/sort
    Mirror training is like Jedi training. Simple but effective. A mirror needs space. Be silent after "you want this?"

    -

    Mindset of discovery


    +

    Mindset of discovery



    Try to have multiple realities in your mind and use facts to distinguish between real and false.

    @@ -3569,7 +3571,7 @@ ok codeberg.org/snonux/algorithms/sort
    Try: to put a label on someone's emotion and then be silent. Wait for the other to reveal himself. "You seem unhappy about this?"

    -

    More tips


    +

    More tips



    • Put on a poker face and don't show emotions.
    • @@ -3578,7 +3580,7 @@ ok codeberg.org/snonux/algorithms/sort Being right is not the key to successful negotiation; being mindful is.
    • Be in the safe zone of empathy and acknowledge bad news.

    -

    "No" starts the conversation


    +

    "No" starts the conversation



    When the opponent starts with a "no", he feels in control and comfortable. That's why he has to start with "no".

    @@ -3591,11 +3593,11 @@ ok codeberg.org/snonux/algorithms/sort
    Get a "That's right" when negotiating. Don't get a "you're right". You can summarise the opponent to get a "that's right".

    -

    Win-win


    +

    Win-win



    Win-win is a naive approach when encountering the win-lose counterpart, but always cooperate. Don't compromise, and don't split the difference. We don't compromise because it's right; we do it because it is easy. You must embrace the hard stuff; that's where the great deals are.

    -

    On Deadlines


    +

    On Deadlines



    • All deadlines are imaginary.
    • @@ -3603,7 +3605,7 @@ ok codeberg.org/snonux/algorithms/sort They push a deal to a conclusion.
    • They rush the counterpart to cause pressure and anxiety.

    -

    Analyse the opponent


    +

    Analyse the opponent



    • Understand the motivation of people behind the table as well.
    • @@ -3613,7 +3615,7 @@ ok codeberg.org/snonux/algorithms/sort
      The person on the other side is never the issue; the problem is the issue. Keep this in mind to avoid emotional issues with the person and focus on the problem, not the person. The bond is essential; never create an enemy.

      -

      Use different ways of saying "no."


      +

      Use different ways of saying "no."



      I had paid my rent always in time. I had positive experiences with the building and would be sad for the landlord to lose a good tenant. I am looking for a win-win agreement between us. Pulling out the research, other neighbours offer much lower prices even if your building is a better location and services. How can I effort 200 more....

      @@ -3621,7 +3623,7 @@ ok codeberg.org/snonux/algorithms/sort You always have to embrace thoughtful confrontation for good negotiation and life. Don't avoid honest, clear conflict. It will give you the best deals. Compromises are mostly bad deals for both sides. Most people don't negotiate a win-win but a win-lose. Know the best and worst outcomes and what is acceptable for you.

      -

      Calibrated question


      +

      Calibrated question



      Calibrated questions. Give the opponent a sense of power. Ask open-how questions to get the opponent to solve your problem and move him in your direction. Calibrated questions are the best tools. Summarise everything, and then ask, "how I am supposed to do that?". Asking for help this way with a calibrated question is a powerful tool for joint problem solving

      @@ -3637,11 +3639,11 @@ ok codeberg.org/snonux/algorithms/sort
      Prepare 3 to 5 calibrated questions for your counterpart. Be curious what is really motivating the other side. You can get out the "Black Swan".

      -

      The black swan


      +

      The black swan



      What we don't know can break our deal. Uncovering it can bring us unexpected success. You get what you ask for in this world, but you must learn to ask correctly. Reveal the black swan by asking questions.

      -

      More


      +

      More



      Establish a range at top places like corp. I get... (e.g. remote London on a project basis). Set a high salary range and not a number. Also, check on LinkedIn premium for the salaries.

      @@ -3685,7 +3687,7 @@ ok codeberg.org/snonux/algorithms/sort I proudly announce that I've released Gemtexter version `2.0.0`. What is Gemtexter? It's my minimalist static site generator for Gemini Gemtext, HTML and Markdown written in GNU Bash.
      -

      Gemtexter 2.0.0 - Let's Gemtext again²


      +

      Gemtexter 2.0.0 - Let's Gemtext again²



      Published at 2023-03-25T17:50:32+02:00

      @@ -3710,7 +3712,7 @@ ok codeberg.org/snonux/algorithms/sort Let's list what's new!

      -

      Minimal template engine


      +

      Minimal template engine



      Gemtexter now supports templating, enabling dynamically generated content to .gmi files before converting anything to any output format like HTML and Markdown.

      @@ -3776,7 +3778,7 @@ See more entries about DTail and Golang: Blablabla...
      -

      Added hooks


      +

      Added hooks



      You can configure PRE_GENERATE_HOOK and POST_PUBLISH_HOOK to point to scripts to be executed before running --generate, or after running --publish. E.g. you could populate some of the content by an external script before letting Gemtexter do its thing or you could automatically deploy the site after running --publish.

      @@ -3790,11 +3792,11 @@ http://www.gnu.org/software/src-highlite --> declare -xr POST_PUBLISH_HOOK=./post_publish_hook.sh
      -

      Use of safer Bash options


      +

      Use of safer Bash options



      Gemtexter now does set -euf -o pipefile, which helps to eliminate bugs and to catch scripting errors sooner. Previous versions only set -e.

      -

      Meta cache made obsolete


      +

      Meta cache made obsolete



      Here is the breaking change to older versions of Gemtexter. The $BASE_CONTENT_DIR/meta directory was made obsolete. meta was used to store various information about all the blog post entries to make generating an Atom feed in Bash easier. Especially the publishing dates of each post were stored there. Instead, the publishing date is now encoded in the .gmi file. And if it is missing, Gemtexter will set it to the current date and time at first run.

      @@ -3824,11 +3826,11 @@ http://www.gnu.org/software/src-highlite --> The remaining content of the Gemtext file...
      -

      XMLLint support


      +

      XMLLint support



      Optionally, when the xmllint binary is installed, Gemtexter will perform a simple XML lint check against the Atom feed generated. This is a double-check of whether the Atom feed is a valid XML.

      -

      More


      +

      More



      Additionally, there were a couple of bug fixes, refactorings and overall improvements in the documentation made.

      @@ -3858,7 +3860,7 @@ The remaining content of the Gemtext file... These are my personal takeaways after reading 'The Pragmatic Programmer' by David Thomas and Andrew Hunt. Note that the book contains much more knowledge wisdom and that these notes only contain points I personally found worth writing down. This is mainly for my own use, but you might find it helpful too.
      -

      "The Pragmatic Programmer" book notes


      +

      "The Pragmatic Programmer" book notes



      Published at 2023-03-16T00:55:20+02:00

      @@ -3909,7 +3911,7 @@ The remaining content of the Gemtext file...
      Do what works and not what's fashionable. E.g. does SCRUM make sense? The goal is to deliver deliverables and not to "become" agile.

      -

      Continuous learning


      +

      Continuous learning



      Add new tools to your repertoire every day and keep the momentum up. Learning new things is your most crucial aspect. Invest regularly in your knowledge portfolio. The learning process extends your thinking. It does not matter if you will never use it.

      @@ -3920,7 +3922,7 @@ The remaining content of the Gemtext file...

    Think critically about everything you learn. Use paper for your notes. There is something special about it.

    -

    Stay connected


    +

    Stay connected



    It's your life, and you own it. Bruce Lee once said:

    @@ -3933,7 +3935,7 @@ The remaining content of the Gemtext file...
    It's your life. Share it, celebrate it, be proud and have fun.

    -

    The story of stone soup


    +

    The story of stone soup



    How to motivate others to contribute something (e.g. ideas to a startup):

    @@ -4477,7 +4479,7 @@ nmap ,i !wpbpaste<C This will be a quick blog post, as I am busy with my personal life now. I have relocated to a different country and am still busy arranging things. So bear with me :-)
    -

    Installing DTail on OpenBSD


    +

    Installing DTail on OpenBSD



    Published at 2022-10-30T11:03:19+02:00

    @@ -4530,7 +4532,7 @@ nmap ,i !wpbpaste<C
    I will also mention some relevant Rexfile snippets in this post!

    -

    Compile it


    +

    Compile it



    First of all, DTail needs to be downloaded and compiled. For that, git, go, and gmake are required:

    @@ -4565,7 +4567,7 @@ $ doas pkg_delete git go gmake
    One day I shall create an official OpenBSD port for DTail.

    -

    Install it


    +

    Install it



    Installing the binaries is now just a matter of copying them to /usr/local/bin as follows:

    @@ -4607,7 +4609,7 @@ END $ doas chmod 755 /etc/rc.d/dserver
    -

    Rexification


    +

    Rexification



    This is the task for setting it up via Rex. Note the . . . ., that's a placeholder which we will fill up more and more during this blog post:

    @@ -4634,7 +4636,7 @@ task 'dtail', group => 'frontends', };
    -

    Configure it


    +

    Configure it



    Now, DTail is fully installed but still needs to be configured. Grab the default config file from GitHub ...

    @@ -4657,7 +4659,7 @@ $ curl https://raw.githubusercontent.com/mimecast/dtail/master/examples/dtail.js }
    -

    Rexification


    +

    Rexification



    That's as simple as adding the following to the Rex task:

    @@ -4673,7 +4675,7 @@ file '/etc/dserver/dtail.json', on_change => sub { $restart = TRUE };
    -

    Update the key cache for it


    +

    Update the key cache for it



    DTail relies on SSH for secure authentication and communication. However, the system user _dserver has no permission to read the SSH public keys from the user's home directories, so the DTail server also checks for available public keys in an alternative path /var/run/dserver/cache.

    @@ -4726,7 +4728,7 @@ $ echo /usr/local/bin/dserver-update-key-cache.sh | doas tee -a /etc/daily.local /usr/local/bin/dserver-update-key-cache.sh
    -

    Rexification


    +

    Rexification



    That's done by adding ...

    @@ -4742,7 +4744,7 @@ append_if_no_such_line '/etc/daily.local', '/usr/local/bin/dserver-u
    ... to the Rex task!

    -

    Start it


    +

    Start it



    Now, it's time to enable and start the DTail server:

    @@ -4782,7 +4784,7 @@ Caching /home/rex/.ssh/authorized_keys -> /var/cache/dserver/rex.authorized_k All set...
    -

    Use it


    +

    Use it



    The DTail server is now ready to serve connections. You can use any DTail commands, such as dtail, dgrep, dmap, dcat, dtailhealth, to do so. Checkout out all the usage examples on the official DTail page.

    @@ -4808,7 +4810,7 @@ REMOTE|blowfish|100|7|fstab|31bfd9d9a6788844.h /usr/local ffs rw,wxallowed,nodev REMOTE|fishfinger|100|7|fstab|093f510ec5c0f512.h /usr/local ffs rw,wxallowed,nodev 1 2
    -

    Conclusions


    +

    Conclusions



    It's a bit of manual work, but it's ok on this small scale! I shall invest time in creating an official OpenBSD port, though. That would render most of the manual steps obsolete, as outlined in this post!

    @@ -4957,7 +4959,7 @@ jgs (________\ \ I proudly announce that I've released Gemtexter version `1.1.0`. What is Gemtexter? It's my minimalist static site generator for Gemini Gemtext, HTML and Markdown written in GNU Bash.
    -

    Gemtexter 1.1.0 - Let's Gemtext again


    +

    Gemtexter 1.1.0 - Let's Gemtext again



    Published at 2022-08-27T18:25:57+01:00

    @@ -4979,9 +4981,9 @@ jgs (________\ \
    It has been around a year since I released the first version 1.0.0. Although, there aren't any groundbreaking changes, there have been a couple of smaller commits and adjustments. I was quite surprised that I received a bunch of feedback and requests about Gemtexter so it means that I am not the only person in the universe actually using it.

    -

    What's new?


    +

    What's new?



    -

    Automatic check for GNU version requirements


    +

    Automatic check for GNU version requirements



    Gemtexter relies on the GNU versions of the tools grep, sed and date and it also requires the Bash shell in version 5 at least. That's now done in the check_dependencies() function:

    @@ -5010,15 +5012,15 @@ http://www.gnu.org/software/src-highlite -->
    Especially macOS users didn't read the README carefully enough to install GNU Grep, GNU Sed and GNU Date before using Gemtexter.

    -

    Backticks now produce inline code blocks in the HTML output


    +

    Backticks now produce inline code blocks in the HTML output



    The Gemtext format doesn't support inline code blocks, but Gemtexter now produces inline code blocks (means, small code fragments can be placed in the middle of a paragraph) in the HTML output when the code block is enclosed with Backticks. There were no adjustments required for the Markdown output format, because Markdown supports it already out of the box.

    -

    Cache for Atom feed generation


    +

    Cache for Atom feed generation



    The Bash is not the most performant language. Gemtexter already takes a couple of seconds only to generate the Atom feed for around two hand full of articles on my slightly underpowered Surface Go 2 Linux tablet. Therefore, I introduced a cache, so that subsequent Atom feed generation runs finish much quicker. The cache uses a checksum of the Gemtext .gmi file to decide whether anything of the content has changed or not.

    -

    Input filter support


    +

    Input filter support



    Once your capsule reaches a certain size, it can become annoying to re-generate everything if you only want to preview the HTML or Markdown output of one single content file. The following will add a filter to only generate the files matching a regular expression:

    @@ -5029,22 +5031,22 @@ http://www.gnu.org/software/src-highlite -->
    ./gemtexter --generate '.*hello.*'
     

    -

    Revamped git support


    +

    Revamped git support



    The Git support has been completely rewritten. It's now more reliable and faster too. Have a look at the README for more information.

    -

    Addition of htmlextras and web font support


    +

    Addition of htmlextras and web font support



    The htmlextras folder now contains all extra files required for the HTML output format such as cascading style sheet (CSS) files and web fonts.

    -

    Sub-section support


    +

    Sub-section support



    It's now possible to define sub-sections within a Gemtexter capsule. For the HTML output, each sub-section can use its own CSS and web font definitions. E.g.:

    The foo.zone main site
    The notes sub-section (with different fonts)

    -

    More


    +

    More



    Additionally, there were a couple of bug fixes, refactorings and overall improvements in the documentation made.

    @@ -5076,7 +5078,7 @@ http://www.gnu.org/software/src-highlite --> I was amazed at how easy it is to automatically generate and update Let's Encrypt certificates with OpenBSD.
    -

    Let's Encrypt with OpenBSD and Rex


    +

    Let's Encrypt with OpenBSD and Rex



    Published at 2022-07-30T12:14:31+01:00

    @@ -5109,7 +5111,7 @@ http://www.gnu.org/software/src-highlite -->
    I was amazed at how easy it is to automatically generate and update Let's Encrypt certificates with OpenBSD.

    -

    What's Let's Encrypt?


    +

    What's Let's Encrypt?



    Let's Encrypt is a non-profit certificate authority run by Internet Security Research Group that provides X.509 certificates for Transport Layer Security (TLS) encryption at no charge. It is the world's largest certificate authority, used by more than 265 million websites, with the goal of all websites being secure and using HTTPS.

    @@ -5117,7 +5119,7 @@ http://www.gnu.org/software/src-highlite -->
    In short, it gives away TLS certificates for your website - for free! The catch is, that the certificates are only valid for three months. So it is better to automate certificate generation and renewals.

    -

    Meet acme-client


    +

    Meet acme-client



    acme-client is the default Automatic Certifcate Management Environment (ACME) client on OpenBSD and part of the OpenBSD base system.

    @@ -5137,11 +5139,11 @@ http://www.gnu.org/software/src-highlite -->
  • Let's Encrypt then will contact the hostname for the certificate through a particular URL (e.g. http://foo.zone/.well-known/acme-challenge/...) to verify that the requester is the valid owner of the host.
  • Let's Encrypt generates a certificate, which then is downloaded to /etc/ssl/....

  • -

    Configuration


    +

    Configuration



    There is some (but easy) configuration required to make that all work on OpenBSD.

    -

    acme-client.conf


    +

    acme-client.conf



    This is how my /etc/acme-client.conf looks like (I copied a template from /etc/examples/acme-client.conf to /etc/acme-client.conf and added my domains to the bottom:

    @@ -5207,7 +5209,7 @@ domain snonux.land { }
    -

    httpd.conf


    +

    httpd.conf



    For ACME to work, you will need to configure the HTTP daemon so that the "special" ACME requests from Let's Encrypt are served correctly. I am using the standard OpenBSD httpd here. These are the snippets I use for the foo.zone host in /etc/httpd.conf (of course, you need a similar setup for all other hosts as well):

    @@ -5240,7 +5242,7 @@ server "foo.zone" {
    It is worth noticing that httpd will start without the certificates being present. This will cause a certificate error when you try to reach the HTTPS endpoint, but it helps to bootstrap Let's Encrypt. As you saw in the config snippet above, Let's Encrypt only requests the plain HTTP endpoint for the verification process, so HTTPS doesn't need to be operational yet at this stage. But once the certificates are generated, you will have to reload or restart httpd to use any new certificate.

    -

    CRON job


    +

    CRON job



    You could now run doas acme-client foo.zone to generate the certificate or to renew it. Or you could automate it with CRON.

    @@ -5318,11 +5320,11 @@ acme-client: /etc/ssl/irregular.ninja.fullchain.pem: certificate valid: 80 days acme-client: /etc/ssl/snonux.land.fullchain.pem: certificate valid: 79 days left
    -

    relayd.conf and smtpd.conf


    +

    relayd.conf and smtpd.conf



    Besides httpd, relayd (mainly for Gemini) and smtpd (for mail, of course) also use TLS certificates. And as you can see in acme.sh, the services are reloaded or restarted (smtpd doesn't support reload) whenever a certificate is generated or updated.

    -

    Rexification


    +

    Rexification



    I didn't write all these configuration files by hand. As a matter of fact, everything is automated with the Rex configuration management system.

    @@ -5334,7 +5336,7 @@ acme-client: /etc/ssl/snonux.land.fullchain.pem: certificate valid: 79 days left our @acme_hosts = qw/buetow.org paul.buetow.org tmp.buetow.org dtail.dev foo.zone irregular.ninja snonux.land/;
    -

    General ACME client configuration


    +

    General ACME client configuration



    ACME will be installed into the frontend group of hosts. Here, blowfish is the primary, and twofish is the secondary OpenBSD box.

    @@ -5486,7 +5488,7 @@ if [ $has_update = yes ]; then fi
    -

    Service rexification


    +

    Service rexification



    These are the Rex tasks setting up httpd, relayd and smtpd services:

    @@ -5714,7 +5716,7 @@ match from local for local action localmail match from local for any action outbound
    -

    All pieces together


    +

    All pieces together



    For the complete Rexfile example and all the templates, please look at the Git repository:

    @@ -5728,7 +5730,7 @@ rex commons
    The commons is a group of tasks I specified which combines a set of common tasks I always want to execute on all frontend machines. This also includes the ACME tasks mentioned in this article!

    -

    Conclusion


    +

    Conclusion



    ACME and Let's Encrypt greatly help reduce recurring manual maintenance work (creating and renewing certificates). Furthermore, all the certificates are free of cost! I love to use OpenBSD and Rex to automate all of this.

    @@ -6106,7 +6108,7 @@ v = 008 [v = p*c*(s != c ? 2 : 1)] Total logical CPUs Perl (the Practical Extraction and Report Language) is a battle-tested, mature, multi-paradigm dynamic programming language. Note that it's not called PERL, neither P.E.R.L. nor Pearl. 'Perl' is the name of the language and `perl` the name of the interpreter or the interpreter command.
    -

    Perl is still a great choice


    +

    Perl is still a great choice



    Published at 2022-05-27T07:50:12+01:00; Updated at 2023-01-28

    @@ -6126,7 +6128,7 @@ v = 008 [v = p*c*(s != c ? 2 : 1)] Total logical CPUs
  • Why use Perl as there are better alternatives?
  • Why all the sigils? It looks like an exploding ASCII factory!!

  • -

    Write-only language


    +

    Write-only language



    Is Perl really a write-only language? You have to understand that Perl 5 was released in 1994 (28 years ago as of this writing) and when we refer to Perl we usually mean Perl 5. That's many years, and there are many old scripts not following the modern Perl best practices (as they didn't exist yet). So yes, legacy scripts may be difficult to read. Japanese may be difficult to read too if you don't know Japanese, though.

    @@ -6152,7 +6154,7 @@ v = 008 [v = p*c*(s != c ? 2 : 1)] Total logical CPUs
    This all doesn't mean that you can't "get things done" with Perl. Quite the opposite is the case. Perl is a very pragmatic programming language and is suitable very well for rapid prototyping and any kind of small to medium-sized scripts and programs. You can write large enterprise scale application in Perl too, but that wasn't the original intend of why Perl was invented (more on that later).

    -

    Is Perl abandoned?


    +

    Is Perl abandoned?



    As I pointed out in the previous section, Perl 5 is around for quite some time without any new major version released. This can lead to the impression that development is not progressing and that the project is abandoned. Nothing can be further from the truth. Perl 5.000 was released in 1994 and the latest version (as of this writing) Perl 5.34.1 was released two months ago in 2022. You can check the version history on Wikipedia. You will notice releases being made regularly:

    @@ -6193,7 +6195,7 @@ v = 008 [v = p*c*(s != c ? 2 : 1)] Total logical CPUs
    Perl New Features

    -

    Why use Perl as there are better alternatives?


    +

    Why use Perl as there are better alternatives?



    Here, common sense must be applied. I don't believe there is anything like "the perfect" programming language. Everyone has got his preferred (or a set of preferred) programming language to chose from. All programming languages come with their own set of strengths and weaknesses. These are the strengths making Perl shine, and you (technically) don't need to bother to look for "better" alternatives:

    @@ -6222,7 +6224,7 @@ v = 008 [v = p*c*(s != c ? 2 : 1)] Total logical CPUs
    Cor - Bringing modern OOP to the Perl Core

    -

    Why all the sigils? It looks like an exploding ASCII factory!!


    +

    Why all the sigils? It looks like an exploding ASCII factory!!



    The sigils $ @ % & (where Perl is famously known for) serve a purpose. They seem confusing at first, but they actually make the code better readable. $scalar is a scalar variable (holding a single value), @array is an array (holding a list of values), %hash holds a list of key-value pairs and &sub is for subroutines. A given variable $ref can also hold reference to something. @$arrayref dereferences a reference to an array, %$hashref to a hash, $$scalarref to a scalar, &$subref dereferences a referene to a subroutine, etc. That can be encapsulated as deep as you want. (This paragraph only scratched the surface here of what Perl can do, and there is a lot of syntactic sugar not mentioned here).

    @@ -6230,7 +6232,7 @@ v = 008 [v = p*c*(s != c ? 2 : 1)] Total logical CPUs
    https://www.perl.com/article/on-sigils/

    -

    Where do I personally still use perl?


    +

    Where do I personally still use perl?



    • I use Rexify for my OpenBSD server automation. Rexify is a configuration management system developed in Perl with similar features to Ansible but less bloated. It suits my personal needs perfectly.
    • @@ -6431,7 +6433,7 @@ learn () { I have recently released DTail 4.0.0 and this blog post goes through all the new goodies. If you want to jump directly to DTail, do it here (there are nice animated gifs which demonstrates the usage pretty well):
      -

      The release of DTail 4.0.0


      +

      The release of DTail 4.0.0



      Published at 2022-03-06T18:11:39+00:00

      @@ -6453,9 +6455,9 @@ learn () {
      https://dtail.dev

      -

      So, what's new in 4.0.0?


      +

      So, what's new in 4.0.0?



      -

      Rewritten logging


      +

      Rewritten logging



      For DTail 4, logging has been completely rewritten. The new package name is "internal/io/dlog". I rewrote the logging because DTail is a special case here: There are logs processed by DTail, there are logs produced by the DTail server itself, there are logs produced by a DTail client itself, there are logs only logged by a DTail client, there are logs only logged by the DTail server, and there are logs logged by both, server and client. There are also different logging levels and outputs involved.

      @@ -6482,7 +6484,7 @@ const (
      DTail also supports multiple log outputs (e.g. to file or to stdout). More are now easily pluggable with the new logging package. The output can also be "enriched" (default) or "plain" (read more about that further below).

      -

      Configurable terminal color codes


      +

      Configurable terminal color codes



      A complaint I received from the users of DTail 3 were the terminal colors used for the output. Under some circumstances (terminal configuration) it made the output difficult to read so that users defaulted to "--noColor" (disabling colored output completely). I toke it by heart and also rewrote the color handling. It's now possible to configure the foreground and background colors and an attribute (e.g. dim, bold, ...).

      @@ -6598,7 +6600,7 @@ const ( jsonschema -i dtail.json schemas/dtail.schema.json
      -

      Serverless mode


      +

      Serverless mode



      All DTail commands can now operate on log files (and other text files) directly without any DTail server running. So there isn't a need anymore to install a DTail server when you are on the target server already anyway, like the following example shows:

      @@ -6614,7 +6616,7 @@ jsonschema -i dtail.json schemas/dtail.schema.json
      The way it works in Go code is that a connection to a server is managed through an interface and in serverless mode DTail calls through that interface to the server code directly without any TCP/IP and SSH connection made in the background. This means, that the binaries are a bit larger (also ship with the code which normally would be executed by the server) but the increase of binary size is not much.

      -

      Shorthand flags


      +

      Shorthand flags



      The "--files" from the previous example is now redundant. As a shorthand, It is now possible to do the following instead:

      @@ -6624,7 +6626,7 @@ jsonschema -i dtail.json schemas/dtail.schema.json
      Of course, this also works with all other DTail client commands (dgrep, dcat, ... etc).

      -

      Spartan (aka plain) mode


      +

      Spartan (aka plain) mode



      There's a plain mode, which makes DTail only print out the "plain" text of the files operated on (without any DTail specific enriched output). E.g.:

      @@ -6635,7 +6637,7 @@ jsonschema -i dtail.json schemas/dtail.schema.json
      This might be useful if you wanted to post-process the output.

      -

      Standard input pipe


      +

      Standard input pipe



      In serverless mode, you might want to process your data in a pipeline. You can do that now too through an input pipe:

      @@ -6650,7 +6652,7 @@ jsonschema -i dtail.json schemas/dtail.schema.json % awk '.....' < /some/file | dtail ....
      -

      New command dtailhealth


      +

      New command dtailhealth



      Prior to DTail 4, there was a flag for the "dtail" command to check the health of a remote DTail server (for use with monitoring system such as Nagios). That has been moved out to a separate binary to reduce complexity of the "dtail" command. The following checks whether DTail is operational on the current machine (you could also check a remote instance of DTail server, just adjust the server address).

      @@ -6661,7 +6663,7 @@ jsonschema -i dtail.json schemas/dtail.schema.json exec /usr/local/bin/dtailhealth --server localhost:2222
      -

      Improved documentation


      +

      Improved documentation



      Some features, such as custom log formats and the map-reduce query language, are now documented. Also, the examples have been updated to reflect the new features added. This also includes the new animated example Gifs (plus documentation how they were created).

      @@ -6675,7 +6677,7 @@ exec /usr/local/bin/dtailhealth --server localhost:2222

    That will be added in one of the future releases.

    -

    Integration testing suite


    +

    Integration testing suite



    DTail comes already with some unit tests, but what's new is a full integration testing suite which covers all common use cases of all the commands (dtail, dcat, dgrep, dmap) with a server backend and also in serverless mode.

    @@ -6696,7 +6698,7 @@ exec /usr/local/bin/dtailhealth --server localhost:2222 % go test -race -v ./integrationtests
    -

    Improved code


    +

    Improved code



    Not that the code quality of DTail has been bad (I have been using Go vet and Go lint for previous releases and will keep using these), but this time I had new tools (such as SonarQube and BlackDuck) in my arsenal to:

    @@ -6706,11 +6708,11 @@ exec /usr/local/bin/dtailhealth --server localhost:2222
    Other than that, a lot of other code has been refactored as I saw fit.

    -

    Use of memory pools


    +

    Use of memory pools



    DTail makes excessive use of string builder and byte buffer objects. For performance reasons, those are now re-used from memory pools.

    -

    What's next


    +

    What's next



    DTail 5 won't be released any time soon I guess, but some 4.x.y releases will follow this year fore sure. I can think of:

    @@ -7064,7 +7066,7 @@ GNU/kFreeBSD rhea.buetow.org 8.0-RELEASE-p5 FreeBSD 8.0-RELEASE-p5 #2: Sat Nov 2 This is the second blog post about my Bash Golf series. This series is random Bash tips, tricks and weirdnesses I came across. It's a collection of smaller articles I wrote in an older (in German language) blog, which I translated and refreshed with some new content.
    -

    Bash Golf Part 2


    +

    Bash Golf Part 2



    Published at 2022-01-01T23:36:15+00:00; Updated at 2022-01-05

    @@ -7085,7 +7087,7 @@ jgs^^^^^^^`^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2022-01-01 Bash Golf Part 2 (You are currently reading this)
    2023-12-10 Bash Golf Part 3

    -

    Redirection


    +

    Redirection



    Let's have a closer look at Bash redirection. As you might already know that there are 3 standard file descriptors:

    @@ -7217,7 +7219,7 @@ First line: Learn You a Haskell Second line: for Great Good
    -

    HERE


    +

    HERE



    I have mentioned HERE-documents and HERE-strings already in this post. Let's do some more examples. The following "cat" receives a multi line string from stdin. In this case, the input multi line string is a HERE-document. As you can see, it also interpolates variables (in this case the output of "date" running in a subshell).

    @@ -7300,7 +7302,7 @@ Learn you a Golang for Great Good I like Perl too
    -

    RANDOM


    +

    RANDOM



    Random is a special built-in variable containing a different pseudo random number each time it's used.

    @@ -7345,11 +7347,11 @@ Delaying script execution for 42 seconds... Continuing script execution...
    -

    set -x and set -e and pipefile


    +

    set -x and set -e and pipefile



    In my opinion, -x and -e and pipefile are the most useful Bash options. Let's have a look at them one after another.

    -

    -x


    +

    -x



    -x prints commands and their arguments as they are executed. This helps to develop and debug your Bash code:

    @@ -7391,7 +7393,7 @@ Second line: for Great Good ❯
    -

    -e


    +

    -e



    This is a very important option you want to use when you are paranoid. This means, you should always "set -e" in your scripts when you need to make absolutely sure that your script runs successfully (with that I mean that no command should exit with an unexpected status code).

    @@ -7510,7 +7512,7 @@ Hello You!
    ./2021-05-16-personal-bash-coding-style-guide.html

    -

    pipefail


    +

    pipefail



    The pipefail option makes it so that not only the exit code of the last command of the pipe counts regards its exit code but any command of the pipe:

    @@ -7720,7 +7722,7 @@ PAUL:X:1000:1000:PAUL BUETOW:/HOME/PAUL:/BIN/BASH This is the first blog post about my Bash Golf series. This series is about random Bash tips, tricks and weirdnesses I came across. It's a collection of smaller articles I wrote in an older (in German language) blog, which I translated and refreshed with some new content.
    -

    Bash Golf Part 1


    +

    Bash Golf Part 1



    Published at 2021-11-29T14:06:14+00:00; Updated at 2022-01-05

    @@ -7741,7 +7743,7 @@ jgs^^^^^^^`^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2022-01-01 Bash Golf Part 2
    2023-12-10 Bash Golf Part 3

    -

    TCP/IP networking


    +

    TCP/IP networking



    You probably know the Netcat tool, which is a swiss army knife for TCP/IP networking on the command line. But did you know that the Bash natively supports TCP/IP networking?

    @@ -7775,7 +7777,7 @@ X-Frame-Options: SAMEORIGIN
    You would assume that this also works with the ZSH, but it doesn't. This is one of the few things which don't work with the ZSH but in the Bash. There might be plugins you could use for ZSH to do something similar, though.

    -

    Process substitution


    +

    Process substitution



    The idea here is, that you can read the output (stdout) of a command from a file descriptor:

    @@ -7855,7 +7857,7 @@ foo bar baz
    Just think a while and see whether you understand fully what is happening here.

    -

    Grouping


    +

    Grouping



    Command grouping can be quite useful for combining the output of multiple commands:

    @@ -7922,7 +7924,7 @@ $ Expands to the process ID of the shell. In a () subshell, it expands to 1028739
    -

    Expansions


    +

    Expansions



    Let's start with simple examples:

    @@ -7979,7 +7981,7 @@ one:A one:B one:C two:A two:B two:C Linux-one:A-FreeBSD Linux-one:B-FreeBSD Linux-one:C-FreeBSD Linux-two:A-FreeBSD Linux-two:B-FreeBSD Linux-two:C-FreeBSD Linux-three:A-FreeBSD Linux-three:B-FreeBSD Linux-three:C-FreeBSD
    -

    - aka stdin and stdout placeholder


    +

    - aka stdin and stdout placeholder



    Some commands and Bash builtins use "-" as a placeholder for stdin and stdout:

    @@ -8030,7 +8032,7 @@ $ file - /dev/stdin: Perl script text executable
    -

    Alternative argument passing


    +

    Alternative argument passing



    This is a quite unusual way of passing arguments to a Bash script:

    @@ -8072,7 +8074,7 @@ paul:secret
    But the downside of it is that the variables will also be defined in your current shell environment and not just in the scripts sub-process.

    -

    : aka the null command


    +

    : aka the null command



    First, let's use the "help" Bash built-in to see what it says about the null command:

    @@ -8159,7 +8161,7 @@ bash: 1: command not found... 4
    -

    (No) floating point support


    +

    (No) floating point support



    I have to give a plus-point to the ZSH here. As the ZSH supports floating point calculation, whereas the Bash doesn't:

    @@ -8333,7 +8335,7 @@ bash: line 1: 1/10.0 : syntax error: invalid arithmetic operator (error token is A robust computer system must be kept simple and stupid (KISS). The fancier the system is, the more can break. Unfortunately, most systems tend to become complex and challenging to maintain in today's world. In the early days, so I was told, engineers understood every part of the system, but nowadays, we see more of the 'lasagna' stack. One layer or framework is built on top of another layer, and in the end, nobody has got a clue what's going on.
    -

    Keep it simple and stupid


    +

    Keep it simple and stupid



    Published at 2021-09-12T09:39:20+03:00; Updated at 2023-03-23

    @@ -8354,23 +8356,23 @@ bash: line 1: 1/10.0 : syntax error: invalid arithmetic operator (error token is
    A robust computer system must be kept simple and stupid (KISS). The fancier the system is, the more can break. Unfortunately, most systems tend to become complex and challenging to maintain in today's world. In the early days, so I was told, engineers understood every part of the system, but nowadays, we see more of the "lasagna" stack. One layer or framework is built on top of another layer, and in the end, nobody has got a clue what's going on.

    -

    Need faster hardware


    +

    Need faster hardware



    This not just makes the system much more complex, difficult to maintain and challenging to troubleshoot, but also slow. So more experts are needed to support it. Also, newer and faster hardware is required to make it run smoothly. Often, it's so much easier to buy speedier hardware than rewrite a whole system from scratch from the bottom-up. The latter would require much more resources in the short run, but in the long run, it should pay off. Unfortunately, many project owners scare away from it as they only want to get their project done and then move on.

    -

    Too complex to be replaced


    +

    Too complex to be replaced



    -

    On COBOL


    +

    On COBOL



    Have a look at COBOL, a prevalent programming language of the past. No one is learning COBOL in college or university anymore, but many legacy systems still require COBOL experts. Why is this? It's just too scary to write everything from scratch. There's too much COBOL code out there that can't be replaced from today to tomorrow.

    https://nymag.com/intelligencer/2020/04/what-is-cobol-what-does-it-have-to-do-with-the-coronavirus.html

    -

    On Kubernetes


    +

    On Kubernetes



    Now have a look at Kubernetes (k8s), the current trendy infrastructure thing to use nowadays. Of course, there are many benefits of using k8s (auto-scaling, reproducible deployments, dynamic resource allocation and resource sharing, saving of hardware costs, good commercial for potential employees as it is the current hot sauce of infrastructure). But all of this also comes with costs: You need experts operating the k8s cluster (or you need to pay extra for a managed cluster in the cloud), increased complexity of the system (k8s comes with a steep learning curve). The latter not only applies to the engineers managing the k8s cluster - it also applies to the software engineers, who now have to develop 'cloud native' applications and, therefore, have to change how they developed software how they used to. They all need to be re-educated on what cloud-native means, and they also need to understand the key concepts of k8s for writing optimal software for it.

    -

    The younger generation of IT professionals


    +

    The younger generation of IT professionals



    Maybe the younger generation knows all of this already after graduation, but then they are missing other critical parts of the system for sure. I have seen engineers who knew about containers and how to configure resource restrictions for a Docker container managed via k8s but have never heard the terms Linux control groups and Linux namespaces. So obviously, there is some knowledge gap of the underlying architecture. This can be a big problem when you have to troubleshoot such a system during a production incident and k8s adds a lot of abstraction to the mix which doesn't make it easier.

    @@ -8386,7 +8388,7 @@ bash: line 1: 1/10.0 : syntax error: invalid arithmetic operator (error token is
    https://christine.website/blog/theres-a-node-2021-10-02

    -

    The bloated web


    +

    The bloated web



    Another example is the modern web. Have you ever wondered why the internet becomes slower and slower nowadays? The modern web is so much like lasagna that I decided to use Gemini to be the primary protocol of my website. The HTML version of this website is just a fallback as many visitors don't know what Gemini is and don't have any compatible software installed for surfing the Geminispace:

    @@ -8394,7 +8396,7 @@ bash: line 1: 1/10.0 : syntax error: invalid arithmetic operator (error token is
    The Gemtext protocol is KISS. There's no way to do other formattings than headings, links, paragraphs, lists, quotes, and bare text blocks (e.g., ASCII art or code snippets). There's no way to create bloated Gemini sites, and due to its limited capabilities, there's also no way to commercialise it (e.g. there's no good way to track the site visitors as things like cookies don't exist). By design, the Gemini protocol can't be extended, so there is no chance to abuse it even in the future. Gemini sites will stay KISS forever, and there won't be any fancy HTML/JavaScript frameworks like we see on the modern web.

    -

    Fancy log-management solutions


    +

    Fancy log-management solutions



    Yet another example I want to bring up is DTail, the distributed log tail program I wrote. There are many great and fancy log-management solutions available to choose from, and they all seem complex to set up and maintain. The ELK stack, for example, requires you to operate an ElasticSearch cluster (or multiple, if you are geo-redundant), Logstash (different configurations and instances, depending on your infrastructure) and a Kibana web-frontend (which also needs to be highly available). I have operated ElasticSearch clusters on multiple occasions, and I must say that it is not an easy task to optimise it for the particular workload you might encounter. I also have seen many ES clusters operated by other people, and I have seen these clusters failing a lot (so it's not just me). The reduced complexity of DTail also makes it more robust against outages. You won't troubleshoot your distributed application very well if the log management infrastructure isn't working either.

    @@ -8402,27 +8404,27 @@ bash: line 1: 1/10.0 : syntax error: invalid arithmetic operator (error token is
    I don't say that the ELK stack doesn't work, but it requires experts and additional hardware resources to support it. But instead, if you keep your infrastructure simple (e.g. only use DTail), it will maintain pretty much by itself.

    -

    More KISS


    +

    More KISS



    -

    The Adslowbe PDF Reader


    +

    The Adslowbe PDF Reader



    Another perfect example is the Adobe PDF reader. How can it be that the inventor of the PDF format creates such a terrible user experience with its official reader? The reader is awful bloated, and slow. There are much better alternatives around (especially for Linux and other UNIX like operating systems, look at Zathura for example). I believe the reason Adobe's reader is like this is featuritis, and 90% of the users don't use 90% of all available features. Less is more; keep it simple and stupid.

    -

    The power of plain text files


    +

    The power of plain text files



    Speaking of file formats, never underestimate the power of plain text files. Plain text files don't require any special software to be opened, and they outlive the software which created them in the first place. You will still be able to read a plain text file on a modern computer system ten (or twenty) years from now, but you probably won't be able to read such an old version of an Adobe Photoshop image file if the software required for reading that format isn't supported anymore and doesn't run anymore on modern computers.

    -

    KISS for programmers


    +

    KISS for programmers



    Not to mention, keeping things simple and stupid also reduces the potential malicious attack surface. It's not just about the software and services you use and operate. It's also about the software you write. Here is a nice article about the KISS principle in software development:

    https://thevaluable.dev/kiss-principle-explained/

    -

    When KISS is not KISS anymore


    +

    When KISS is not KISS anymore



    There is, however, a trap. The more you spend time with things, the more these things feel natural to you and you become an expert. The more you become an expert, the more you introduce more abstractions and other clever ways of doing things. For you, things seem to be KISS still, but another person may not be an expert and might not understand what you do. One of the fundamental challenges is to keep things really KISS. You might add abstraction upon abstraction to a system and don't even notice it until it is too late.

    -

    Other relevant readings


    +

    Other relevant readings



    Is the madness ever going to end?
    Write plain text files
    diff --git a/gemfeed/index.html b/gemfeed/index.html index d40264f6..cf0ee563 100644 --- a/gemfeed/index.html +++ b/gemfeed/index.html @@ -8,9 +8,9 @@ -

    Gemfeed of foo.zone


    +

    Gemfeed of foo.zone



    -

    To be in the .zone!


    +

    To be in the .zone!



    2024-05-01 - 'Slow Productivity' book notes
    2024-04-01 - KISS high-availability with OpenBSD
    diff --git a/index.html b/index.html index af839a6b..50cd0877 100644 --- a/index.html +++ b/index.html @@ -8,9 +8,9 @@ -

    foo.zone


    +

    foo.zone



    -This site was generated at 2024-04-28T23:43:39+03:00 by Gemtexter
    +This site was generated at 2024-04-30T13:13:33+03:00 by Gemtexter

        |\---/|
    @@ -21,7 +21,7 @@
       (_,...'(_,.`__)/'.....+
     

    -

    Introduction


    +

    Introduction



    Welcome to the foo.zone. Everything you read on this site is my personal opinion and experience. You can call me a Linux/*BSD enthusiast and hobbyist. I mainly write about tech, IT, programming and sometimes also about self-improvement here. Note that this blog usually does not overlap with what I do at my day job as a Site Reliability Engineer.

    @@ -33,14 +33,14 @@
    Welcome to the Geminispace

    -

    Personal blog


    +

    Personal blog



    -

    Stay updated


    +

    Stay updated



    Subscribe to this blog's Atom feed
    Subscribe to this blog's Gemfeed

    -

    Posts


    +

    Posts



    2024-05-01 - 'Slow Productivity' book notes
    2024-04-01 - KISS high-availability with OpenBSD
    diff --git a/notes/a-monks-guide-to-happiness.html b/notes/a-monks-guide-to-happiness.html index 3187e8c4..d642ce73 100644 --- a/notes/a-monks-guide-to-happiness.html +++ b/notes/a-monks-guide-to-happiness.html @@ -8,11 +8,11 @@ -

    "A Monk's Guide to Happiness" book notes


    +

    "A Monk's Guide to Happiness" book notes



    Last updated 21.5.2023

    -

    Understanding Happiness


    +

    Understanding Happiness



    • Happiness is a skill we can train.
    • @@ -20,7 +20,7 @@
    • Feel free now. No urge about past and future.
    • We can learn to produce our own happiness independently of physical needs. When we walk in a park, how do we feel? We can train to reproduce that feeling independently.

    -

    The Role of Meditation


    +

    The Role of Meditation



    • Meditation is not about clearing your mind. A busy mind has nothing to do with interfering with your meditation.
    • @@ -30,7 +30,7 @@
    • Have a baseline for time to build up discipline.
    • We don't need to do anything about stress, just take a step back.

    -

    Managing Thoughts and Emotions


    +

    Managing Thoughts and Emotions



    • Our flow of emotions is really just habits. That can be changed through training, e.g., meditation training.
    • @@ -39,7 +39,7 @@
    • Thoughts are friends and not enemies.
    • Thoughts help the meditation as they make us notice that we wandered off, and therefore, we strengthen the reflection.

    -

    Practice and Discipline


    +

    Practice and Discipline



    • The importance of habits to practice mindfulness. Bring mindfulness into the daily practice.
    • @@ -49,7 +49,7 @@
    • Practice staying fully present in an uncomfortable situation and without judgement.
    • Don't become two persons who never meet: the meditator and the not meditator. So integrate mindfulness during the day too.

    -

    Perspectives on Relationships and Interactions


    +

    Perspectives on Relationships and Interactions



    • Who is the opponent? The other person. The things he said or our reactions to things? Forgiveness is a high form of compassion.
    • @@ -58,7 +58,7 @@
    • People don't have a masterplan to destroy others, even if it seems so. They are under strong bad influence by themselves. Something terrible happened to them. Revenge makes no sense.
    • Be grateful for people "trying" to hurt you as they help you to practice your path.

    -

    Reflective Questions


    +

    Reflective Questions



    • Why do I do all the things I do? What do I try to achieve?
    • @@ -67,7 +67,7 @@
    • What are the real causes of happiness and suffering?
    • What about meditation? How does that address the situation?

    -

    Miscellaneous Guidelines


    +

    Miscellaneous Guidelines



    • Posture is important as the mind and body are connected.
    • diff --git a/notes/career-guide-and-soft-skills.html b/notes/career-guide-and-soft-skills.html index e4edfe06..84f10f3a 100644 --- a/notes/career-guide-and-soft-skills.html +++ b/notes/career-guide-and-soft-skills.html @@ -8,7 +8,7 @@ -

      "Software Developmers Career Guide and Soft Skills" book notes


      +

      "Software Developmers Career Guide and Soft Skills" book notes



      Published at 2023-07-17T04:56:20+03:00

      @@ -26,9 +26,9 @@ '''
      -

      Improve


      +

      Improve



      -

      Always learn new things


      +

      Always learn new things



      When you learn something new, e.g. a programming language, first gather an overview, learn from multiple sources, play around and learn by doing and not consuming and form your own questions. Don't read too much upfront. A large amount of time is spent in learning technical skills which were never use. You want to have a practical set of skills you are actually using. You need to know 20 percent to get out 80 percent of the results.

      @@ -46,11 +46,11 @@
      Boot camps: The advantage of a boot camp is to pragmatically learn things fast. We almost always overestimate what we can do in a day. Especially during boot camps. Connect to others during the boot camps

      -

      Set goals


      +

      Set goals



      Your own goals are important but the manager also looks at how the team performs and how someone can help the team perform better. Check whether you are on track with your goals every 2 weeks in order to avoid surprises for the annual review. Make concrete goals for next review. Track and document your progress. Invest in your education. Make your goals known. If you want something, then ask for it. Nobody but you knows what you want.

      -

      Ratings


      +

      Ratings



      That's a trap: If you have to rate yourself, that's a trap. That never works in an unbiased way. Rate yourself always the best way but rate your weakest part as high as possible minus one point. Rate yourself as good as you can otherwise. Nobody is putting for fun a gun on his own head.

      @@ -58,7 +58,7 @@
    • Don't do peer rating, it can fire back on you. What if the colleague becomes your new boss?
    • Cooperate rankings are unfortunately HR guidelines and politics and only mirror a little your actual performance.

    -

    Promotions


    +

    Promotions



    The most valuable employees are the ones who make themselves obsolete and automate all away. Keep a safety net of 3 to 6 months of finances. Safe at least 10 percent of your earnings. Also, if you make money it does not mean that you have to spent more money. Is a new car better than a used car which both can bring you from A to B? Liability vs assets.

    @@ -71,7 +71,7 @@
  • If you want a raise be specific how much and know to back your demands. Don't make a thread and no ultimatums.
  • Best way for a promotion is to switch jobs. You can even switch back with a better salary.

  • -

    Finish things


    +

    Finish things



    Hard work is necessary for accomplish results. However, work smarter not harder. Furthermore, working smart is not a substitute for working hard. Work both, hard and smart.

    @@ -86,7 +86,7 @@
    Defeat is finally give up. Failure is the road to success, embrace it. Failure does not define you but how you respond to it. Events don't make your unhappy, but how you react to events do.

    -

    Expand the empire


    +

    Expand the empire



    The larger your empire is, the larger your circle of influence is. The larger the circle of influence is, the more opportunities you have.

    @@ -97,7 +97,7 @@
    Become visible, keep track that you accomplishments. E.g. write a weekly summary. Do presentations, be seen. Learn new things and share your learnings. Be the problem solver and not the blamer.

    -

    Be pragmatic and also manage your time


    +

    Be pragmatic and also manage your time



    Make use of time boxing via the Pomodoro technique: Set a target of rounds and track the rounds. That give you exact focused work time. That's really the trick. For example set a goal of 6 daily pomodores.

    @@ -107,7 +107,7 @@
    You should feel good of the work done even if you don't finished the task. You will feel good about pomodoro wise even you don't finish the task on hand yet. Helps you to enjoy time off more. Working longer may not sell anything.

    -

    The quota system


    +

    The quota system



    Defined quota of things done. E.g. N runs per week or M Blog posts per month or O pomodoros per week. This helps with consistency. Truly commit to these quotas. Failure is not an option. Start with small commitments. Don't commit to something you can't fulfill otherwise you set yourself up for failure.

    @@ -116,7 +116,7 @@
  • Internal motivation is more important over external motivation. Check out Daniels book drive.
  • Multitasking: Batching is effective. E.g. emails twice daily at pre-set times..

  • -

    Don't waste time


    +

    Don't waste time



    The biggest time waster is TV watching. The TV is programming you. It's insane that Americans watch so much TV as they work full time. Schedule one show at a time and watch it when you want to watch it. Most movies are crap anyways. The good movies will come to you as people will talk about them.

    @@ -125,7 +125,7 @@
  • Meetings can waste time as well. Simply don't go to them. Try to cancel meeting if it can be dealt with via email.
  • Enjoying things is not a waste of time. E.g. you could still play a game once in a while. It is important not to cut away all you enjoy from your life.

  • -

    Habits


    +

    Habits



    Try to have as many good habits as possible. Start with easy habits, and make them a little bit more challenging over time. Set ankers and rewards. Over time the routines will become habits naturally.

    @@ -135,7 +135,7 @@
  • We don't have control over our habits but our own routines.
  • Routines help to form the habits, though.

  • -

    Work-life balance


    +

    Work-life balance



    Avoid overwork hours. That's not as beneficial as you might think and comes only with very small rewards. Invest rather in yourself and not in your employer.

    @@ -147,7 +147,7 @@
    Use your most productive hours to work on you. Make that your priority. Take care of yourself a priority (E.g. do workouts or learn a new language). You can always workout 2 or 1 hour per day, but will you pay the price?

    -

    Mental health


    +

    Mental health



    • Friendships and positive thinking help to have and maintain better health, longer Life, better productivity and increased happiness.
    • @@ -158,7 +158,7 @@
      In most cases burnout is just an illusion. If you don't have motivation push through the wall. People usually don't pass the wall as they feel they are burned out. After pushing through the wall you will have the most fun, for example you will be able playing the guitar greatly.

      -

      Physical health


      +

      Physical health



      Utilise a standing desk and treadmill (you could walk and type at the same time). Increase the incline in order to burn more calories. Even on the standing desk you burn more calories than sitting. When you use pomodoro then you can use the small breaks for push-ups (maybe won't do as good when you are in a fasted state).

      @@ -170,7 +170,7 @@

    Intermittent fasting is an effective method to maintain weight and health. But it does not mean that you can only eat junk food in the feeding windows. Also, diet and nutrition is the most important for health and fitness. They make it also easier to stay focused and positive.

    -

    No drama


    +

    No drama



    Avoid drama at work. Where are humans there is drama. You can decide where to spent your energy in. But don't avoid conflict. Conflict is healthy in any kind of relationship. Be tactful and state your opinion. The goal is to find the best solution to the problem.

    @@ -186,13 +186,13 @@
    You have to learn how to work in a team. Be honest but tactful. It's not too be the loudest but about selling your ideas. Don't argue otherwise you won't sell anything. Be persuasive by finding the common ground. Or lead the colleagues to your idea and don't sell it upfront. Communicate clearly.

    -

    Personal brand


    +

    Personal brand



    • Invest your value outside the company. Build your personal brand. Show how valuable you are, also to other companies. Become an asset.
    • Invest in your education. Make your goals known. If you want something ask for it (see also the sections about goals in this document).

    -

    Market yourself


    +

    Market yourself



    • The best way to market yourself is to make you usable.
    • @@ -205,11 +205,11 @@
    • Have an elevator pitch: "buetow.org - Having fun with computers!"
    • Have social media accounts, especially the ones which are more tech related.

    -

    Networking


    +

    Networking



    Ask people so they talk about themselves. They are not really interested in you. Use meetup.com to find groups you are interested and build up the network over time. Don't drink on social networking events even when others do. Talking to other people at events only has upsides. Just saying "hi" and introducing yourself is enough. What worse can happen? If the person rejects you so what, life goes on. Ask open questions and no "yes" and "no" questions. E.g.: "What is your story, why are you here?".

    -

    Public speaking


    +

    Public speaking



    Before your talk go on stage 10 minutes in advance. Introduce yourself to the front row people. During the talk they will smile at you and encourage you during your talk.

    @@ -219,9 +219,9 @@
    Just do it. Just go to conferences. Even if you are not speaking. Sell your boss what you would learn and "this and that" and you would present the learnings to the team afterwards.

    -

    New job


    +

    New job



    -

    For the interview


    +

    For the interview



    • Build up a network before the interview. E.g., follow and comment blogs. Or go to meet-ups and conferences. Join user groups.
    • @@ -230,7 +230,7 @@

    If you are specialized then there is a better chance to get a fitting job. No one will hire a general lawyer if there are specialized lawyers available. Even if you are specialized, you will have a wide range of skills (T-shape knowledge).

    -

    Find the right type of company


    +

    Find the right type of company



    Not all companies are equal. They have individual cultures and guidelines.

    @@ -242,7 +242,7 @@
    Work in a tech. company if you want to work on/with cutting edge technologies.

    -

    Apply for the new job


    +

    Apply for the new job



    Get a professional resume writer. Get referrals of writers and get samples from there. Get sufficient with algorithm and data structures interview questions. Cracking the coding interview book and blog

    @@ -255,7 +255,7 @@
    Invest in your dress code as appearance masters. It does make sense to invest in your style. You could even hire a professional stylist (not my personal way though).

    -

    Negotiation


    +

    Negotiation



    • Whoever names the number first loses. You don't know what someone else is expecting unless told. Low ball number may be an issue but you have to know the market.
    • @@ -273,21 +273,21 @@
      • Never spilt the difference is the best book for learning negotiation techniques..

      -

      Leaving the old job


      +

      Leaving the old job



      When leaving a job make a clean and non personal as possible. Never complain and never explain. Don't worry about abandonment of the team. Everybody is replacement and you make a business decision. Don't threaten to quit as you are replaceable.

      -

      Other things


      +

      Other things



      • As a leader lead by example and don't lead from the Eiffel tower.
      • As a leader you are responsible for the team. If the team fails then it's your fault only.

      -

      Testing


      +

      Testing



      Unit testing Vs regression testing: Unit tests test the smallest possible unit and get rewritten if the unit gets changed. It's like programming against a specification n. Regression tests test whether the software still works after the change. Now you know more than most software engineers.

      -

      Books to read


      +

      Books to read



      • Clean Code
      • diff --git a/notes/index.html b/notes/index.html index 7ac947b8..3a7a1694 100644 --- a/notes/index.html +++ b/notes/index.html @@ -8,9 +8,9 @@ -

        Notes on foo.zone


        +

        Notes on foo.zone



        -

        To be in the .zone!


        +

        To be in the .zone!



        'The Stoic Challenge' book notes
        'The Pragmatic Programmer' book notes
        diff --git a/notes/influence-wihout-authority.html b/notes/influence-wihout-authority.html index f25a8766..196389bf 100644 --- a/notes/influence-wihout-authority.html +++ b/notes/influence-wihout-authority.html @@ -8,7 +8,7 @@ -

        "Influence without Authority" book notes


        +

        "Influence without Authority" book notes



        Last updated 28.4.2024

        @@ -16,7 +16,7 @@
        These are my personal notes, but maybe you will find them usefull too.

        -

        Building Relationships and Communication


        +

        Building Relationships and Communication



        • Make relationships before they are needed. A good reputation acts as a reserve for difficult times.
        • @@ -26,7 +26,7 @@
        • Present your thoughts in a more business-like manner, less personally.
        • In remote meetings, use structured agendas and keep webcams on for better focus and easier opening up via video call as it’s less intense with fewer external clues.

        -

        Managing Emotions and Conflicts


        +

        Managing Emotions and Conflicts



        • Downplay personal feelings and focus on the task.
        • @@ -34,7 +34,7 @@
        • Avoid blame as it's not helpful.
        • Handle conflicts by ensuring the other person feels they also won; aim for win-win situations.

        -

        Strategic Influence and Reciprocity


        +

        Strategic Influence and Reciprocity



        • Insist on what is important to you but may not be to others.
        • @@ -43,7 +43,7 @@
        • Recognize the hidden costs in exchanges and represent them when negotiating to ensure fair compensation.
        • Many people underestimate the "currencies" they can offer, like craftsmanship or teaching, to influence outcomes favorably.

        -

        Working with Management


        +

        Working with Management



        • Use your boss as a potential ally, seeing them as a partner.
        • @@ -53,14 +53,14 @@
        • Present new ideas to your boss only when they are well thought out and the benefits are clear.
        • The goal is to maintain a supportive work relationship with your boss as a partner, not to critique them. If alignment isn’t possible, consider moving on.

        -

        Adapting to Workplace Culture


        +

        Adapting to Workplace Culture



        • Early successes can lead to better cooperation within teams.
        • Adjust to company culture when asking for things.
        • Recognize that truly powerful people don't need to show off but address problems directly and empower others.

        -

        Diplomacy and Discretion


        +

        Diplomacy and Discretion



        • The three rules of being a diplomat: never tell a lie, never tell everything, and when in doubt, go to the bathroom.
        • diff --git a/notes/mental-combat.html b/notes/mental-combat.html index 0cac8b7d..c721808b 100644 --- a/notes/mental-combat.html +++ b/notes/mental-combat.html @@ -8,11 +8,11 @@ -

          "Mental Combat" book notes


          +

          "Mental Combat" book notes



          Last updated 29.5.2022

          -

          Mindfulness


          +

          Mindfulness



          We overthink everything. Apply mindfulness. Take a step back and recognize the conflict. Then analyse and react. Mindfulness is experiencing the moment without judgement. Mindfulness can combat all kind of mental issues such as stress for example. Don't think about the future and the past. Be in the now.

          @@ -25,13 +25,13 @@
        • Life will not slow down for you. You need to make your own priorities.
        • There is a difference between sport and exercise psychology. One is for competition, the other for exercise.

        -

        Motivation


        +

        Motivation



        Your mind sets limits not to self destruct your body. But there is always a buffer for emergency situations. It is possible to overcome the limits set by your mind. Motivation is everything. Without, you won't do things and will only dream. Or you will give up. Don't be externally motivated but by personal drive. Real training is though. The only way to succeed is motivation. Enjoy the process despite the pain and sweat. In order for this be internal motivated.

        If you are not motivated, reevaluate your goals. Is this the right sport for you? Find the inner fire.

        -

        Self esteem


        +

        Self esteem



        • Competitive anxiety can interfere with your performance Don't worry at the outcome but focus on the now, e.g. the correct move.
        • diff --git a/notes/mind-management.html b/notes/mind-management.html index ad869c3a..852a03da 100644 --- a/notes/mind-management.html +++ b/notes/mind-management.html @@ -8,7 +8,7 @@ -

          "Mind Management" book notes


          +

          "Mind Management" book notes



          Published at 2023-11-11T22:21:47+02:00

          @@ -32,11 +32,11 @@
        • The point of diminishing returns
        • The point of negative return

        -

        Empty slots in the calendar


        +

        Empty slots in the calendar



        If we do more things in less time and use all possible slots, speed read, etc., we are more productive. But in reality, that's not the entire truth. You also exchange one thing against everything else.... You cut out too much from your actual life.

        -

        When you safe time...


        +

        When you safe time...



        ...keep it.

        @@ -45,7 +45,7 @@
      • Creative thinking needs space. It will pay dividends tomorrow.
      • You will be rewarded with the "Eureka effect" - a sudden new insight.

      -

      Follow your mood


      +

      Follow your mood



      Ask yourself: what is my mood now? We never have the energy to do anything, so the better strategy is to follow your current mode and energy. E.g.:

      @@ -53,7 +53,7 @@
    • Didn't sleep enough today? Then, do simple, non-demanding tasks at work
    • Had a great sleep, and there is even time before work starts? Pull in a workout...

    -

    Boosting creativity


    +

    Boosting creativity



    The morning without coffee is a gift for creativity, but you often get distracted. Minimize distractions, too. I have no window to stare out but a plain blank wall.

    @@ -63,7 +63,7 @@
  • Don't race with time but walk alongside it as rough time lines.
  • Don't judge every day after the harvest, but the seed you lay

  • -

    The right mood for the task at hand


    +

    The right mood for the task at hand



    We need to try many different combinations. Limiting ourselves and trying too hard makes us frustrated and burn out. Creativity requires many iterations.

    @@ -77,7 +77,7 @@
    It gives you pleasure and is in a good mood. This increases creativity if you do what you want to do.

    -

    Creativity hacks


    +

    Creativity hacks



    • Coffee can cause anxiety.
    • @@ -88,7 +88,7 @@
    • Go to open spaces for creativity.
    • Go to closed spaces for polishing.

    -

    Planning and strategizing


    +

    Planning and strategizing



    Minds work better in sprints and not in marathons. Have a weekly plan, not a daily one.

    @@ -101,7 +101,7 @@
    You could schedule exploratory tasks when you are under grief. Sound systems should create slack for creativity. Plan only for a few minutes.

    -

    Fake it until you make it.


    +

    Fake it until you make it.



    • E.g. act calm if you want to be calm.
    • diff --git a/notes/never-split-the-difference.html b/notes/never-split-the-difference.html index 4d16275f..125e72bb 100644 --- a/notes/never-split-the-difference.html +++ b/notes/never-split-the-difference.html @@ -8,7 +8,7 @@ -

      "Never split the difference" book notes


      +

      "Never split the difference" book notes



      Published at 2023-04-01T20:00:17+03:00

      @@ -26,7 +26,7 @@ '''
      -

      Tactical listening, spreading empathy


      +

      Tactical listening, spreading empathy



      Be a mirror, copy each other to be comfy with each other to build up trust. Mirroring is mainly body language. A mirror is to repeat the words the other just said. Simple but effective.

      @@ -37,7 +37,7 @@

    Mirror training is like Jedi training. Simple but effective. A mirror needs space. Be silent after "you want this?"

    -

    Mindset of discovery


    +

    Mindset of discovery



    Try to have multiple realities in your mind and use facts to distinguish between real and false.

    @@ -49,7 +49,7 @@
    Try: to put a label on someone's emotion and then be silent. Wait for the other to reveal himself. "You seem unhappy about this?"

    -

    More tips


    +

    More tips



    • Put on a poker face and don't show emotions.
    • @@ -58,7 +58,7 @@
    • Being right is not the key to successful negotiation; being mindful is.
    • Be in the safe zone of empathy and acknowledge bad news.

    -

    "No" starts the conversation


    +

    "No" starts the conversation



    When the opponent starts with a "no", he feels in control and comfortable. That's why he has to start with "no".

    @@ -71,11 +71,11 @@
    Get a "That's right" when negotiating. Don't get a "you're right". You can summarise the opponent to get a "that's right".

    -

    Win-win


    +

    Win-win



    Win-win is a naive approach when encountering the win-lose counterpart, but always cooperate. Don't compromise, and don't split the difference. We don't compromise because it's right; we do it because it is easy. You must embrace the hard stuff; that's where the great deals are.

    -

    On Deadlines


    +

    On Deadlines



    • All deadlines are imaginary.
    • @@ -83,7 +83,7 @@
    • They push a deal to a conclusion.
    • They rush the counterpart to cause pressure and anxiety.

    -

    Analyse the opponent


    +

    Analyse the opponent



    • Understand the motivation of people behind the table as well.
    • @@ -93,7 +93,7 @@

    The person on the other side is never the issue; the problem is the issue. Keep this in mind to avoid emotional issues with the person and focus on the problem, not the person. The bond is essential; never create an enemy.

    -

    Use different ways of saying "no."


    +

    Use different ways of saying "no."



    I had paid my rent always in time. I had positive experiences with the building and would be sad for the landlord to lose a good tenant. I am looking for a win-win agreement between us. Pulling out the research, other neighbours offer much lower prices even if your building is a better location and services. How can I effort 200 more....

    @@ -101,7 +101,7 @@
    You always have to embrace thoughtful confrontation for good negotiation and life. Don't avoid honest, clear conflict. It will give you the best deals. Compromises are mostly bad deals for both sides. Most people don't negotiate a win-win but a win-lose. Know the best and worst outcomes and what is acceptable for you.

    -

    Calibrated question


    +

    Calibrated question



    Calibrated questions. Give the opponent a sense of power. Ask open-how questions to get the opponent to solve your problem and move him in your direction. Calibrated questions are the best tools. Summarise everything, and then ask, "how I am supposed to do that?". Asking for help this way with a calibrated question is a powerful tool for joint problem solving

    @@ -117,11 +117,11 @@
    Prepare 3 to 5 calibrated questions for your counterpart. Be curious what is really motivating the other side. You can get out the "Black Swan".

    -

    The black swan


    +

    The black swan



    What we don't know can break our deal. Uncovering it can bring us unexpected success. You get what you ask for in this world, but you must learn to ask correctly. Reveal the black swan by asking questions.

    -

    More


    +

    More



    Establish a range at top places like corp. I get... (e.g. remote London on a project basis). Set a high salary range and not a number. Also, check on LinkedIn premium for the salaries.

    diff --git a/notes/slow-productivity.html b/notes/slow-productivity.html index 72830b2e..dfbb108d 100644 --- a/notes/slow-productivity.html +++ b/notes/slow-productivity.html @@ -8,7 +8,7 @@ -

    "Slow Productivity" book notes


    +

    "Slow Productivity" book notes



    Published at 2024-04-27T14:18:51+03:00

    @@ -32,7 +32,7 @@
    "Slow productivity" does not mean being less productive. Cal Newport wants to point out that you can be much more productive with "slow productivity" than you would be without it. It is a different way of working than most of us are used to in the modern workplace, which is hyper-connected and always online.

    -

    Pseudo-productivity and Shallow work


    +

    Pseudo-productivity and Shallow work



    People use visible activity instead of real productivity because it's easier to measure. This is called pseudo-productivity.
    Pseudo-productivity is used as a proxy for real productivity. If you don't look busy, you are dismissed as lazy or lacking a work ethic.
    @@ -41,7 +41,7 @@
    Shallow work usually doesn't help you to accomplish big things. Always have the big picture in mind. Shallow work can't be entirely eliminated, but it can be managed—for example, plan dedicated time slots for certain types of shallow work.

    -

    Accomplishments without burnout


    +

    Accomplishments without burnout



    The overall perception is that if you want to accomplish something, you must put yourself on the verge of burnout. Cal Newport writes about "The lost Art of Accomplishments without Burnouts", where you can accomplish big things without all the stress usually involved.

    @@ -52,7 +52,7 @@
  • Work at a natural pace
  • Obsess over quality

  • -

    Do fewer things


    +

    Do fewer things



    There will always be more work. The faster you finish it, the quicker you will have something new on your plate.

    @@ -86,7 +86,7 @@
    Put tasks on autopilot (regular recurring tasks).

    -

    Work at a natural pace


    +

    Work at a natural pace



    We suffer from overambitious timelines, task lists, and business. Focus on what matters. Don't rush your most important work to achieve better results.

    @@ -102,7 +102,7 @@
    Schedule slow seasons (e.g., when on vacation). Disconnect in the slow season. Doing nothing will not satisfy your mind, though. You could read a book on your subject matter to counteract that.

    -

    Obsess over quality


    +

    Obsess over quality



    Obsess over quality even if you lose short-term opportunities by rejecting other projects. Quality demands you slow down. The two previous two principles (do fewer things and work at a natural pace) are mandatory for this principle to work:

    diff --git a/notes/staff-engineer.html b/notes/staff-engineer.html index 3f96addd..30220fa3 100644 --- a/notes/staff-engineer.html +++ b/notes/staff-engineer.html @@ -8,11 +8,11 @@ -

    "Staff Engineer" book notes


    +

    "Staff Engineer" book notes



    Last updated 10.8.2023

    -

    Not a faster Senior Engineer


    +

    Not a faster Senior Engineer



    • A Staff engineer is more than just a faster Senior.
    • @@ -26,7 +26,7 @@
      A Staff engineer is, like a Manager, a leader. However, being a Manager is a specific job. Leaders can apply to any job, especially to Staff engineers.

      -

      The Balance


      +

      The Balance



      The more senior you become, the more responsibility you will have to cope with them in less time. Balance your speed of progress with your personal life, don't work late hours and don't skip these personal care events.

      @@ -38,7 +38,7 @@
      Sebactical: Take at least six months. Otherwise, it won't be as restored.

      -

      More things


      +

      More things



      • Provide simple but widely used tools. Complex and powerful tools will have power users but only a very few. All others will not use the tool.
      • diff --git a/notes/the-obstacle-is-the-way.html b/notes/the-obstacle-is-the-way.html index a46c9d51..24b69d58 100644 --- a/notes/the-obstacle-is-the-way.html +++ b/notes/the-obstacle-is-the-way.html @@ -8,7 +8,7 @@ -

        "The Obstacle is the Way" book notes


        +

        "The Obstacle is the Way" book notes



        Published at 2023-05-06T17:23:16+03:00

        @@ -29,7 +29,7 @@
        "The obstacle is the way" is a powerful statement that encapsulates the wisdom of turning challenges into opportunities for growth and success. We will explore using obstacles as fuel, transforming weaknesses into strengths, and adopting a mindset that allows us to be creative and persistent in the face of adversity.

        -

        Reframe your perspective


        +

        Reframe your perspective



        The obstacle in your path can become your path to success. Instead of being paralyzed by challenges, see them as opportunities to learn and grow. Remember, the things that hurt us often instruct us.

        @@ -38,37 +38,37 @@ Don't always try to use the front door; a backdoor could open. It's nonsense. Don't fight the judo master with judo. Non-action can be action, exposing the weaknesses of others.


        -

        Embrace rationality


        +

        Embrace rationality



        It is a superpower to see things rationally when others are fearful. Focus on the reality of the situation without letting emotions, such as anger, cloud your judgment. This ability will enable you to make better decisions in adversity. Ability to see things what they really are. E.g. wine is old fermented grapes, or other people behaving like animals during a fight. Show the middle finger if someone persists on the stupid rules occasionally.

        -

        Control your response


        +

        Control your response



        You can choose how you respond to obstacles. Focus on what you can control, and don't let yourself feel harmed by external circumstances. Remember, you decide how things affect you; nobody else does. Choose to feel good in response to any situation. Embrace the challenges and obstacles that come your way, as they are opportunities for growth and learning.

        -

        Practice emotional and physical resilience


        +

        Practice emotional and physical resilience



        Martial artists know the importance of developing physical and emotional strength. Cultivate the art of not panicking; it will help you avoid making mistakes during high-pressure situations.

        Focus on what you can control. Don't choose to feel harmed, and then you won't be harmed. I decide things that affect me; nobody else does. E.g., in prison, your mind stays your own. Don't ignore fear but explain it away, have a different view.

        -

        Persistence and patience


        +

        Persistence and patience



        Practice persistence and patience in your pursuits. Focus on the process rather than the prize and take one step at a time. Remember, the journey is about finishing tasks, projects, or workouts to the best of your ability. Never be in a hurry and never be desperate. There is no reason to be rushed; there are all in the long haul. Follow the process and not the price. Take it one step at a time. The process is about finishing (workout, task, project, etc.).

        -

        Embrace failure


        +

        Embrace failure



        Failure is a natural part of life and can make us stronger. Treat defeat as a stepping stone to success and education. What is defeat? The first step to education. Failure makes you stronger. If we do our best, we can be proud of it, regardless of the result. Do your job, but do it right. Only an asshole thinks he is too good at the things he does. Also, asking for forgiveness is easier than asking for permission.

        -

        Be adaptable


        +

        Be adaptable



        There are many ways to achieve your goals; sometimes, unconventional methods are necessary. Feel free to break the rules or go off the beaten path if it will lead to better results. Transform weaknesses into strengths. We have a choice of how to respond to things. It's not about being positive but to be creative. Aim high, but stuff will happen; E.g., surprises will always happen.

        -

        Embrace non-action


        +

        Embrace non-action



        We constantly push to the next thing. Sometimes the best course of action is standing still or even going backwards. Obstacles might resolve by themselves. Or going sideways. Sometimes, the best action is to stand still, go sideways, or even go backwards. Obstacles may resolve themselves or present new opportunities if you're patient and observant. People always want your input before you have all the facts. They want you to play after their rules. The question is, do you let them? The English call it the cool head. Being in control of Stress; requires practice. Appear, the absence of fear (Greek). When all others do it one way, it does not mean it is the correct or best practice.

        -

        Leverage crisis


        +

        Leverage crisis



        In times of crisis, seize the chance to do things never done before. Great people use negative situations to their advantage and become the most effective in challenging circumstances.

        @@ -76,19 +76,19 @@
        Be prepared for nothing to work. Problems are an opportunity to do your best, not to do miracles. Always manage your expectations. It will suck, but it will be ok. Be prepared to begin from the beginning. Be cheerful and eagerly work on the next obstacle. Each time you become better. Life is not a sprint but a marathon. After each obstacle lies another obstacle, there won't be anything without obstacles. Passing one means you are ready for the next.

        -

        Build your inner citadel


        +

        Build your inner citadel



        Develop your inner strength during good times so you can rely on it in bad times. Always prepare for adversity and face it with calmness and resilience. Be humble enough that things which happen will happen. Build your inner citadel. In good times strengthen it. In bad times rely on it.

        We should always prepare for things to get tough. Your house burns down: no worries, we eliminated much rubbish. Imagine what can go wrong before things go wrong. We are prepared for adversity; it's other people who aren't. Phil Jackson's hip problem example. To receive unexpected benefits, you must first accept the unexpected obstacles. Meditate on death. It's a universal obstacle. Use it as a reminder to do your best.

        -

        Love everything that happens


        +

        Love everything that happens



        Turn an obstacle the other way around for your benefit. Use it at fuel. It's simple but challenging. Most are paralyzed instead. The obstacle in the path becomes the path. Obstacles are neither good nor bad. The things which hurt, instruct.

        Should I hate people who hate me? That's their problem and not mine. Be always calm and relaxed during the fight. The story of the battle is the story of the smile. Cheerfulness in all situations, especially the bad ones. Love for everything that happens; if it happens, it was meant to happen. We can choose how we react to things, so why not choose to feel good? I love everything that happens. You must never lower yourself to the person you don't like.

        -

        Conclusion


        +

        Conclusion



        Life is a marathon, not a sprint. Each obstacle we overcome prepares us for the next one. Remember, the obstacle is not just a barrier to be turned upside down; it can also be used as a catapult to propel us forward. By embracing challenges and using them as opportunities for growth, we become stronger, more adaptable, and, ultimately, more successful.

        diff --git a/notes/the-pragmatic-programmer.html b/notes/the-pragmatic-programmer.html index 453fc7fc..1c271f6f 100644 --- a/notes/the-pragmatic-programmer.html +++ b/notes/the-pragmatic-programmer.html @@ -8,7 +8,7 @@ -

        "The Pragmatic Programmer" book notes


        +

        "The Pragmatic Programmer" book notes



        Published at 2023-03-16T00:55:20+02:00

        @@ -59,7 +59,7 @@
        Do what works and not what's fashionable. E.g. does SCRUM make sense? The goal is to deliver deliverables and not to "become" agile.

        -

        Continuous learning


        +

        Continuous learning



        Add new tools to your repertoire every day and keep the momentum up. Learning new things is your most crucial aspect. Invest regularly in your knowledge portfolio. The learning process extends your thinking. It does not matter if you will never use it.

        @@ -70,7 +70,7 @@

      Think critically about everything you learn. Use paper for your notes. There is something special about it.

      -

      Stay connected


      +

      Stay connected



      It's your life, and you own it. Bruce Lee once said:

      @@ -83,7 +83,7 @@

    It's your life. Share it, celebrate it, be proud and have fun.

    -

    The story of stone soup


    +

    The story of stone soup



    How to motivate others to contribute something (e.g. ideas to a startup):

    diff --git a/notes/the-stoic-challenge.html b/notes/the-stoic-challenge.html index d0705d88..f19a3844 100644 --- a/notes/the-stoic-challenge.html +++ b/notes/the-stoic-challenge.html @@ -8,7 +8,7 @@ -

    "The Stoic Challenge" book notes


    +

    "The Stoic Challenge" book notes



    Last updated 29.5.2022

    @@ -22,7 +22,7 @@
    Stoics are thankful that they are mortal. As then you can get reminded of how great it is to be alive at all. In dying we are more alive we have ever been as every thing you do could be the last time you do it. Rather than fighting your death you should embrace it if there are no workarounds. Embrace a good death.

    -

    Negative visualization


    +

    Negative visualization



    It is easy what we have to take for granted.

    @@ -32,7 +32,7 @@
  • Now close your eyes for a minute and imagine you would be blind, so that you will never be able to experience the world again and let it sink in. When you open your eyes again you will feel a lot of gratefulness.
  • Last time meditation. Lets you appreciate the life as it is now. Life gets vitalised again.

  • -

    Oh, nice trick, you stoic "god"! ;-)


    +

    Oh, nice trick, you stoic "god"! ;-)



    Take setbacks as a challenge. Also take it with some humor.

    diff --git a/other-resources.html b/other-resources.html index cc7f9998..b814c5e4 100644 --- a/other-resources.html +++ b/other-resources.html @@ -8,7 +8,7 @@ -

    Other resources


    +

    Other resources



    Please go to:

    diff --git a/resources.html b/resources.html index 25dd9865..9ca2185b 100644 --- a/resources.html +++ b/resources.html @@ -8,7 +8,7 @@ -

    Resources


    +

    Resources



    Please go to:

    diff --git a/site-mirrors.html b/site-mirrors.html index d71b1da0..ab304ae2 100644 --- a/site-mirrors.html +++ b/site-mirrors.html @@ -8,13 +8,13 @@ -

    Site mirrors


    +

    Site mirrors



    This page summarizes all the mirrors of this site. Agreeably, that's all a bit overkill (given the importance of this internet presence), but I did it for fun.

    All sites listed below are reachable via IPv4 as well as via IPv6. Depending on the current master node, standby or master may be located in Amsterdam, Netherlands (OpenBSD.Amsterdam) or Falkenstein, Germany (Hetzner Cloud).

    -

    Gemini protocol


    +

    Gemini protocol




    gemini://foo.zone
    @@ -24,13 +24,13 @@
    Welcome to the Geminispace

    -

    HTTP protocol


    +

    HTTP protocol



    https://foo.zone
    https://standby.foo.zone
    https://www2.buetow.org - Codeberg page, somewhere in Germany

    -

    OpenBSD.Amsterdam


    +

    OpenBSD.Amsterdam



    Looking for opinionated OpenBSD VMs? Go to:

    diff --git a/testpage.html b/testpage.html index 39a16cc9..d1224374 100644 --- a/testpage.html +++ b/testpage.html @@ -8,16 +8,16 @@ -

    This is a test page!


    +

    This is a test page!



    A test page this is!

    Gefallen eigentum schuppen so ei feinheit. Gegen er kinde kenne mu se. Im zu sauber labsal werden en heraus sterne mu. Trostlos der das streckte gefallts ins tag begierig. Gebrauch eleonora horchend gedanken als ich befehlen. Geschirr manchmal an spateren hinunter es sichtbar er ri einander. Herkommen betrubtes einfacher es so am kreiselnd verwegene schnupfen.

    -

    Header 2 jo yay jo


    +

    Header 2 jo yay jo


    So argerlich gewachsen lohgruben lieblinge schranken an. Reinlich richtete hinunter einander herunter sog fur bezahlen den. Du stimme kohlen besser du. Im fu kiste en steht sagst zu sitte. Sog igen trug das noch. Barbieren schnupfen gescheite wu en. Ubelnehmen kindlichen des sog hoffnungen vom und aufgespart.

    -

    Header 3 jo yay jo


    +

    Header 3 jo yay jo


    Dessen mag lehren lassig der leuten. Wu wangen du husten da schlie ku gebaut. Fingern stunden lauernd schonen sonntag sie auf. Am hell lust habs in wohl sein kerl. Mudigkeit schreibet gar einfacher ehe schonheit. Feierabend dazwischen pa wahrhaftig launischen im es in. Ri em im drechslers wohnzimmer so messingnen nachmittag verrichtet vergnugter. Nachmittag werkstatte tag scherzwort bin uns verrichtet frohlicher ihm bescheiden.

    * Entry 1 jo yay jo
    @@ -85,7 +85,7 @@ X-Frame-Options: SAMEORIGIN
    Bar2

    -

    OK


    +

    OK



    ok

    diff --git a/uptime-stats.html b/uptime-stats.html index d4c1b750..e00e2c78 100644 --- a/uptime-stats.html +++ b/uptime-stats.html @@ -8,9 +8,9 @@ -

    My machine uptime stats


    +

    My machine uptime stats



    -This site was last updated at 2024-04-28T23:43:39+03:00
    +This site was last updated at 2024-04-30T13:13:33+03:00

    The following stats were collected via uptimed on all of my personal computers over many years and the output was generated by guprecords, the global uptime records stats analyser of mine.

    @@ -23,7 +23,7 @@
    Unveiling guprecords.raku: Uptime records with Raku

    -

    Top 20 Boots's by Host


    +

    Top 20 Boots's by Host



    Boots is the total number of host boots over the entire lifespan.

    @@ -54,7 +54,7 @@ +-----+----------------+-------+
    -

    Top 20 Uptime's by Host


    +

    Top 20 Uptime's by Host



    Uptime is the total uptime of a host over the entire lifespan.

    @@ -85,7 +85,7 @@ +-----+----------------+-----------------------------+
    -

    Top 20 Score's by Host


    +

    Top 20 Score's by Host



    Score is calculated by combining all other metrics.

    @@ -116,7 +116,7 @@ +-----+----------------+-------+
    -

    Top 20 Downtime's by Host


    +

    Top 20 Downtime's by Host



    Downtime is the total downtime of a host over the entire lifespan.

    @@ -147,7 +147,7 @@ +-----+----------------+-----------------------------+
    -

    Top 20 Lifespan's by Host


    +

    Top 20 Lifespan's by Host



    Lifespan is the total uptime + the total downtime of a host.

    @@ -178,7 +178,7 @@ +-----+----------------+-----------------------------+
    -

    Top 20 Boots's by KernelMajor


    +

    Top 20 Boots's by KernelMajor



    Boots is the total number of host boots over the entire lifespan.

    @@ -209,7 +209,7 @@ +-----+----------------+-------+
    -

    Top 20 Uptime's by KernelMajor


    +

    Top 20 Uptime's by KernelMajor



    Uptime is the total uptime of a host over the entire lifespan.

    @@ -240,7 +240,7 @@ +-----+----------------+------------------------------+
    -

    Top 20 Score's by KernelMajor


    +

    Top 20 Score's by KernelMajor



    Score is calculated by combining all other metrics.

    @@ -271,7 +271,7 @@ +-----+----------------+-------+
    -

    Top 20 Boots's by KernelName


    +

    Top 20 Boots's by KernelName



    Boots is the total number of host boots over the entire lifespan.

    @@ -286,7 +286,7 @@ +-----+------------+-------+
    -

    Top 20 Uptime's by KernelName


    +

    Top 20 Uptime's by KernelName



    Uptime is the total uptime of a host over the entire lifespan.

    @@ -301,7 +301,7 @@ +-----+------------+-----------------------------+
    -

    Top 20 Score's by KernelName


    +

    Top 20 Score's by KernelName



    Score is calculated by combining all other metrics.

    -- cgit v1.2.3