B/W Rainbow

September 20, 2008

SVN: Export only updated files between 2 revisions


Are you someone like me who is looking for an SVN command that exports the files updated between two revisions? Until now, I used to say that there is no such command available in SVN by default, or maybe now they have a feature to build in the next release.

Don’t lose hope. After having a hard time searching for an out of the box solution, I built my own with power of PHP 😉 what else?

The scenario

  • Working with a team that uses SVN for versioning.
  • Your production server doesn’t have svn, so you can’t run the command svn update. Even if you have svn in your production server and your stupid system admin denied to open svn port of your dev server over firewall for security reasons(Believe me, it happens I wrote more than 10 email to my system admin, and I can’t make him understand why we need this port to be open.
  • You need to upload the changes frequently and you have a very large list of directories which need to be chmod to 777 if you prefer uploading all again or,  you don’t keep the files uploaded to the server in Dev (e.g. user images, videos are uploaded in the server are not required in Dev)
  • All you need is to upload the files which are updated after the previous build. It is not so easy if you have too many directories of hierarchy (or using a PHP Framework like me. i.e., controller, models, views, app etc.,) 


  • What does svn log do?
    It’s a command svn to list the files updated and other information in a revision or between two revisions, when you run the command “svn log -rM:N -v” (M,N are two revision numbers) in your working copy directory. You need the output of this command to provide the input for the script.
  • A working copy. (HEAD checkout from your Repo)
  • A directory with “chmod 0777″ for the script to copy only the updated files for upload. 


The Script

  • You can download the source here.
  • View source here.
  • Try the demo



September 6, 2008

Google Chrome : Hybrid of all


  • Webkit as rendering engine like Safari
  • Tabstyles are from Flock
  • Startup page similar to Opera speed-dial and Flock myhome page
  • Paste and go in the address bar like Opera
  • No menu bar like IE 7
  • Tab-to-window and vice versa from Opera/Safari
  • Incognito browsing similar to Private Browsing
  • Create Application Shortcuts like Mozilla Prism


What’s new in Google Chrome


  • No two separate textboxes for URL and for Search
  • Every tab is a separate process
  • Innovative Search, composite of Tortoise Merge (any Textdiff app), Firefox’s (Highlight All) findbox positioned similar to Safari
  • Built-in support for Google Gears
  • Above all its from the giant Google

September 5, 2008


In one of our recent project, we were looking for an automated script that update the working copy of our dev server as soon as someone commit the changes to the SVN.

We were using a Linux server (Fedora) to integrate all the modules developed by almost 15+ developers. I learnt a valuable lesson from the projects in the recent past, it is not so easy to integrate all the modules developed by a team at the end of the project. So I suggested my team that integrating modules while developed would be the best thing (from my exp. anyway ).

Our Dev server running SVN and LAMPP, all we need is an automated script that updates the working copy of our application which resides in htdocs of LAMPP as soon as someone commit their changes, so that they can easily identify the issues as soon as someone commit the conflicts. And also it would be really easy for us to show the demo of the app. at any to the client (i.e., No integration headache at the time of the call).

PHP: the right tool?

As usual I wrote a script in php to run the SVN UPDATE command with PHP exec() function. Oops!! It doesn’t work as expected.


$ret = exec(‘svn update /opt/lampp/htdocs’, $ret2, $ret3);
echo  $ret;


I stumbled Google to know what’s wrong with this code. It returns the following valuable results.

I finally have come to a conclusion that PHP is not the precise tool for the task. So “How did you achieve? Which is the best tool to achieve this?”

I can’t say which one is the best, but this is how I automate the task.

SVN has a feature built-in called hook which is designed specifically to do similar tasks. Don’t know why I’m hearing hooks frequently now-a-days (Drupal uses hooks, Joomla 1.5 uses hooks, hooks! hooks!! hooks!!! )


  • Create a file in C to run the command “svn update“. In my case the file was svn_update.c in /bin.
  • svn_update.c

#include <stddef.h>
#include <stdlib.h>
#include <unistd.h>
int main(void) {

execl("/usr/bin/svn", "svn", "update", "/opt/lampp/htdocs/ ", (const char *) NULL);



  • Compile the file with the following command “gcc svn_update.c -o svn_update
  • Create a file called “post-commit” in the hooks directory of your SVN repository:
  • post-commit

# #!/bin/sh

  •          Chmod your post-commit with the following command “chmod 0755 post-commit

That’s all you have to do, now SVN will do the rest. You can download the files, svn_update.c and post-commit here.


Apache SVN @  http://www.sematopia.com/?p=218

Alternate to C @ http://forum.webfaction.com/viewtopic.php?id=964

Mighty C code @ http://forum.webfaction.com/viewtopic.php?pid=216#p216

September 3, 2008

Google Chrome : The application failed to initialize properly (0xc0000005)


The application failed to initialize properly (0xc0000005).

Click on OK to terminate the application


Symantec causes this issue and the temp. solution is to disable the sandbox. And the solution from Google Groups is 


You can try running Google Chrome with --no-sandbox (you need to edit the properties of the shortcut you use to launch it).


More links: 

Issues : https://groups.google.com/group/google-chrome-help/search?q=&start=0&scoring=d&enc_author=LjzA1TIAAACxnAQgd0s-x2NJHdBMCj1kX8-qliYfOMJi0wlpwfQxL7SnwL2ldEkDZ3UGY4Fi834vPp-8dun_mzBPI6iup1z0&

Solution 1 : https://forums.symantec.com/syment/board/message?board.id=endpoint_protection11&thread.id=15816

Solution 2 : http://code.google.com/p/chromium/issues/detail?id=38#c26




  • I wrapped “--no-sandbox” in CODE tag now to resolve WP double hypen to emdash conversion.
  • Symantec is not the only known source to this issue.
  • To know more about what is sandbox? Please try the pages 25,26 on the book http://www.google.com/googlebooks/chrome/

July 19, 2008

Sticky notes with PHP and Jquery

Script speaks louder than words. Please go through the following links

PHP Gd based Sticky script

Jquery UI based Sticky page

The first script is used to create a dynamic sticky image with the selected sticky pattern and font.
The second script is an example to use the dynamic sticky to implement a sticky dashboard kindof application, it uses jquery UI for drag-n-drop feature.

Script is almost 1 yr old so, with that said updates are welcome.

Download PHPSticky from GoogleCode

October 25, 2007

Play YouTube with FLV player of your choice

Filed under: general,PHP,tools — Palani raja @ 9:34 am
Tags: , ,

Not working anymore, but you are free to explore the code. Updates are welcome.

I have completed alternative way to view YouTube videos with FLV player of your choice (JW FLV player in this case). The flv files will not be download to the server, it streams directly from YouTube .


Download Source


I have updated the script for 2 reasons

  1. Youtube deny if you call the url with file_get_contents() which is replaced with a curl function. So it needs curl now.
  2. Youtube added more http headers and now the index for direct download link is 8 earlier it was 4.

I will update the script soon with the following features

  • No need of allow_url_fopen = on in php.ini
  • Curl dependency to be removed.

July 24, 2007

Tamil.net links xTamil tool

Filed under: general,tools — Palani raja @ 9:45 am

I’m overwhelmed with happiness after I saw my Google analytics report today. This blog and the new tool which I wrote xTamil – English to Tamil convertor (Unicode) are linked in a Tamil portal site Tamil.net. They also list numerous no. of phonetic English to Tamil Unicode convertor, I promise you all that my tool will be unique after the completion (will take a month or two).


I would like to thank all of my friends for their encouragement. And also for the guys out there in Tamil.net for posting my tool in their site.

Thank you friends 🙂

July 23, 2007

English to Tamil convertor (Unicode)

Filed under: கவிதை,general,javascript,tools — Palani raja @ 9:45 am

Atlast, I finished my first verison of English to Tamil unicode convertor(Transliterater). What I planned to do was bit different than the one which is available now. Hope I will get the time to upgrade my unicode convertor( or Transliterater) to unique tool within a month.

check the demo here : xTamil

Use IE if you are not sure whether you enabled unicode support in windows xp. To know How to enable unicode support please check here in wikipedia

All about Unicode
Tamil unicode chart

July 10, 2007

Clean yahoo webmail without Ad’s

Filed under: javascript,Mozilla,tools — Palani raja @ 12:14 pm

Today, I have uploaded my second Greasemonkey scripts to userscripts, Yahoo webmail++ . This will remove (hide) the advertisements in your yahoo webmail, the one at the top and the small ads on the left side. Initially I was trying to do something similar to Gmail Airskin, but unfortunately yahoo uses lot of tables, which I find difficult to finish the script, at this stage it will remove only the advertisements and I will try to update the script soon.

June 13, 2007

Safari for Windows

Filed under: tools — Palani raja @ 6:22 am

Finally Apple offers Safari for Windows, I am on my Safari now!. But there are bugs in Windows version of Safari, please go through the Techrunch link. Here is my own list (Though! I am newbie to Safari), First thing I did was searching webdeveloper plugins for Safari, I tried HTML Tidy extension for Safari!, Safari crashed after downloading. Second, I can’t able to browse Yahoo mail beta (it says it can’t open https link, that is weird), Gmail compose message page doesn’t look good as it does in IE/Mozilla.

If you are optimistic, you will see the fonts on the pages are rendered in a way it looks beautiful, cool interface, page loading progress bar in address bar itself, Auto complete for URL too, superfast startup and loading pages quickly (atleast for me).

For web developers out there, now we have to check our pages in Safari too with IE/Firefox/Opera. 😦

Next Page »

Blog at WordPress.com.