Tuesday, August 18, 2009

Automaticall reconnect the internet on disconnection

Due to certain problems with my ISP my net often gets disconnected. As you can guess there is nothing more frustrating then trying to do something and see that your internet is not working and then manually reconnecting the network. In order to fix this i wrote a simple script to monitor my network at an interval of one minute

vi ~/monitor.sh
export DISPLAY=:0
pingout=`ping www.google.com -q -c 5 -W 2`;
total=`echo $pingout| grep transmitted | sed "s/.*\([[:digit:]]\) received.*/\1/"`;
if [[ $total -lt 4 || $pingstatus -ne '0' || $total -eq '' ]]
logger "Internet connection not working.$total/5 pings. Reconnecting..."
notify-send -i modem "Reconnecting" "$total/5 pings failed. Reconnecting..."
poff -a;
pon dsl-provider;
logger "Internet connection working properly"
The script pings google.com and if less then four pings are successful in five attempts(60%) then a reconnection is performed.
To execute it periodically every minute i just added it to cron by simply executing
crontab -e

in a terminal and adding the following line at the end of the file
* * * * * ~/monitor.sh >/dev/null 2>&1

Saturday, April 12, 2008

New Post Finally

First of all i would really like to apologize to my friends who visit my blog and don't find anything post on it :(. It has been almost 7 months since i posted my last post on this blog.
The reason for me not posting anything on the blog is that i got disconnected from the internet in september due to a small argument with my ISP. I got internet installed a month or two back and i had been so busy since then that i didn't get any time post anything. Anyways, here is a summary of what has happened in the past months.

  1. Sadly but truly i have grown fatter.
  2. The result for our 3rd semester came out and i have passed :).
  3. Me and my team won two event trophies. "Technophilia - Jawahar Lal University"and "Envisage - IIC ,DU". Me and one of my friend also won three events at MSIT, IP. There was no team trophy there had there been any i am sure we would have got it ;).
This is in all what has happened. I have made a promise before to post regularly so i won't make it again to break it but i sincerely hope i will be able to update the blog as regularly as possible.

Friday, September 21, 2007

Online Office suite market heating up

The online office suite market is heating up with Google launching it's power point creator to complete it's office suite. Google competes directly with Zoho which also has a very famous and successful offering for the online office suite.
Although Zoho is not as popular as Google docs it is much more powerful. For eg. The Google power point creation tool does not allow users to create basic figures in presentations which is allowed by Zoho Show.
In my view although less famous Zoho wins hands down in the competition against Google. It does help against competition when you are as famous as Google. But unless Google adds some of the basic functionality in it's tools I don't see it winning against Zoho in the near future.

Wednesday, August 29, 2007

Content-Aware Image Resizing

'Seam Carving for Content-Aware Image Resizing' is the name of the paper presented by two Israeli professors, Shai Avidan and Ariel Shamir, at the SIGGRAPH 2007 conference in San Diego (paper here)

The algorithm for resizing figures out which parts of an image are less significant which makes it possible to change the aspect ratio of an image without making the content look skewed or stretched out.Let's wait and watch some real applications being made available which use this algorithm. I would love that.

Microsoft hackers blog

"Hackers @ Microsoft" is name of a new Microsoft blog officially launched on blogs.msdn.com the website which hosts many of Microsoft's employee blogs. This blog promises to tell us what some of the white hat hackers at Microsoft do. Quoting the blog post...

We employ "white hat hackers" who spend their time pen testing and code reviewing applications and software looking for weaknesses and vulnerabilities so that others don't once we've released that code into the wild. We employ many many smart testers who know more about some of our software then perhaps the architects who designed it. We also employ some of the top researchers in their industry, dedicated people working on the bleeding edge of whats going to be common place in the next 5 or 10 years of computing. So yes, Microsoft does have hackers, and its time to introduce you to some of them and show you what it is, exactly that they do.

Interesting? Well, it has been three days and i haven't seen anything interesting on the blog come up yet. I do hope that hackers @ Microsoft come with a nice article soon.