How to reboot Linux if systemd hangsup

Modern Linux Distributions have started using systemd.

Unfortunately, this initialization system is far far away from Unix philosophy. As result in some cases even reboot -f doesn't work.

Here is a workaround how to reboot even if systemd is hangsup:

echo 1 > /proc/sys/kernel/sysrq
echo b > /proc/sysrq-trigger