Wednesday, March 31, 2010

Set time on Linux

Simple use
date MMDDhhmm[YYYY]
# date 033115082010
# date
Wed Mar 31 15:08:02 CEST 2010
Never use it but configure NTP instead.

Monday, March 29, 2010

Simple Apache Rewrite: Add a folder to subdomain's root

Make sure you have activated the rewrite module. For example: Add the module to the APACHE_MODULES in /etc/sysconfig/apache2.

To redirect all to add this to your configuration (e.g., in your vhost declaration):

RewriteEngine on
RewriteCond %{HTTP_HOST} ^mysub\.mosbase\.com$
RewriteRule ^/$ /start/ [PT,L]

Sunday, March 28, 2010

Install latest Version of Subversion on Ubuntu

I thought it would be as simple as "apt-get install subversion" to install an updated version of Subversion. But I was mislead. Using Ubuntu 8.04 (Hardy) only the ageing SVN version 1.4.6 was available in the official repository.

First try:
Adding Hardy's Backport-Repository (deb hardy-backports main) into the /etc/apt/sources.list. Slightly better but far away from perfect: Version 1.5.1 was installed.

I was wondering: Is there a way to install the latest version of SVN without compiling the source distribution? Ubuntu is very widespread and SVN likewise. There needs to be a binary version of SVN 1.6.9 out there... So I googled but failed. Instead I found some up-to-date RPM packages.

At the end I decided to take those RPM packages and convert them into DEB packages.
This worked fine for me:

* Download Red Hat packages at:
* Installation as follows:
apt-get install alien
root@dev:/install/subversion# alien --version
alien version 8.69
alien CollabNetSubversion-client-1.6.9-1.x86_64.rpm
alien CollabNetSubversion-server-1.6.9-1.x86_64.rpm
dpkg -i collabnetsubversion-client_1.6.9-2_amd64.deb
dpkg -i collabnetsubversion-server_1.6.9-2_amd64.deb

vi /etc/environment
root@dev:~# echo $PATH
root@dev:~# svn --version
svn, version 1.6.9 (r901367)
   compiled Jan 24 2010, 16:38:33

Tuesday, March 23, 2010

Common Eclipse Startup Arguments

Working with more than one workspace, the following runtime parameters make life easier:

eclipse.exe -vm \software\jdk1.6.0_21\bin\javaw -data \workspaces\project1_space -showlocation -vmargs -Xms1024m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m

  • -vm: Explicitly specify which Java VM to use when running Eclipse
  • -data: Location of the workspace.
  • -showlocation: Displays the location of the workspace in the window title bar. Very useful if you have more than one workspace opened.
  • -vmargs X... : Used to increase memory (the example above is for Sun's/Oracle's JVM). Use the "jconsole" command to verify your needs for a specific workspace.

The argument "-clean" is handy if you face some configuration problems or need to restart Eclipse in consequence of a crash.

Note: You can also specify those parameters in the eclipse.ini. But then you are not able to apply them for each workspace individually.

Sunday, March 21, 2010

Grails Tutorial, Book & Interview

I'm an excited user of the Grails framework. In the past I was lucky enough to get some payed Grails projects. This enabled me to work full-time with Grails and getting a deep understanding of the technology.

To give something back, I decided to publish some Grails stuff. If you are interested in Grails you may look at one of the following:

Creating & Customizing a Blogger Blog

Since Blogger is very easy to setup and still allows great individual customization, I decided creating my Blog this way.
Here is a short summary what I did for customization:

What? How?
Create the Blog Just register to Blogger, choose a subdomain and assign a layout to your Blog.
Personally I prefer a template with fluid width (like Denim). It's very annoying if you own a great screen with 1920x1200 and the website just shows the content in a fixed width of 800px for example .
In addition use the ordinary Blogger functions (e.g. Gadgets) for creating your basic page elements
Remove Blogger's NavBar The NavBar at the top of the page takes too much space and is not necessary. Anyway it has one useful feature: The search field which implements a full-text search on your Blog. So I decided to hide the NavBar per default and make it visible if you move the mouse on the top of the page. Check the following post for a how-to (doesn't work for IE): Toggle NavBar
Customize HTML/CSS My next step was customizing the HTML/CSS to achieve a custom look & feel. Blogger allows you to change and extend every part of the HTML/CSS of your blog. You only need to have some basic understanding of CSS. ;)
In specific I changed the header, some colors, margins, background, list-elements.
Block Paragraphs I defined a new CSS class for presenting block paragraphs:

<pre class="simpleCode">
Tables The chosen Blogger layout doesn't have any table styling. I did it on my own. While editing you need to create a HTML table as follows and you see a table like the one around.

<th> ... </th>
<th> ... </th>
<td> ... </td>
<td> ... </td>
Source Code For sure there will be some source-code on this blog. I decided to integrate the SyntaxHighlighter to allow code formatting like this:
// some Groovy list operations
List myList = ['a','b','c','d','e']
if (myList.size()<6) {
    myList << 'f'
assert ['A','B','C','D','E','F'] == myList*.toUpperCase()
It's easy to integrate this into your Blogger's HTML/CSS definition (check the installation documentation at SyntaxHighlighter). Finally all you have to do is specifing a tag like:

<pre class="brush: groovy">

Starting Blogging on MosBase

No Blog, no Twitter, no Facebook, just a business WebSite at and a humble profile on Xing. Till today that's all I've done for the "publicity" about my person on the Net.
There are two good reasons for that:

  • There is a lack of time for twittering, blogging or facebooking steadily about my person. (There may be a lack of interest also.)
  • In this regard I'm a little old-school:   My private things should stay private and therefore are only accessible in non-public areas on the Net.  

Nevertheless:  I'm a programmer and technical project-manager in professional life. Even in my spare-time I spend a significant time on exploring technical issues or interesting business ideas around the Internet.
So I decided some months ago to publish a kind of knowledge-base that collects some experience, tips, ideas and insides of mine. I had a specific idea and planned to write a software for this which possibly would become open source. And yes, MosBase should be the place for this.
But as time went by, my priorities changed:
First of all my lovely little son arrived.

As you expect certainly, a big part of my spare-time is now about him. In addition I currently develop a new version of, which will become a kind of "Videothek" (video-store) for my family. Sure, it's non public.

Second a nice idea for a new social-web-site popped into my head. I plan to start the realization at the end of this year. So hoping this website will see the light of day in 2011. In future more about this new project here .....

Thus I decided to make MosBase a classic Blog. This should replace my knowledge-base initially.