Monthly Archives: August 2010

EtherPad: live collaborative text editing

Ever thought that it would be cool to just collaborate with others while writing a document? Well ok, there are wikis but I mean real-time. Not that it’s new or anything (google docs, wave), but EtherPad recently became one of my favorites for this (thanks to Andreas Wagner).

It’s a no login website, you just need the URL and can start. You can host EtherPad yourself if you don’t trust the server.

It’s a great tool for brainstorming in a group (no more poor guy having to log everything, simply add it yourself), writing down some thoughts, coordinating things in a very interactive way.

Mozilla put up a public EtherPad, just try it here and don’t miss the cool time-slider.

Bash prompt indicating return value

Lately I’ve fiddled a lot with installing virtuoso on some virtual machines and found myself repeatedly asking bash for the return value of the last command echo $?. I remembered this blog post by Gecko quite a while ago and tuned it a bit to my needs. My user prompt now looks like this (it’s a slightly modified version of the old gentoo defaults, that I prefer over the ubuntu defaults, which only remind you that you’re root with a # instead of a $):

The code for the user prompt:

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m]u@h\[\033[00m]:\[\033[01;34m]w $(if [[ $? = 0 ]];then echo "\[\033[01;34m]";else echo "\[\033[01;31m]";fi)$ \[\033[00m]'

And the root prompt:

PS1='\[\033[01;31m]h\[\033[01;34m] W $(if [[ $? = 0 ]];then echo "\[\033[01;34m]";else echo "\[\033[01;31m]";fi)$\[\033[00m] '

And a small doc snippet you might want to include with your PS1 in your .bashrc, so you can still understand that cryptic stuff in a few days:

# h hostname
# u user
# w working dir (home == ~)
# $ a $ if UID == 0 else #
# A current 24-time: HH:MM
# \ a 
# [ begin, ] end of non-printing (control chars)
#
# colors: have to be surrounded by: '\[\033[' and 'm]' (without the ''. These literally are the left and right bracket!)
#  color codes are as follows, preceeded by a '0;' (dark) (default) or a '1;' (light)
#  FG and BG NULL: 00 resets
#  FG: 30 + ... 0: black, 1: red, 2: green, 3: yellow, 4: blue, 5: violet, 6: cyan, 7: white
#  BG: 40 + ... same

P != NP solved?

Well, it happens every now and then, that someone finds a proof for a long standing theoretical problem.
This time it’s the famous P = NP or P != NP problem of computer science that Gecko pointed me to:

Let’s wish him luck that his proof is flawless and accepted.
(Who’s the first one to say: “I’ve always known it” ? :D)

Sadly my wishes didn’t help :-/

WTFPL

Thanks to Ralf I came across this really nice license today. If you’ve ever been lost in the licensing jungle of any software, you’ll understand:
The WTFPL (Homepage includes a nice FAQ section as well ;)):

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
                    Version 2, December 2004 

 Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> 

 Everyone is permitted to copy and distribute verbatim or modified 
 copies of this license document, and changing it is allowed as long 
 as the name is changed. 

            DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE 
   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 

  0. You just DO WHAT THE FUCK YOU WANT TO.