arundhaj

all that is technology

Moving folders between SVN repos

 

To move a folder or document between SVN repositories by retaining history, following steps would help.

Step I

Dump the entire svn repository to a dump file with svnadmin dump. If the repository is too big to dump, better pipe the next two commands. Command here is split in the …

getGeneratedKeys with PostgreSQL

 

In a complex SQL transaction where the tables are normalized and split, it becomes necessary to put primary key of first tables' insert as a foreign key of subsequent tables' inserts. Though java.sql.PreparedStatement have getGeneratedKeys, it works pretty different for PostgreSQL than MySQL.

The following code block shows …

GIT post receive hook

 

Whenever I make changes to my site, I end up doing lot of manual tasks deploying it to the production.

So I first moved the code to my self-hosted GIT server. This reduced most of the manual tasks, however deploying were still tedious.

This is where GIT's post-receive hook came …

HTTP 406 response from spring controller

 

On creating a @ResponseBody annotated spring controller that sends JSON, may lead to "406 Not Acceptable" response though the code/logic works fine.

The cause of this response is because, the controller cannot find the correct HTTPMessageConverter to satisfy the @ResponseBody annotated return value.

Check if, applicationContext.xml file has …

RIP Stephen R Covey

 

I am deeply saddened by the passing of Stephen R. Covey. His book "The 7 Habits of Highly Effective People" is one of the most influential and motivating book that has transformed my personal and work life into a breeze. I picked up this book when my work life was …

How to set source level in Maven projects

 

During developement... compiling or testing a maven project might lead to

error: generics are not supported in -source 1.3

Maven uses the 1.3 source setting as default, however it can be solved by explicitly mentioning the source level in project's pom.xml file.

<build>
 <plugins>
  <plugin>
   <groupId>org …

Custom style and script as plugin

 

My first ever wordpress plugin my-script-style. After migrating my blog to wordpress, I wanted to include my own stylesheet and script files to do customization. There were many references online to put the files into the theme folder and edit the header.php to include them. However, I found that …

Resize VirtualBox hard disk

 

Ever tried to increase the VirtualBox hard disk space?

I am running Ubuntu 12.04 as my guest OS on Windows 7 host with VirtualBox 4.1.16. To start with, I created a 8GB VDI as a dynamically allocated storage, so that I consume space only for what I …