Wednesday, December 28, 2005
Happy Holidays
Friday, December 16, 2005
Thank God its Friday
Tuesday, November 29, 2005
Metro in Paris
Friday, November 25, 2005
create typewriter effect with ming php for flash (swf) movie
setBackground(0x00,0x00,0x00);// SM - This is very important as it set sets the speed of the movie// SM - Higher the number faster the typing will appear$movie->setRate(3);// SM - This one will depends upon you$movie->setDimension(600,40);$movie->setFrames(31);$movie->nextFrame();// Define your String here $str = 'Miing Typewriter Effect'; /* SM - As you note The space between character if not fixed SM - due to font width so you have to figure out your own SM - Now we split our string and make an array with the same */ $chars = preg_split('//', $str, -1, PREG_SPLIT_NO_EMPTY);// print_r($chars);$inc = 0 ;for($i=0;$isetFont($myFont); $myText->setColor(255,255,255); $myText->SetHeight(30); $myText->addString($chars[$i]); echo ("$chars[$i] \n") ; $firstText=$movie->add($myText); $firstText->moveTo($inc,30); $inc = $inc + 18; // SM - this is very critical as you need to add this extra frame to make this effect of some typewriter $movie->nextframe(); // SM - This helps to determine the width of the movie // SM - turn only if you need the same // echo "inc is $inc \n" ; } // SM - we do not want to loop this movie// $movie->add(new SWFAction("stop();")); // SM - Save the movie $movie->save("/tmp/banner.swf",9);?>
Friday, November 18, 2005
Create Banner with mirror effect by ImageMagick
convert -size 460x130 xc:white -font forte -pointsize 72 -fill "#cccccc" -annotate 0x180+12+80 "Banner Mirror" -gaussian 0x2 -stroke black -strokewidth 1 -fill "#80904F" -stroke black -strokewidth 1 -annotate 0x0+12+55 "Banner Mirror" -draw "line 0,68 430,68" Banner-Mirror-Imagemagick.jpg
Wednesday, November 16, 2005
Reached 10K and folding
Monday, November 14, 2005
Orsay revisited
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
[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,"
fwrite ($write_handle,"
\"big_photo\">\n");
fwrite ($write_handle,"
if ( $pre_short_name ) {
fwrite ($write_handle,"
img src=\"images/previous.gif\" alt=\"next\" border=\"0\">
}
if ((!$pre_short_name) || (!$next_short_name)) {
fwrite ($write_handle,"
/%\">
}
else {
fwrite ($write_handle,"
\"images/home.gif\" alt=\"home\" border=\"0\">
}
if ( $next_short_name ) {
fwrite ($write_handle,"
}
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
Thursday, October 20, 2005
Tibx Shoe Laces
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
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
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
Thursday, August 11, 2005
banner with imagemgick convert
convert -size 600x130 xc:transparent -font forte -pointsize 72 -fill "#cccccc" -annotate 0x180+12+80 "Pamela's Gallery" -gaussian 0x2 -stroke black -strokewidth 1 -fill "#ff3600" -stroke black -strokewidth 1 -annotate 0x0+12+55 "Pamela's Gallery" -draw "line 0,68 570,68" banner.png
ssh and scp
scp -P 2222 font_slewed.gif santm@localhost:/tmp/banner.gif
ssh -p 2222 santm@localhost
nomally :
Friday, August 05, 2005
[How To] Puttygen Puttssh for ssh
1.a Make sure you choose SSH2DSA at the bottom
1.b Click on Generate
1.c Move Mouse as mentioned.
2. Once the key is generated
2.a Put proper comment for Key username and hostname
2.b Type your Password please try to choose a proper password i.e. with number, special character, upper case hard to guess
2.c Save the public and private key I saved in
C:\Documents and Settings\santanu.misra
3. Now add pageant.exe to your startup programs as shortcut.
4. In the property box modify these
4.a In “Target” Box add the Private-key file name
4.b In “Start in’’ Box put the directory where you stored the public key ; look at step 2.c
4.c Make “Run” to minimized
5. Right click on pageant and you will see there is an option for adding the key.
5.a Choose your private key file that was generated with “PuttyKeyGen” and it will ask for the “Passphrase” enter the password you entered in step 2.b
5.b You can see your key with “view key” option. There is a option to delete your key as well.
6. Now we need to configure putty to work with our public and private key. The screen shoots are quite self explanatory.
How ever I did modified “ScrollbackLines” for putty with regedit as I like to have more scroll back line; default is only 200. The ket is located in
MyComputer\HKEY_CURRENT_USER\Software\SimonTatham\PuttY\Sessions\Default%20Settings
For quick access to known servers you can do this to automate login via (ssh)
ssh-add -L >> .ssh/authorized_keys
Thursday, June 02, 2005
Back to Work
When I was on my vacation last week in Spain and Portugal, was thinking about to write down all that we had experienced there - the places we visted and food we tasted and others. But back to work it is such a Dilbert place that I can not explain with my logic.
Also I need to find a cheap solution to restore pictures from Smart Media. It looks like there is a well suited option commercial for 40 Euros. But I am still looking around for a free one if I can as I am not going to use the same again.
Stay tuned for experiences from Madrid, Granada, Seville and Lisbon.
Tuesday, May 31, 2005
Lost Pictures Recovered
After discovering that one of the SmartMedia Card from my Camera not working at Seville we were really very heart broken and anxious. It had pictures from our first three days of our trip. And in those first three days we traveled from Madrid to Granada. We had captured lots of evening pictures in Madrid and sunset view of Alhambra at Granada.
But we kept our nerve cool and continued with other media cards and tried our best not to remember about the same. Getting home and after finishing lots of house hold chores at late evening we started trying Google for an answer. And quickly it became clear that we were not the only one with this problem. The commercial solutions offered were OK but bit pricy($40) for one time use. Since those pictures were precious to us, so I tried to buy the same over internet and my credit card got declined.
But today my luck was better as I found a better web site with lot of good links(shareware) for the same. Check out, if you happen to have same problem in future (touch wood).
http://www.jr-worldwi.de/photo/index.html?SmartMedia_recovery.html
Well time to go to bed and prepare pictures for posting them on web. Adios
Sunday, May 29, 2005
Hotel Train Lisbon to Madrid
Saturday, May 28, 2005
Lisbon - Portugal
Lisbon - Portugal
After walking in Rossio Square for a while we bought day pass for Lisbon Trasport. The Metro system is run by the Government while the Bus, Tram and trolleys are run by a company. Lisbon have lots of trams and it seems like one of the attractions. Lisbon downtown is divided in three major part Bairro Alto, Alfama and Baixa. The first two one are on hills and the last one in the middle of the two. Thursday, May 26, 2005
Seville - Spain
Wednesday, May 25, 2005
Evening in Seville - Spain
Cordoba – Spain
Tuesday, May 24, 2005
Seville - Spain
I should have started jotting down all my memories from this beautiful city immediately after my return to Paris. But back to work and daily routine.... lots of finer moments are fading off.Monday, May 23, 2005
Alhambra - Granada - Spain
Alhambra has main 4 sites to visit. The main attraction is of course "Palacios Nazaries" the best preserved Moorish Palace in Europe. The palace is quite intact from all the wars that were fought between Christians and Moorish (Arab Muslim from North Africa). The war ended at 1429. I heard lots of tour guides mostly Japanese comparing this to Taj Mahal. As I have never been to Taj Mahal I can not say for certain but I am quite sure it is not that close to Taj Mahal in beauty. Still the works of Moorish artists are really very appreciable.
Sunday, May 22, 2005
Granada - Spain
Saturday, May 21, 2005
Madrid - Spain
Our dinner was not up-to mark. As dining section of Rick Steve's guide book is quite empty. There are plenty to choose from when it comes to eating as Spaniards have great passion about gastronomy.After dinner we walked from Sol towards East to “Banco de Espana” and we tried to capture few nice big white buildings in night mode with tripod.Friday, May 20, 2005
Vienna - Austria
The evening we reached was bit late around 11PM so I decided to take a cab from the airport to the hotel. The hotel people told me it cost around 35 euros from the Airport to the hotel. But it cost us 54 Euros so I was very angry with the Taxi driver at first for taking longer routes. But when I asked again with the hotel guy he said it is normally around 60 Euros. Well that made me feel good but not better.
Next day, Saturday, we went to Melk by train from Vienna the weather was great with blue sky and warm temperature. The train ride was nice as it gives a good view of Austria’s country side. Melk has a very beautiful abbey which is known as Stift to the local. From there we took a boat ride on Danube River to Kermes. While walking from the boat stop to the train station we met a lady from Graz. She suggested us to take the train ride to her beautiful town in the Alps on any sunny morning.
That evening we came back to Vienna and walked around StephansPlatz and dined in a vegetarian place, the food was good.
Sunday we had our coffee and some tasty pastries to start the day. We walked along the ring starting from Opera, Hufburg Palace, City hall, Museum Quarter Parliament, University and the stock Market. After that we went to St. Augustine’s Church to listen the Sunday Chores. It was a very different experience the music and singing was really very soothing to ears. After lunch we went to Belvedere Palace. It was very special day as Austria was celebrating its 50 years of Freedom. There was live music, dance in different form. We really enjoyed those great outdoor performances.
On our last day we went to Schonbrunn (beautiful fountain) palace. It was summer residence of the royal. Its beautiful park really demands a good amount of time from you to explore those lavish green surroundings.
Tuesday, May 17, 2005
Bonjour
Friday, April 15, 2005
New PC

- Shuttle SB83G5
- INTEL Pentium 4 530J 3.0 GHz
- Samsung PC3200 512Mo DDR
- Hitachi 160Go 7200 RPM S-ATA 7K250
- LiteOn 48/24/48(CD) & 16x (DVD)












