Tuning Java Garbage Collection

An excellent article detailing how to tune the garbage collector on for Java 1.5
http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html

Improve IntelliJ IDEA performance on Linux

A colleague recently referred me to this article, detailing how to increase the speed of indexing in IDEA on Linux.

http://blogs.jetbrains.com/idea/2010/04/native-file-system-watcher-for-linux/

Remove files excluding pattern

Delete all files from a directory, excluding a particular pattern.
rm `ls | grep -v ‘txt$’`
where txt is the pattern you want to preserve

Edit blocks in vi

# When deleting blocks of text, move to the first line of the block, type ma to mark it, then move to the last line of the block and type d’a to delete the block.
# Use the above trick with y’a to yank blocks of text.

Set Home in Cygwin

To set the HOME directory for Cygwin simply set the HOME environment variable in Windows.

slf4j configuration

slf4j can be configured using a log4j configuration file. In order for this to happen you need to have slf4j-log4j.jar and log4j.jar files in your classpath. If you are using log4j-1.2.15, you will need slf4j-log4j12-1.5.10.

Once you have these jars, you can set the logging level of classes using slf4j logging using the usual log4j configuration properties file.

Merging SVN Branches in IntelliJ IDEA 8

See this blog entry for help merging SVN branches with IntelliJ IDEA 8
http://rjohnshields.com/blog/?p=118

Find text across multiple files

To find some a string you know exists in an XML file under the current directory somewhere you can use a command like this.

In this example searching for ‘wake_up_bob’ across multiple XML (ant) files:

find . -name ‘*.xml’ -type f -exec grep -H -n wake_up_bob {} \;

Change SVN working copy format

Ubuntu 8 does not come with an svn client for subversion 1.6.
To downgrade svn to version 1.5, which is available on Ubuntu 8, use the following info

http://subversion.tigris.org/faq.html#working-copy-format-change

Use the script as follows:
usage: change-svn-wc-format.py WC_PATH SVN_VERSION [--verbose] [--force] [--skip-unknown-format]

Remove SVN Directories

To recursively remove svn configuration directories issue the following command:

rm -rf `find . -type d -name .svn`