Und dann waren wir wieder Fremde…

Wir waren Fremde.
Wurden Freunde und mehr als das.
Gesucht und gefunden…

Herzen berührt,
als Eins gefühlt.
Es war schön, sehr schön.

Aber irgendwann änderte es sich,
es wurde kompliziert…

Irgendwann zu kompliziert,
und es brach in zwei.

Und dann konnten wir nicht mal mehr Freunde sein.
Und heute sind wir wie Fremde.
Wieder Fremde…

Posted in Nachdenklich, out of my life | Leave a comment

Debian Wheezy, Atom N2800 and graphic

I recently upgraded some debian installations to the currently newest Version (wheezy).
While most of the upgrades went very smooth, I ran into some trubles updating a system running on a Intel Atom Board.
As I reboted the mentiond system to boot the new kernel the VGA signal droped.

In the end it seems to be a bug in the 'gma500_gfx' module witch caused the Graphic-Blackout.
After blacklisting the mentiond modul, it worked again as it should.

Posted in Technik | Tagged , , , , , | 1 Comment

`cat` as a shell builtin

Recently i blogged about how to get a process list if you aren’t able to fork any processes . Also a process list is allways handy, i allways find cat a very usefull tool too. But as you might have noticed cat is not a shell builtin. So everytime cat is called a new process needs to be forked. In case you can’t fork processes it’s a problem, and even if you can fork them you may save resources by “creating” a shell builtin cat.
So lets do this,
open your .profile for usage with your user only or /etc/profile for global usage (You may also use your .bashrc or .zshrc instead).
Append the following lines to the file:

#pseudo bash builtin cat function
function cat { echo “$(< $1)" }

Siehe Kommentar :)

function cat {
  if [ $# -eq 1 -a "${1:0:1}" != "-" ]
  then
    exec 3< "${1:-/dev/stdin}"
    while read -r -u3 line
    do
      echo -E ''"${line}";
    done
    echo -nE ''"${line}";
    exec 3<&-
    else
     /bin/cat "$@"
fi
}

Voila, if you start a new loginshell the cat should refer to a shell function and not to a binary.
(to test this simply type type cat result should be something like cat is a shell function )

Posted in Allgemein, Technik | Tagged , , | 2 Comments

Shortcut to lock the screen on a mac

Sometimes i don’t want to put my macbook air asleep because of some job that is running. But i have to leave the room so i need to lock it.
So there is a shortcut for locking the screen:

Shift+Crtl+Eject

This works on the most macs, but the macbook air has no Eject button on the Keyboard. So on systems without an Eject button you have to use:

Shift+Crtl+Power

Posted in Allgemein, Technik | Tagged , , , | 1 Comment

How to get a process list if you can’t fork any processes?

Recently I got the question what to do if one got a bash session but can’t fork processes on a Linux system.
So here is an attempt to get a processlist just by using bash buildins:

OLDPWD=$PWD
cd /proc
for x in [0-9]*
do
read cmd < /proc/${x}/comm
read cmdl < /proc/${x}/cmdline
printf "%8s - %15s - %s" $x $cmd $cmdl
echo
done
cd $OLDPWD
Posted in Pastes, Technik | Tagged , , , | Leave a comment