node fun

September 19th, 2015 No comments

$ node
> "5" + "1"
> "5" - "1"

Categories: Uncategorized Tags:

Lmod and Sudo: ‘module: command not found’

September 11th, 2015 No comments

Recently, I switched from Environment Modules to Lmod because of … reasons. I really like it so far but one thing annoyed me a bit. When executing sudo -s which is one of my usual workflows, my shell reports:

module: command not found

The reason is simple: sudo dumps most of the users environment with some exceptions, due to env_reset in /etc/sudoers, when spawning the new non-login shell. Specifically the last fact causes the trouble since Lmod is activated by sourcing the proper file on (login-)shell startup. In my case (following the Lmod docs) there is a soft link in /etc/profile.d pointing to /usr/share/lmod/lmod/init/profile.

My first attempts to modify the env_keep list in /etc/sudoers didn’t work, because the module command itself is set as a shell function which AFAIK cannot be handled by that list of kept variables.

from the shell environment:

BASH_FUNC_module%%=() { eval $($LMOD_CMD bash “$@”);
[ $? = 0 ] && eval $(${LMOD_SETTARG_CMD:-:} -s sh)

$ type module
module is a function
module ()
eval $($LMOD_CMD bash “$@”);
[ $? = 0 ] && eval $(${LMOD_SETTARG_CMD:-:} -s sh)

So I saw no other solution but adding the following code snippet to my /etc/bash.bashrc

if [ -z "$LMOD_CMD" ]; then
. /etc/profile.d/

This will test if there is a LMOD_CMD environment variable set. If not, it will source the proper file to activate Lmod.

Feel free to post if there are better solution! Cheerio!

Retro Thinkpad Survey

July 28th, 2015 No comments

For those of you who haven’t already heard: Lenovo launched a survey to recreate a Thinkpad like in the good old days, when design followed function and not the other way around.

Categories: hardware, nerdcore Tags: ,

Früher haben sich die Spammer wenigstens noch Mühe gegeben

July 8th, 2015 No comments
Guten Tag {var_s_fullname},

mehr als 70 Euro pro Monat muss eine Krankenversicherung...

Categories: fun Tags:

Shell One-liner: psgrep

July 6th, 2015 2 comments

When I want to find out specific process information, I usually use ps aux | grep PATTERN. There are several drawbacks, but the most annoying one for me are the missing coloumn headlines. Therefore, I made this little alias and put it into my global bash.bashrc file:

alias psgrep=’ps u | head -n 1; ps aux | grep -v grep | grep’

This enables a psgrep command which can be used like grep (since that is exactly what it is).



Maybe some of you know an even better way? Cheerio!

Categories: bashism, linux Tags: ,

Phone Book Backup Ubuntu Phone (Aquaris E 4.5)

April 25th, 2015 No comments

If you have an Ubuntu Phone, like the Aquaris E4.5 from BQ. You can backup your contacts the following way:

  1. Install the “Terminal” app from Ubuntu Core App Developers
  2. Open the app and type: syncevolution --export /home/phablet/Documents/utcontacts.vcf backend=evolution-contacts
  3. Connect phone to computer, copy the vcf from Documents

Do not follow the instructions on this website. The sudo leads to an “[ERROR] creating source registry: Cannot autolaunch D-Bus without X11 $DISPLAY”, while the “database=Personal” leads to “[ERROR] database not found: ‘Personal'”

Intel Intrinsics Guide

April 1st, 2015 No comments
Categories: software Tags: , , ,

Ars Hacker Movie Madness

March 8th, 2015 1 comment

Categories: Uncategorized Tags:

Leonard Nimoy 1931-2015

February 27th, 2015 No comments

A life is like a garden. Perfect moments can be had, but not preserved, except in memory. LLAP

Categories: cultural Tags:

News Server

February 24th, 2015 No comments


i moved the blog (which is more of an archive of the good ol’ times these days) to a new server. Lets see if everyhting still works . . .

Categories: Uncategorized Tags: