Thursday, June 26, 2008

Latex on wordpress blog

Some time back I came to know that wordpress blogs hosted at wordpress.com supports latex. But no such default functionality for self hosted wordpress blogs. But there are plugins (latexrender, wp-latex) which can facilitate similar things.

But for these to work you will need to install latex on your hosting account. (I have intalled latex on my hostmonster account some time back.).

Continue Reading >>

Tuesday, June 24, 2008

View contents of Zip/Jar files using firefox

With Firefox 3, you can use firefox browser to view contents of zip/jar files.
For viewing contents of filename.zip type following at location bar:

jar:file://< full path to filename.zip >!/
Example: jar:file:///home/user/Desktop/filename.zip!/
Also: jar:file:///home/user/Desktop/filename.zip!/dir/file1.js

This is specially very useful when you want to see contents (.js, .css, .html files) included in firefox extension’s jar file.


Continue Reading>>

Monday, June 23, 2008

Installing latex on hostmonster

In continuation with my previous post (Some times yahoo is better), I followed the steps on how to install latex/tetex on my web host from here (You can also get the Installation steps from QuickInstall file in source code or access the same file from tug.org).

But the problem is that on web hosts like hostmonster you won’t have root access so you will need to modify some of the things and do a local install in your home directory.

Continue Reading>>

Wednesday, April 23, 2008

Blog has moved

New home for my blog:

http://aburad.com/blog/
I am using wordpress for hosting and its fun playing with it. Please update your bookmarks and feeds. Also I have shifted my homepage to http://www.aburad.com

Wednesday, April 16, 2008

Creating Error 404 page

Helping lost visitors? Sometimes a link provided by you may end up as 404 page or viewer might have typed wrong URL that doesn't lead correct page on your site. To help your visitors you can actually use .htaccess file (for Apache servers) to redirect all such links to a special page which will be more useful than plain "404 File Not found" error.

You can add this one line to .htaccess file (create this file if it doesn't exist)

ErrorDocument 404 /web404.html
This will redirect all queries for files not found in that directory and sub directories to web404.html
On that page you can provide user with:
  • Link to homepage
  • Tell them to check the URL or Go Back
  • Search functionality for your website will be very useful.
So yesterday I added a 404 page for my website: Check it out

I have also added similar functionality for my wordpress blog. For setting up 404 Error page on wordpress follow this well compiled article: Creating an Error 404 Page

Interesting read: Creating User Friendly 404 Pages
Related Post:
Web Development Tools

Tuesday, April 15, 2008

View page source trick in firefox, flock

You may have read about firefox's special about: pages like about:config, about:cache etc. Or you can go through Firefox about: pages to have an idea about them. There is one similar functionality in firefox which allows you to view page source of a page. You can type

view-source:http://www.google.com/
this in location bar to view page source of google.com.
So i have made this Bookmarklet to view page source: View Source (So you can drag this to your bookmark toolbar to have quick access).

Similarly you can type javascript: in your location bar to open java script error console.

Related Post:
Firefox About Pages
Little tweaks with javascript : Bookmarklets.
Open webpages in sidebar

Monday, April 14, 2008

Cross-site Scripting (XSS)

Two days back, my shoutbox was hacked :). I was not aware that people are actually visiting this, which I made long back to have similar thing for Ethos in june, 2005. After that i haven't updated the code and many things were left in between.

What actually happened: Cross Site Scripting, when we want user to input some data (which may be html/javascript) and displays it back. So if html/script tags are not properly checked it can cause trouble. Earlier I hadn't checked for javascript, iframe inputs. So somebody just inserted an iframe as message input in my shout box. And the source of iframe contained redirection to another website. So when shouts were displayed on the page the iframe code was displayed as it is and page got redirected to other page.

Luckily I checked the page just after the day this happened, So that way i actually got chance to update this orphaned code and made some fixes.

Solution : Idea is to filter meta characters such as (< , >, ' , " etc) Which will prevent browser from processing them as part of some script, they will be processed as plain text only.
So while doing in php you can do:

$shout=str_replace("<","&lt;",$_GET["shout"]);

And to be on safer side we should also replace following characters:

replace ( with &#40;
replace ) with &#41;
replace & with &amp;
replace ' with &#39;
replace " with &#34;

Or If you are not expecting user to input these characters then you can simply replace these with null string;

So now you can enjoy Shout Box until some new bug is found or its hacked again [;)]

Related post:
SQL Attacks: Hacking (SQL injection)

Saturday, April 12, 2008

My Del.icio.us Toolbar 2.0

Yesterday I was working late night till 3AM, to update my extension 'My Del.icio.us Toolbar' which I made long back in October 2006. Reason was to make it work for newer versions of firefox. But then I added some new features too :

  • I added a Explore feature which is similar to Stumble.
  • Checking Del.icio.us cookies to verify authentication. (You can find more details on how to read browser cookies from javascript here. Actually It uses nsICookieManager interface to iterate over all of the cookies.
Try My Del.icio.us 2.0 (Right now you may have to login to access the extension as it's in Sandbox.)

I also noticed that mozilla has redesigned the extension page. They have also added a nice statistics Dashboard for extension, provided graphical representation of number of downloads, active daily users etc. I was surprised to see that older version of My Del.icio.us has reached a total download of 11,200 (not that a big number but still surprising for me) and number of active user around 1000.

Try My Del.icio.us 2.0 and provide feedback.

Also Try: Del.icio.us SearchER
Related Post:

Sunday, March 09, 2008

Firefox shortcuts

Today I learnt 2 new firefox shortcuts/tricks through this article 20 Amazing Firefox Shortcuts to Save You Time and Money.


  • Deleting Address: Highlight them and use SHIFT + DELETE to remove from drop down menu in address bar.

  • Get Instant Downloads : Just drag the link to download icon in toolbar which you ca get by customizing your toolbar.
Read article for more such tips.
Related Links:

Google Movie Search Tricks

I found this interesting article about search tricks for movie lovers. Try some sample searches:


Interesting thing is country specific google movie domains are also tracking movie theaters, multiplexes in each city for listing of movies and their timings. And you can sort them according to movie popularity and theater distance from your address. that's pretty cool.. !!
Read more for more search tricks: 5 Most Fantastic Movie Search Tricks With Google

Wednesday, February 20, 2008

Adobe AIR: Web to Desktop

Past few days, I have came across Adobe AIR through digg, techmeme, delicious and so today i thought i should try this. Adobe AIR lets us their existing web development skills in HTML, AJAX, Flash and Flex to build and deploy rich Internet applications to the desktop. For Application development you will need two things:


Having Adobe AIR extension for Dreamweaver CS3 can be very helpful as it facilitates to package and preview .air application files directly within Adobe Dreamweaver CS3.

As my first AIR application, I ported my rubiks cube timer as a desktop application (RubikTimer.air). Its very easy using dreamweaver extension, have a look here : Create your first HTML-based AIR application with the AIR SDK (great tutorial for beginners).

One problem I faced: Usually setInterval("display()",500) works with Firefox/IE but it was not starting with no error message to look into but then i found out about using Adobe CommandLine tool. (via Three ways to debug Adobe javascript Application). It´s called ADL and resides in the /bin folder of the SDK. ADL showed the Error: "Unsafe javascript". Then after some random changes when i change it to "setInterval(display,500)", It started working. Another problem I faced was related to keypress events in javascript, were not working with AIR (still have to resolve this issue)

Download RubikTimer.air here
Web Based Rubik Cube Timer

Related Post:

Sample Adobe AIR Applications
Trying hands on Google gadgets

Trying hands on google gadgets

Tonight i tried creating some google gadgets (actually its quite easy using Google Gadget Creator). You can check out them here: Google gadgets . You can use html / javascript (as in any other webapage) to create gadgets.Rubik timer gadget So i converted my Rubiks Cube Timer to a gadget. Other one is a gadget to search stock, scripts on bombay stock exchange.

You can also create gadgets using : Make your Own Gadget (Which is as simple as filling out forms)

Friday, February 15, 2008

New Webpage :)

Hi everybody....
As I'm graduated from IIT bombay completing my B.tech in computer science, so my webpage there wont be available for long. So I have taken a new web domain : http://www.aburad.com with hostmonster till now services are good for what I paid. Right now i have just shifted my iitb page there, but soon will be posting new stuff...so watch out !!

Visit: http://www.aburad.com

Sunday, February 10, 2008

Elephanta Caves


Yesterday I visited Elephanta Caves which are beautifully carved shiv temples out of solid rock mountain. These caves dates back to 5-7 century A.D. You can reach there by a ferry from Gate Way of India, Bombay. The ferry ride was awesome with beautiful view of sea, Gate way of India, Taj hotel and mountains along with refreshing and cool breeze.





For more pics check my picasa album

Wednesday, January 02, 2008

Inovation in India/IITs

I read this interesting article by Bernard on State of Inovation in India. I agree with him that lot have changed (improved) but still we have yet to see Google/Microsoft from here(IITs). As he mentioned one of the main reason is playing things safe.

The fundamental issue in India is the risk/reward equation. It is simply too easy for a young developer in India to get paid a lot by an outsourcing firm; then enjoy being headhunted every year for more money.

One more issue is difference between IITs and Stanford providing inovation to world. Important difference in giving good startups is because lack of implementation of ideas here in IITs. In IITs atleast some good projects (Mtech & Btech projects) are worth transforming into good business opportunities but they die as you pass out from there or after its being graded. I will agreed with comment made by Amit that
There are many socio economic reasons why young people in India hesitate to implement an innovative idea. Current trend of high paying jobs in MNCs will make entrepreneurship ever lesser attractive... especially in software.

Tuesday, January 01, 2008