Opening multiple files in vim (using bash)

Who does not know the problem? One is browsing through the file system and wants to open all files in vim, which have a specific file extension. For example you want to open all JAVA files of the current directory and all of its subdirectories. Here is a simple bash-based solution using the find-command :

vim -p `find -name \*java -type f`
Advertisements

Packages needed to install gtk2hs on ubuntu

When trying to install Gtk2Hs I wonder which Debian packages are required before using cabal to install gtk. So here is my little personal reminder:

sudo apt-get install libglib2.0-dev libgio2.0-cil-dev libcairo2-dev libpango1.0-dev libgtk2.0-dev

One might also want to install glade and gtksourceview:

sudo apt-get install libglade2-dev libgtksourceview2.0-dev 

After installing these packages one can easily install gtk2hs via cabal:

cabal install gtk2hs-buildtools
cabal install gtk

kworker and watchdog taking CPU power

After installing the daily update on my Lenovo T61 and rebooting the system, I had some strange issues with the kernel processes kworker and watchdog. Either kworker or watchdog took about 60% of the CPU power. Unfortunately switching back to an older kernel version did not fix it. Thus after searching the web, I found out that this problem is related to the network connection (see [1] for details). Since I am using wifi to connect, I disabled my ethernet interface by

ifconfig eth0 down

, which solved the problem.

I know this is not a general solution to this problem, but it may help wifi-only users as I am.

[1] : https://bugs.launchpad.net/ubuntu/+source/linux/+bug/717919