Monday, November 14, 2005

Orsay revisited

To my greatest surprise I found failure in implementing a perfect backup system for my digital images. Somehow I lost all the pictures from Orsay museum. May be I just deleted them(by mistake)!!! Yes I know the trouble of digital memories they are very easy to capture but most difficult to save. There are lists of problem that can happen to your golden past; starting with the media card to Hard Drive not to mention virus problems or accidental deletion of files

My current system is far from perfect I have one copy on my computer and other in external USB drive. That way I am insured from virus and hard-drive failure but may be I should make DVD(s) and keep it in a separate place. Working for IT is making me so paranoid with backups but I know few people who lost their digital pictures just thinking nothing wrong will happen to them.

Well enough of bragging, I think it was a small and good lesson and great reason to go back again to Orsay. Being there I just forgot all those anxiety of living in Paris small apartment and trouble it poses from carrier to saving for future or just picking up the language and be able to communicate properly in French. On humorous side if French economy does not recover and keeps declining then some dark day they can lease some of these masterpieces to new emerging economies of East to make some money.

This time there was temporary exhibition from Russia which was worth to explore the paintings from mid-19th century to 1917 ; most of the paintings and objects are from National Museum of Moscow and St. Petersburgs .

Thursday, November 10, 2005

Diwali at Paris

"Are you safe out there?" This was typical question to which I have been answering to my friends and relatives after the riots at Paris suburbs. I myself was keeping updated with news only. "Thank God" it looks like getting better now. I would not like to make any comments and express my view on the same as it seems to be very complex matter.

We celebrated Diwali quite well this year. On evening of 2nd oct. it was at Vendanta Society of Paris(with puja).And on 5th it was at Maison de l'inde with fireworks and cultural activities. But this year the biggest celebration of Diwali was hosted by Mayor of Paris at “Hotel de Ville” for the first time. It was an event by invitation. Unfortunatley, I didnot have enough social contacts to be there.

Friday, November 04, 2005

Part -2

create individual pages for each image dirty way with php
[code]
<?php
//$image_files=[] ;
$type = "jpg";
$abspath_folder = "/home/santm/public_html/PamelasCreation/images" ;
if ( is_dir ( $abspath_folder ) ) {
if ( $handle = opendir( $abspath_folder ) ) {
while (false !== ( $file = readdir($handle ) ) ) {
if ( $file != '.' && $file != '..' && $file != 'CVS' && $file != 'index.html' ) {
//santm echo "FILE is $file \n" ;
$the_array[] = $file;
}
}
}
}
closedir( $handle );
// end of reading the directory
// santm print_r ( $the_array );
// making sure the array only has our jpg image starting with a number
foreach ( $the_array as $img ) {
if ( !is_dir( $abspath_folder .'/'. $img ) ) {
if ( eregi( $type, $img ) && eregi ( "^[0-9]", $img)) {
$the_image[] = $img;
}
}
}
// the main part
if ( !$the_image ) {
echo "no image \n";
}
else {
$i = count ( $the_image);
echo "count $i\n";
// sort the array
rsort ($the_image) ;
//print_r ($the_image ) ;
for ($k = 0 ; $k < $i ; $k++) {
$bb = $k+1 ;
echo "santm $the_image[$k] \n" ;
$full_name = explode (".",$the_image[$k]);
$short_name = $full_name[0];
$foo_img = images .'/'. $short_name;
if ( $k != 0 ) {
$pre_name = explode (".",$the_image[$k - 1]);
$pre_short_name = $pre_name[0];
}
if ($bb != $i ){
$next_name = explode (".",$the_image[$k + 1]);
$next_short_name = $next_name[0];
}
echo " short $short_name \n";
//
// doing dirty way with system call for placing the header
//
$head_out = shell_exec ('cat /home/santm/head.pam.inc');
$write_handle = fopen ("/home/santm/public_html/PamelasCreation/$short_name.html","w+");
fwrite ($write_handle,$head_out);

fwrite ($write_handle," $bb of $i\n");
fwrite ($write_handle," <div class=
\"big_photo\">\n");
fwrite ($write_handle,"\n");
if ( $pre_short_name ) {
fwrite ($write_handle,"<
img src=\"images/previous.gif\" alt=\"next\" border=\"0\">
\n");
}

if ((!$pre_short_name) || (!$next_short_name)) {

fwrite ($write_handle,"<a href=\"index.html\" width=\"90
/%\">\n");
}
else {
fwrite ($write_handle,"<img src=
\"images/home.gif\" alt=\"home\" border=\"0\">
\n");
}

if ( $next_short_name ) {
fwrite ($write_handle,"
\n");
}
fwrite ($write_handle,"\n");
fwrite ($write_handle,"\n");
fclose ($write_handle) ;
}
}


?>
[/code]

photo album : imagemagick (part -1)

Quick and dirty way of creating photo album with imagemagick, creating images with black border as it looks good for all

#!/bin/cshset files = `echo [0-9]*.jpg`echo $filesforeach file ( $files )set w = `identify -format  "%w" $file`set h = `identify -format  "%h" $file`if ($w > $h) then  convert $file -thumbnail 500X -bordercolor black -border 1 /tmp/foo100/$fileelse  convert $file -thumbnail X500 -bordercolor black -border 1 /tmp/foo100/$fileendifend

Sunday, October 30, 2005

Place de la Concorde

After a long time I was able to capture the fountain of Place de la Concorde in a very beautiful sunny morning. It is so amazing that we still take pictures of Paris like tourist on their first day. When we left home it was cloudy and we were questioning ourselves why we are carrying the camera with us. But luckily it was worth to do so. Then from there we took a small promenade at the garden of Elysee.

While walking in 5th arrondissement we saw preparation for a big renovation is going on at Madame Curie University (Jussieu) as they used asbestos as insulator, But with high risk of cancer now government is trying to get rid of the same. It has unique architectural plan which resembles as a molecular matrix where each column is numbered. Looking at the same you can like it or hate it there can not be any middle opinion about the same.

Thursday, October 20, 2005

Tibx Shoe Laces


Yes these are my dirty shoes. Not very sure about the origin of those shoe laces, I got them when my old office was getting closed. Missing the TIBX bus and shares I got those laces :( (People got nice race cars and big houses in Bay Area a dream come true in this materialistic world and what I got for boarding the train late. Well I have another pair of these laces…..

Unless any big shoot TIBX one day decide to run a charity marathon with these laces on his gizmo running shoes there is no real value to the other pair of laces I have. Any one out there …. You know I am sure it will not cost much.

Tuesday, October 11, 2005

Migrating rrd database between different architecture

This script you run on the source host from the same directory where all those rrd files are there. I found this very helpful while migrating between Linux and Solaris.



#/bin/csh

set all_files=`echo *.rrd`
echo $all_files
foreach file ( $all_files )
set base = `basename $file .rrd`
/bin/rrdtool dump $file > /tmp/new1/$base.xml
end


The do a `tar` with `gzip` as that will save lots of space and time while transferring data between machines.


And on the destination machine you uncompress and untar the file to an empty directory.


#/bin/csh

set all_files=`echo *.xml`
echo $all_files
foreach file ($all_files)
set base = `basename $file .xml`
/opt/local/bin/rrdtool restore $file /opt/local/htdocs/cacti/rra/$base.rrd
end



Hope this helps.

Wednesday, October 05, 2005

French class

After all these months, I prefer not to use years yet :) I started formal French class. I am not sure how it will end up as it keeps me reminding about my Spanish class which I dropped out after 2 months. But for those 2 months I went on time to Foothill community college every morning at 8AM. It was different as medium of instruction was English now everything is French. It is not difficult to understand what the teacher is saying but it is very hard to form a full sentence correctly in french.

I applied for beginner (level I) but after writing the test last week I found myself at level II yesterday evening. This must be due to my wife who made sure I do well in this test. May be I should not have answered so much as a beginner but I did not want to miss this chance as this class starts twice a year only. I would like to thank Daniel (my office teacher) as well. May be I could have learned better at first place paying more attention to him and secondly if those (office) classes were at regular interval.

I have to admit the class looks good with the dynamic and hard working teacher. She looks like going to make sure her students learn to speak and write proper French. The most of the students are from Asian origins female who are working as house maid in Paris.

Well I need to memorize a list of verbs and their conjugation now for tomorrow’s test.

Thursday, September 29, 2005

Gallery2

Well I am having lots of trouble with a simple gallery2 installation with 15 pictures for my wife's hobby pictures. While I am running a 1600 picture gallery on the same server with out any problem touch wood. The back on the main one not there.

And i am having wonderful tech support from dot5 hosting to say the least. The guy does not even know what is Unix he replies it is FreeBSD.

A quick a dirty way to get around. Let's name the site as www.mysite.com Here the user name for your web server is not same as your account. So when you create a file ftp you see the owner/group as "joe/joe" and when web server creates it it is "web/web".

Connect via ftp create a gallery2 directory ; chmod 777 the same on the Top most Document root.
put this file in the same directory "gallery-2.0-full.tar.gz" make sure binary more
also FTP this php file foobar.php with these lines in it
<?
system ("tar -zxvf gallery-2.0-full.tar.gz") ;
?>
Now connect to this foobar.php via a web browser.

Follow the instruction from gallery2 installation when you point your browser to this location

http://www.mysite.com/gallery2/

Need to create the g2data directory and chmod 777 via ftp again .

to finish the same Gallery will ask you chmod 755 gallery2 directory.

Monday, September 26, 2005

Running Paris Versailles

Almost after one and half year I was running in any event. The weather was very grey but it was very pleasant for running. Temperature was around 16 degree Celsius. The race was 17KM long starting from bottom of Eiffel Tower to Château de Versailles.

For the first time, Pamela accompanied me to the starting point of the course so as to take a photo of mine with Eiffel Tower. The first part of the run was along River Seine and then it goes to Forest of Meudon; this was the most crucial part as it has a steep climb (approx.2kms).

Well, the water stops were quite nicely spaced and I did not felt like a trash any time during the whole course. There were around seventeen thousands people in total but at a time only 350 runners departs so when I started it was almost 30 minutes after the first group started.Anyway, the route was quite scenic as the main part was bit away from the city in the forest & I finished by 1h 29mn 59s which is not that bad :D

Friday, September 16, 2005

New look to web site

Migrated to Wordpress along with Gallery2, the choice for the same was not easy. As for a long time Mambo and custom home grown Photo Album was doing the job fine. In fact the template I used for the same was appreciated by friends. But as days passed and numbers of pictures are growing it was getting difficult to manage the same with custom gallery. But the idea to grab Wordpress and dropping Mambo is a personal one. I will not compare the two. The fact is they two are different and just I felt like blog software will be a better choice for a personal website compared to a CMS
Well there is lots of lots work left to organize the pictures now after this migration as there was no tool or script that I could use to automate the same :(  Hope to finish this by end of September.