Friday, January 08, 2010

Android Everywhere

Sun's dream of putting Java Everywhere is finally being realized but it has nothing to do with Sun and everything to do with Google.

Now Android is on Laptops, Netbooks, Mobile Phones, Video Phones, Washing Machines, Microwaves, Printers. Android is fast becoming UI device for consumer electronics.

Monday, January 04, 2010

MySpace Shame: Fix API and then talk of Developer Contest

Today MySpace announced Submissions Now Open for the MySpace Developer Challenge. Which is really great because MySpace is also trying to drive innovation from developer community on its platform. I got pretty excited to get an app going using Myspace API.

After trying to integrate MySpace OAuth for an hour without much success constantly failing in 6.3.2 section of OAuth spec title Service Provider Grants an Access Token getting a 500 Internal Server error. I refereed to MySpace forums and found that OAuth with MySpace hasn't been working since late November and MySpace is aware of issue for well over a month and still trying to Fix the issue.

Developer contest is a great idea to improve platfom but how about making API work before a contest so that developers can really develop the apps for contest?

Thursday, December 24, 2009

Disabling browser context menu in ExtJS

Many a times when ExtJs context menu (Right Click Menu) is added to components, it creates a problem as browser right click menu comes up after ExtJs right click menu is displayed. This is one of common issues posted on ExtJs forums consistently. Here is a simple way to solve the problem:

Add the following line:


Ext.getBody().on("contextmenu", Ext.emptyFn, null, {preventDefault: true});


as first line on ExtJs onReady function.

Friday, October 09, 2009

The Boy Who Harnessed the Wind

First watched this dude on John Stewart. Most fascinating thing I heard in a while and proof world is filled with Hope:

Thursday, February 19, 2009

Bye Bye Spammers

It appears after the latest attempt to drop the connection from spammers at IP level, traffic has come to normal level.

To read about the issue and resolution follow these links:
Day 1
Day 2

Graph showing traffic returning to normal:

Someone remind google what year it is



Chrome 1.0.154.48. was released on Feb 3 2009.

Chrome home page seems to have the same issue:

Tuesday, February 17, 2009

More fun with Proxy

After disabling proxy on my server, I still see traffic on my server being high (My monthly quota might not exceed at this rate but takes up 50% of Bandwidth). Looking at access log it appears that requests hasn't stopped though they are getting 403 error. So requests coming to server and 403 response by itself is making up few GB worth a data every day. So decided to block these requests at IP level rather than proxy level. First I needed to get all unique IP addresses that needs to be blocked. That was easy to considering my log format being:

61.139.105.163 - - [17/Feb/2009:05:08:48 -0700] "GET http://ad.yieldmanager.com/imp?z=10&s=425858&u=http%3A%2F%2Fwww.popflashgames.com%2Findex.html HTTP/1.0" 403 388 "http://www.popflashgames.com/index.html" "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0"


So I needed to get all the 403 message lines (access error's) and get IP (first field in the log) and get unique values of those IP's. Simple uniqx command can generate that(output redirected to tmp file):

more myserver.access_log | grep ' 403 ' | cut -d' ' -f1 | sort | uniq > /tmp/block.txt


Now that I have all the IP's that need to be blocked I wrote a simple script to block all the IP's in the tmp file (using iptables -A INPUT -s IPAddress -j DROP). Here is the script:


#!/bin/bash
# /tmp/blockspam.sh
# Drop all the spammers
SPAMIPS=$(egrep -v -E "^#|^$" /tmp/block.txt)

for spamip in $SPAMIPS
do
iptables -A INPUT -s $spamip -j DROP
done


To view all the blocked IP's use the command:
iptables -L -n