Skip to content

Nice color scheme - Solarized

Being bored of "green on black", "black on yellow" ... give Solarized a chance. Ethan Schoonover did great work with that color scheme. It is a mixture of 16 colors, which harmonize perfect. I switched every editor, terminal and IDE I am using to Solarized, great. Many thx Ethan.

Go get it



Preview -> stolen from Ethans page (mea culpa but I like that ;-) )

Meld, a nice visual diff tool

Project page: http://meldmerge.org/


This nice tool has three aspects, file, directory diff and version control view. At my gnome desktop I'll replaced the shell diff via alias with meld.

Get the current version via
git clone http://git.gnome.org/browse/meld

So this is nice to get deeper into python coding ;-)

Make a short break while watching 'tail -f whatever'

I am a fast reader, really fast but often I have to look through log files running thousand of lines per minute, even if I grep for specific strings. To make it a little bit easier just make a break in the stream: use CTRL S, to continue with the output stream CTRL Q.

some bash tricks

Extract local tgz file at another host via ssh

cat data.tgz | ssh user@host "cd /wherever/you/wanna/go; tar xzf -"

Get line numbers where the pattern matches

sed -n '/[aA]/=' /etc/passwd

See differences when using watch

watch -n2 -d 'df -h'

Print inode informations

df -i

How many CPU are inside

grep 'model name' /proc/cpuinfo | wc -l

Send message to another users tty

write user [tty]text blablub

Which users have access to a specified hard drive?

lsof /dev/sda2 | awk '{print $3}' | uniq

Which users have access to files of a specified dir?

lsof +D Dokumente/ | awk '{print $3}' | uniq

Which processes have access to files of a specified dir?

lsof +d /verzeichnis

Add a user withou a home dir and no shell

useradd -d /dev/null -s /bin/false username

Show me your .bashrc

#------------------------------------------
# Source global definitions
#------------------------------------------
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

#------------------------------------------
# Activate bash tab completion
#------------------------------------------
if [ -f /etc/bash_completion ]
then
 . /etc/bash_completion
fi

#------------------------------------------
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
#------------------------------------------
HISTCONTROL=ignoredups:ignorespace

#------------------------------------------
# User specific aliases and functions
#------------------------------------------
alias gcc='gcc -ggDb -Wall -o'
alias mv='mv -i'
alias cd..='cd ..'
alias grepn='grep -n'
alias df='df -h'
alias timestamp='date "+%Y%m%d%H%M%S"'
alias mkdir='mkdir -p'
alias ll='ls -l'
alias grep='grep --color=auto'
alias svim='sudo vim'

#------------------------------------------
# Easy encryption/decryption
#------------------------------------------
function enc() { openssl enc -aes-256-cbc -a -salt -in "$1" -out "$1.enc"; }
function dec() { openssl enc -d -aes-256-cbc -a -in "$1.enc" -out "$1"; }

#------------------------------------------
# Easy extract and make tgz
#------------------------------------------
extract () {
  if [ -f $1 ] ; then
      case $1 in
          *.tar.bz2)   tar xvjf $1    ;;
          *.tar.gz)    tar xvzf $1    ;;
          *.bz2)       bunzip2 $1     ;;
          *.rar)       rar x $1       ;;
          *.gz)        gunzip $1      ;;
          *.tar)       tar xvf $1     ;;
          *.tbz2)      tar xvjf $1    ;;
          *.tgz)       tar xvzf $1    ;;
          *.zip)       unzip $1       ;;
          *.Z)         uncompress $1  ;;
          *.7z)        7z x $1        ;;
          *)           echo "don't know how to extract '$1'..." ;;
      esac
  else
      echo "'$1' is not existing, yo bastard!"
  fi
}

mktgz() { tar cvzf "${1%%/}.tgz"  "${1%%/}/"; }

#------------------------------------------
# dirsize - finds directory sizes and lists them for the current directory
#------------------------------------------
dirsize (){
    du -shx * .[a-zA-Z0-9_]* 2> /dev/null | \
    egrep '^ *[0-9.]*[MG]' | sort -n > /tmp/list
    egrep '^ *[0-9.]*M' /tmp/list
    egrep '^ *[0-9.]*G' /tmp/list
    rm -rf /tmp/list
}

#------------------------------------------
# Some path exports
#------------------------------------------
# export JAVA_HOME JDK/JRE
export JAVA_HOME="/usr/java/latest"

# export GO
export PATH=$PATH:/usr/local/go/bin

Currently watching...

The last mohican

The scene at the plateau is incredible thrilling. A fantastic song from Trevor Horn when Unca is killed by Magua, Cora jumps down, Chingachgook kills Magua - just incredible. And even more incredible the scene after, suddenly no sound, Chingachgook and Hawkeye say farewell to the fallen.

Not the best movie at all but good, I like it.

setup @ home

desktop
- intel i5, 8gb ram, 2 tb sata, 128gb ssd, windows 7, ubuntu 11.10

laptop (mostly working with that so this crap has to be updated soon)
- intel core 2 duo, 4gb ram, 160 gb sata, fedore core 16

netbook
- burns around my bed with ubuntu 11.10 installed

eee box
- test server with ubuntu 10.04 lts server

vserver1
- intel x3430@2.40ghz, 2gb ram, debian squeeze

vserver2
- same as above but with centos 6.2

Hi Leon

01.01.2012, 03:35 - break of New Year's Eve ... straight to the hospital and directly to the maternity room.
15:14 - Hi Leon, welcome son.

Daniela was wearied by the birth but okay, Leon as well.

After three days at the hospital I fetched both of them and brought them home. Now I'm mastering my diaper changing skills ;-)




New Car

Last week Dani and me searched for a new car as our old one is really old (215k km driven). First we thought about a more practical car as we expect our first kid in december. So we looked for some estates or mini vans but as we saw them in front of us we were realistic enough as we have a really poky subterranean garage. So we looked for some normal cars and finally found this Ford Focus and after a test drive we bought it. Tomorrow we will get it.

Ford Focus

What? Where is the old blog? Am I right?

Don't panic, this url still belongs to me but my old blog and stuff bothered me. So deleting the old blog, wiping out about 500 blog entries and download stuff and such things really alleviates me.
For the future I'll reduce the entries to IT-related topics but with a few personal things occasionally. Mostly this is not to forget things - so increase brain memory ;-)
Furthermore the blog would be now in english to improve my skills.

rm -rf blog/
mysql -u admin -p *******
DROP DATABASE s9y;
CREATE DATABASE s9y;
STRG D
tar xfz serendipity.tgz
w3m http://groesch.net
...
write blog

cheers