The ADM-3A leaving it’s mark

Did you ever ask yourself, why on *NIX-Systems your home directory has the shortcut tilde (~)? Or why on the text editor vim the cursor could not only be moved by the arrow keys but also via H, J, K and L? Why not W, A, S and D, which today is famous as it is used by many games? Well I often did ask myself, but never actually tried to find out why. I had my explanation for H, J, K, L, as they lie on the home row of the keyboard, thus allowing fast movement.

One might think that H, J, K and L an idiosyncrasy of vi/vim, but when you look carefully you find other software that use the same keys for moving: Rouge, Hack and NetHack – the predecessors of Diablo use HJKL. Also the C Shell (csh) and it’s improved and today still popular version TENEX C-Shell (tcsh) can be controlled by H, J, K and L. The most recent tools are the web interfaces from Gmail and Google Labs – as well as the browser Pentadactyl. Of course, for the later tools it’s more convenience than a historical cause. But regarding vim, by accident I just now found out why these keys are used – and why the tilde is the shortcut for the home directory on *NIX systems.

Continue reading

Oh look, it’s a tschu-tschu train!

Dieses kleine aber feine Tar-Paket mit dem kleinen, aber feinen 225 Zeichen langen C-Programm herunter laden, Entpacken, in das Verzeichnis wechseln, Make ausführen, dann das entstehende Binary starten, und sich freuen wie ein kleines Kind

[Ja, es ist spät und ich sitze noch an Uni-Krams, da darf man sich auch mal über alberne Sachen freuen].

Hier noch mal zum in die Konsole pasten (einfach mit dem zweiten Symbol oben rechts im folgenden Sourcecode-Fenster kopieren, und in einer Konsole einfügen, sollte funktionieren 😉 ):

tar xvf sl.tar
cd sl

Lässt sich auch wunderbar mit allen möglichen Flags für den Befehl ls kombinieren (wie praktisch 😉 ). Mein Favorit: sl -asl, dann gibt es sogar Passagiere 😀

Für alle die gerade unglücklicher Weise keine Konsole zur Hand haben:

[Linux] pydf

I guess you’ll all know the tool df(1). As it is one of the standard tools (included in packages like GNU Core Utils or BuissyBox) every Linux installation will propably include a df application.

Now, there’s another tool, called pydf(1) (py, because it’s written in python1). What makes it different to df, is that it uses ASCII art to visualize the output of df. So you have progress bars showing you how full your hardrives are. Also it uses colors, which is pretty nice. You could define trasholds so for instance everything over 80% usage is shown in yellow and everything over 90% usage is shown in red. pydf offers a lot of customization options regarding the look of the information. The customization can be done globaly via /etc/pydfrc, or you just create ~/.pydfrc and have your local individual setup. The config file is well commented so you won’t need any additional information.

What it lacks though, is a way to narrow down the information shown (I’d rather like to just see my physical partitions, i.e. root, home and boot) – but anyhow, df lacks that possibility as well. I guess I’ll just have to write a little script to cut off all the not-needed information.

pydf in action

pydf in action

Still, it’s a pretty neat tool. I already added

alias df='pydf'

to my ~/.bashrc 😉

1 I once tried out to write some programs in python as this language is said to be a powerfull and clean language. This of course might be true (powerfull, because in Python you can use object oriented, aspect orientend and functional programming paradigma; clean, because Python uses indentation to structure text, not brackets, as most of the other languages do), but if you ever have to read a really large programm, where the identation was chosen to be three spaces, you’ll propably end up like me, throwing it all away, and never use it again 😉