Hugo, Asciidoctor & PlantUML

PlantUML is a great markup language for creating (not only) UML diagrams. Let’s try and make this tool work with Hugo + Asciidoc. Asciidoctor has an asciidoctor-diagram package in its toolset. This package should add support not only for PlantUML but also for GraphViz and other graphing markups. Cool. Asciidoctor-diagram was installed when setting up the platform, covered in the previous article If you try to add a simple PlantUML diagram now, you will probably get an empty picture.
Read more →

Beauty of Lambdas

I came across an interesting kata on Codewars. Let’s discuss the solution a little bit.
Read more →

Autowiring a Spring Bean from External JAR

About importing an external library containing a Spring Bean into a project
Read more →

Sudo su vs sudo -i

If you ever wondered, sudo su and sudo -i are not exactly the same. sudo suCalls sudo with command su, i.e. Bash is called as interactive non-login shell. It executes only .bashrc and you remain in the same directory.sudo su -Logs in as super user, i.e. /etc/profile, .profile and ``.bashrc`are executed and you are logged in to root’s home directory with root’s environment.sudo -i-i = simulate initial login. The manpage for sudo says:
Read more →

Silent pushd and popd in Bash Scripts

I have several shell scripts that use pushd and popd extensively. These commands output the paths to stdout which may overwhelm the console output with lots of unwanted text. Unfortunately, neither pushd nor popd have any silent option according to their man pages. A simple solution is to redirect the stdout to /dev/null. pushd $PWD > /dev/null Is it favourable to explicitly redirect to /dev/null everytime I call pushd/popd in the script?
Read more →