Rajgad is a fort which is quiet close to Pune and we all just got free from our semester exams so we all decided to go to Rajgad for a one day trek.

Team :

Sushant Bhosale (Me),
Prashant Chaudhari,
Tushar Tapkir,
Rahul Konde.

Date : 4th December 2011

Place : Gunjavane, Velhe, Pune

Map of Rajgad

Route : Swargate(vis ST) -> Gunjavane

Time from base village : 2 hours.

Difficulty : Easy

History :

This fort is built on the hill called “Murumb Devacha Dongar” Rajgad boasts the highest number of days stayed by Chhatrapati Shivaji Maharaj on any fort.

This fort has witnessed lots of historic events, including the birth of Rajaram Chhatrapati, the death of Shivaji’s Queen Saibai, the return of Shivaji from Agra, the antyayatra of Tanaji Malusare to his Konkan village, the burial of Afzal Khan’s head in the Mahadarwaja walls of Ballekilla, the strict words of Sonopant Dabir to Shivaji, and the Khandoji Khopade episode. The diameter of the fort at the base is 40 km making it difficult for anybody to lay siege to it.

So here goes . . .

We started off at 7:30am in the morning. We were supposed to meet at swargate at 7:30am, me and Prashant were in time, Rahul followed after about 10 mins, Tushar was late and joined us at 8am. We inquired about the bus to Gunjavane, it was at 9am so we had time to kill. We all went had a light breakfast, boarded the bus at 9am and we were at Gunjavane by 11am. And we started the climb by 11.30.

Way to reach the top of Rajgad is an easy one, one doesn’t have to take a lot of efforts to reach the top but just walk. Just 2 hours of walking takes you to Padmavati Machi through Chor Darwaja. While climbing you can see the Fort Torna on right hand side.

On the way to the fort, just before the Chor Darwaja, there’s a small rock patch, but it has railings on the side so it is fairly easy to climb this one.

Fort from the Base.

Padmavati Machi

Small Rock Patch

As soon as we entered into the fort we were welcomed by the beautiful view of Padmavati Lake.

Chor Darwaja

Padmavati Lake

View fort Torna from Rajgad

On Padmavati machi there’s a Temple of Padmavati devi, a cannon, samadhi of Saibai (Mother of Sambhaji Raje and first wife of Shivaji Maharaj), two water tanks with edible water, and there’s the Rajwada.

Padmavati Temple

Cannon

Saibai's Samadhi

Remains of Rajwada

Bale Killa from Padmavati Machi

Directions on the fort.

Rajgad is a very big fort. We had to see the whole fort in just one day because we weren’t ready for an overnight stay, but Rajgad is a fort which needs complete two days to explore. Since we had to get back home in one day only we decided to skip Sanjivani Machi and Pali Darwaja.

The way to Bale Killa is a little difficult one, but again there are railings on the side of the rack patch making it easy to climb.

Gate of Bale Killa

On Bale Killa also there’s a Rajwada, Sadar and Daru Kothar. There’s a water cistern called Chandrakor Talav, named so because of its crescent shape.

Chandrakor Talav

Remains of Rajwada on Bale Killa

There are quite a few Beehives on the way to Bale Killa, so everyone must maintain there distance from those. When we started to climb down the Bale Killa some fool had disturbed a beehive and there were bees all around us. We had to literally run down the rock patch to avoid being bitten by bees.

Way to Suvela Machi

Suvela Machi

Chilakhati Buruj

Fortifications at Suvela Machi

Wagha Cha Dola (Eye Of The Tiger)

There’s a spot at the Suvela Machi called Wagha Cha Dola(Eye Of The Tiger) also known as Nedhe. Its a natural hole in the mountain. One can cross over from one side to the other.

After seeing the Suvela Machi we returned back to the Padmavati Machi and started our climb down. We started our descend at 5:30 and we were at Gunjavane by 6:15. Last bus from Gunjavane to Pune is at 4:00 in the evening and we missed that bus so we had to face some problems getting back to Pune. But we managed to get a Trax back to Shivapur from where we took a ST to swargate.

This was my second time climbing the Rajgad and I enjoyed it alot. But I was a little disappointed cause I was not able to see the whole fort, but we are planning another trip to Rajgad, this time a stay over trek, may be in next few months.

Microsoft Compiled HTML Help (.chm) is a Microsoft proprietary online help format. It was introduced as the successor to Microsoft WinHelp with the release of Windows 98, and is still supported in Windows 7. [..]

Now since it is a proprietary format, so Linux does not have any (none that i am aware of) applications which support this format. So it is required to first convert it into the .pdf format to make it readable in Linux.

Converting a .chm file to a .pdf file is a very simple process.

Install CHMLIB

#sudo apt-get install libchm-bin

Extract .html files out of .chm file

#extract_chmLib book.chm dirname
– – – – – >##book.chm = name of the .chm file.
– – – – – > ##dirname = name of the directory where you want .htmls to be extracted.

Install HTMLDOC

#sudo apt-get install htmldoc

Convert .htmls to .pdf using htmldoc

#htmldoc

Add all the extracted .htmls into htmldoc and convert it to .pdf.

HTMLDOC

So for all those people who have always been Windows users and now want to move to Linux, there are some things which we miss a lot in Linux or want in Linux.

The “Send To” menu is one of them. I used to miss it a lot as well, but not anymore. I wrote a Nautilus Script to add the “Send To” menu to my Nautilus right click menu.

Here’s the steps to get your own custom “Send To” menu item in Nautilus :

First of all move to the following folder

                                $cd ~/.gnome2/nautilus-scripts

Then create a file in this folder and name the file whatever you want your menu item to be

                                $touch “Send To”

Add the execute permission for this file

                                $chmod +x “Send To

Edit this file and add the following code in this file

                                #!/bin/bash
                                ## Authur : Sushant Bhosale <sushantbhosale91@gmail.com>
                                IFS=$’\n’
                                cd ~/
                                gnome-terminal –command=’./list.sh’
                                exit 0

Now go to the home directory and create a file named “list.sh” and add execute permission to it

                                $cd ~/

                                $touch list.sh

                                $chmod +x list.sh

Edit “list.sh” and add the following code in the file

                                #!/bin/bash
                                ## Author : Sushant Bhosale <sushantbhosale91@gmail.com>
                                IFS=$’\n’
                                cd /media/
                                array=(`ls`)
                                len=${#array[*]}
                                i=0
                                while [ $i -lt $len ]; do
                                                                echo “$i: ${array[$i]}”
                                                                let i++
                                done
                                echo “Enter the folder to copy: “
                                read ch
                                for FILENAME in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
                                do
                                                                cp $FILENAME /media/${array[$ch]}
                                done
                                exit 0

Just save and copy with just few clicks. . .

Another good feature of this script is that it asks the user for the drive to copy file to, so you can use it to copy file to any mounted drive.

The reason for using two scripts is that nauitilus-script runs in background instead of in a terminal, but we needed the user input in this case so had to use two scripts.

I’ll upload the files here for downloading, link at the bottom of the post.

"Send To" in Right Click

Enter the Drive to copy the file into.

Note : WordPress won’t allow me to upload .txt or .sh file so I changed the extension to .doc, just change it back to .sh prior to downloading.

Here’s the link for “Send To” file. Rename this file from “Send To.doc” to “Send To”

Here’s the link for “list” file. Rename this file from “list.doc” to “list.sh”.

For a long time now I have been using Ubuntu 11.04 (with Unity) as my primary OS. I like to listen to music and I use Audacious as my default audio media player whose official website is here, but the website is not informative so you can find more information about it here on wikipedia.

One issue in Unity is that drag and drop is not easy (or maybe it is!!! in the stable release. but since am using alpha release it doesn’t really work for me). So whenever I want to listen to songs and want to add them to my Audacious playlist I have to do a lot of minimizing and maximizing. I was an Windows user so I always used Winamp on windows, which by the way allows to add songs into the playlist just by right clicking on them. I always wanted this feature on Linux. But no software supported this.

So I decided to take issues in my own hands. I found a script about adding the menu item when you right click on a file. And I used it to execute a script which adds that file to the current playlist in Audacious :).

Here’s the steps to get your own custom “Add to Playlist” menu item in Nautilus :

First of all move to the following folder

                                #cd ~/.gnome2/nautilus-scripts

Then create a file in this folder and name the file whatever you want your menu item to be

                                #touch “Add to Playlist”

Add the execute permission for this file

                                #chmod +x “Add to Playlist”

Edit this file and add the following code in this file

                                #!/bin/bash

                                ## Sushant Bhosale <sushantbhosale91@gmail.com>
                                ## The code is Free and Open Source

                                IFS=$’\n’                                                                ##IFS(Internal Field Separator), Google for more info.

                                for FILENAME in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
                                do
                                                                audacious2 -e “$FILENAME”
                                done

                                exit 0

Save and enjoy!!!

Add To Playlist

Peb (Vikatgad)

Some of my classmates went to Peb (Vikatgad) in July and when I saw their pics on facebook, I (actually we all) felt  like doing this trek.

Team :

Sushant Bhosale (Me),
Prashant Chaudhari,
Aditya Shelar,
Tushar Tapkir and
Amogh Lale

Date : 21st Aug 2011

Place : Neral, Karjat, Raigad

Peb (Vikatgad)

Route : Pune Station(via Train) -> Neral -> Fanaswadi(via Rickshaw).

Time from base village : 2 hours.

Difficulty : Medium

History :

Not much is known about the history of this fort.

So here goes. . .

Me and Prashant left for Pune Station early this time because we were supposed to catch the 7 am Sahyadri Express to Neral. Neral is small town just 2 stations ahead of Karjat and surprisingly Sahyadri Express is the only train that halts at the Neral Station. We reached Pune Station by 6:35 and took the tickets for 5 of us.

This time Amogh had agreed to bless us with his company. We bought the tickets and called Amogh only to hear that the boy was still sleeping. The train also halts at ShivajiNagar Station, so we told him to board the train at ShivajiNagar. The train was delayed by 20 mins at Pune Station itself. So Amogh easily boarded the train at ShivajiNagar station.

It was pleasant ride from Pune to Neral, train took about 3 hours to reach Neral, By 10:30 am we were in Neral. We had a little breakfast and then took a rickshaw to Fanaswadi, its a 10 mins drive about 2-3 kms, you can even take a walk.

View of the fort!!!

The trek kicks off from Fanaswadi. The start is a little confusing or at least it was to us, because of thick vegetation the road wasn’t visible. Just remember to follow the big electric poles.

Wrong Way along side the stream.

Electric Poles

The climb is tiring but very beautiful. It has dense vegetation and being the rainy season we had to walk through some patches of dense forest. Upon walking further we came across an hollow tree, classic creation of nature. JUST AMAZING!!!

Hollow Tree

Further ahead again there is a confusing turn, either you go straight or turn right. The correct way is to go straight. It gets confusing because of small waterfalls on both straight and right side and its hard to tell which path to take.

What awaits further is long but easy rock patch. The patch is very easy to climb and you’ll be on top in no time.

View from the rock patch.

After here we had to cross some small rock patches where water were flowing but steps were engraved on the rocks to make it easier to cross. In 10-15 mins we reached the cave on top. We met Mr. Athalle (known as Athalle sir), we had heard about him from our friends who visited the fort just last month. Athalle sir has been living on the fort itself from last 30 years. He is an IIT alumna and has done specialization in plumbing. He is the guy responsible for the beautiful cave and temple on the top of the fort. Very interesting guy to meet.

Cave on the fort.

Me and Athalle Sir

The cave has been maintained in a very nice manner. The walls have various shlokas painted in Sanskrit.

Inside the cave

Effigy of Shivaji Maharaj

Shivling

We sat there in the cave for some time and then started our walk further. Up ahead we noticed an square opening in the wall, we were told that there is a 5ft*5ft room ahead through that opening. The opening was very small so none of us ventured in there.

Opening in the mountain.

And from the cave only you can see the steel steps built ahead to climb the wall. These are the steps which you would see pop up in Google image search if you search for Peb trek.

Steps

Water Cistern

There is an eating place on the top, where you can order and get food.

Eating Place

There are two sets of steel steps you need to climb down on your way towards the railway track. Yes railway track, there is a toy train which runs between Neral and Matheran. This train has a stop for Vikatgad. On our way back we had to reach this track at point NM158 and walk on the track to the point NM134. NM134 is the point where road to Matheran meets the railway tracks, from where we could get a ride back to Neral.

Steps Again!!

View from the top of the steps

We spotted a snake.

Once you reach the tracks you have to take a left. If you take right you’ll reach Matheran.

Train Tracks

Walk on the track is a very pleasant one, we got to see some of the best creations of the nature.

View from the tracks

View from the tracks

There are quite a few waterfalls as well on the way to NM134.

Water The Fall

And finally NM134 came and we saw the road. We took a trax back to Neral.

NM134

From Neral we took a local to Karjat and from Karjat boarded a train to Pune. The ride back from Karjat to Pune was hell. The train was jam packed and we came standing all the way from Karjat to Pune, its a 3 hour train ride, after a whole day of walking.

First of all I should clarify why am I exporting data from MySQL and putting it in PHPMyAdmin. Well, I had a lot of data stored in MySQL on my Windows(hope Microsoft does no sue me for using the word “Windows” :P) box and I wanted to use all that data in a project which I wanted to on LAMP (Linux/Apache/MySQL/PHP). So now I had to move all that data from MySQL into  a dump file on the Crash(Windows :P) Box and import it into PHPMyAdmin on my Linux box.

EXPORT DATA FROM MYSQL :-

There’s a program called “mysqldump” that gets installed when we install MySQL. This mysqldump tool is used to out all the data from the database into a dump file.

Major confusion that occurs is, that we try to execute this program from MySQL prompt. When we do that, it returns an error. The error statement says that there is an error in the syntax and refer the MySQL version manual for the correct syntax.

We need to execute the mysqldump program from the Command Prompt instead of the MySQL prompt.

Syntax :

mysqldump -a -u=username -p database_name > name_of_the_dumpfile.sql

Once you hit enter it asks for password and creates the dumpfile.

IMPORT DATA INTO PHPMYADMIN :-

After logging into the PHPMyAdmin, select the database in which you want to import the data.

After selecting the  database, you’ll see an Import tab on the top, click on it. In the import panel specify the path of the dump file and say GO. It’s done, all the data is imported into PHPMyAdmin.

Many a times we are required to move data from one Database Management system to another. Unfortunately very little is done by the database vendors to make this an easier experience. I obviously understand that no vendor would want that people should move data from their product to another but that is something which customers deserve.

Well in the absence a good tool to do that we are left with only one option, write a script in our preferred language and move the data physically from one database to another. My preferred language is JAVA but you can use any other language. I’ll show how to connect to Oracle and MySQL and then we’ll move data from Oracle to MySQL. Piece of Cake. :P.

CONNECT TO ORACLE    ##->    READ FROM ORACLE    ##->    CONNECT TO MySQL    ##->    WRITE INTO MySQL    ##-> CLOSE CONNECTION

Connect to ORACLE (version 9i)

Prerequisite : Add the path of the following file in the CLASSPATH.
C:\oracle\ora90\jdbc\lib\classes12.zip


Code :

Class.forName(“oracle.jdbc.driver.OracleDriver”); //Loading the driver
String urlora=”jdbc:oracle:thin:@127.0.0.1:1521:home”; //URL for connecting to the database
Connection connora=DriverManager.getConnection(urlora,”username”,”password”);
//Creating Connection class object.
Statement stmtora=connora.createStatement(); //Statement class object to execute the query
ResultSet rsetora=stmtora.executeQuery(“QUERY inside double quotes”);
//Write the query here.
//ResultSet class object contains the retrieved data after the successful execution of the query.


So once you have the data retrieved from the Oracle database, you just need to write it into the MySQL database(Checkout the next part).

Connect to MySQL

Prerequisite : Download the drivers required to connect to the MySQL database from here. Extract it and add the path of the .jar file in your classpath.

Code :

String urlmy=”jdbc:mysql://localhost/sushant”;
Class.forName(“com.mysql.jdbc.Driver”).newInstance();
Connection connmy=DriverManager.getConnection(urlmy,”username”,”password”);
Statement stmtmy=connmy.createStatement();
stmtmy.executeUpdate(“Query inside quotes.”);  //Write all the data read from Oracle into MySQL

And you are done!!! You can run this in loop and print the number of records of data moved from one database to other.

Note : The process can also be reverted to move data from MySQL to Oracle.