Change directory command that learns

The autojump command does just that, it learns. But if you are looking for AI or ML then move on, nothing to see here. Autojump can be used as a substitute for the cd change directory command. It can make CLI usage more flexible if you adapt it. This entry is about the autojump configuration for the zsh shell.

Install autojump using emerge:

user % emerge -va autojump

A post installation notification is displayed at the end of the installation routine , showing a configuration example for the fish shell:

read more

FRRouting appears in portage

After the FRRouting project forked quagga, back then quagga was the most advanced dynamic routing software suite available at the time for linux. There is also BIRD internet routing daemon, it is used at many european IX's mostly due to its stable BGP implementation. BIRD supports most important routing protocols. After the FRRouting project released the 6 major versions of its software, version 7.5 of frr is appeared in portage, Result of an eix search on a gentoo system:

user % emerge -va frr

These are the packages that would be merged, in order:

Calculating dependencies ... done! [ebuild N ] acct-group/frr-0::gentoo 0 KiB [ebuild N ] acct-user/frr-0::gentoo 0 KiB [ebuild N ~] net-libs/libyang-1.0.184::gentoo USE='-doc' 1,621 KiB [ebuild N ] dev-python/ipaddr-2.2.0-r1::gentoo PYTHON_TARGETS='python3_8 -python3_7' 26 KiB [ebuild N ~] net-misc/frr-7.5::gentoo USE='ipv6 pam -doc -fpm -grpc -nhrp -ospfapi -rpki -snmp -systemd -test' PYTHON_SINGLE_TARGET='python3_8 -python3_7' 6,573 KiB

Total: 5 packages (5 new), Size of downloads: 8,220 KiB

FRR project continues the previous work of Quagga. FRR supports a big amount of dynamic routing protocols that have not been there before, some exotic and interesting examples:

At the beginning of 2018 Clarence Filsfils talked about the implementation status of segment routing and reported that he and his team project participants received huge support from the networking community. The segment routing implementation in FRRouting is still in an early phase. Additionally it is implemented for both routing protocols OSPF and in IS-IS at same time. The SRv6 arrived already in current used stable linux kernels versions, there was a lack of a control plane for the Segment Routing Protocol. FRRouting now fills the gap. Here is an nice overview of the current RFC compliance in its implementation.

FRRouting is a powerful dynamic routing protocol package for linux. Check out some netlab using FRRouting software, Try to build own suckless FRRouting GNS3 guest using alpine linux. You will not find this appliance the GNS marketplace.

Git drop last local commit

How to undo the last local commit using git, which has not been pushed to the repository?

For example following is seen using the git log command. Use -2 option to view last 2 commits:

user@host ~ % git log -2
commit 2 (HEAD -> master)
Author: larry <larry@example.net>
Date:   Wed Jan 27 22:10:03 2021 +0100

   BAD commit. Last commit. It is called 'HEAD'

commit 1 (origin/master)
Author: larry <larry@example.net>
Date:   Wed Jan 27 21:15:37 2020 +0100

   GOOD commit. Second to last  commit. This has the desired state.

Latest commit, commit number 2 is the commit that is not wanted. It should not be pushed into the repository. Commit number 1 has the desired state. This is the version that is wanted.

To restore everything back to the state it was prior to the last commit it is needed to reset to the commit to before HEAD:

Using the git reset --soft if changes made should be kept:

user % git reset --soft HEAD^

Use the --hard option changes to the files are not wanted and should be dropped:

user % git reset --hard HEAD^

Now git log will show that our last commit has been removed. Use again the git log command to view the current state:

user % git log