I am a great fan of RTS games specially AOE and DOTA. But turns out whenever I start AOE, I always have to put 25 char long CD Key. It really pissed me off and demotivated me from starting the game. But since the game has to go on, I had to find an alternative.

So I searched around to find if there is a way for me to get my system to do this monotonous job for me. I found this library for python which wraps the low level Windows C code. But there was not enough documentation to look around but the function signature is literally same as you would in c#. So I looked at MSDN and found this which clearly explains the use of functions.

I meddled around in python console and came up with this code finally which just worked for me. save it as .pyw file so that the console window doesn't pop up. What it does is waits for 1 sec and then starts pressing the keys on its own at a 0.01s interval. You need to install the win32api library though which i mentioned above for it to work. 

To see it in action, you have to double click the python file and then quickly(within 1s, you can change it though) head over to any window where you could type(eg. notepad) and see the key typed on its own.

I was really proud to get my AOE working hassle free. But then I found out through a senior that it could have been done without that. Just go to properties and run in compatibility mode and type the key for once. It took away all the pride but I was still happy, that atleast I got to learn something, even though it took 2 hrs of my time. But it was worth it!

PS: Well I did it before(maybe a month back) but thought it was worth sharing so did it now.
Taunt21(You'll know if u play AOE :P)
 
If you ever went through 9gag(if you haven't, srsly :O), you would have seen how easy it is to navigate on their site by just clicking the right and left navigation key to go forth and back respectively.

I just liked the concept and wished that it was at other places around the web, for example here.(I would highly recommend you to check out this link and see all the other books provided for free by O'reilly publications). If you are reading a book there and see those arrow signs on both sides, you would naturally push the right key to move to next chapter, but unluckily it doesn't work.

So I thought, today I will learn it, the way to take keyboard events. did some search and found out that there is really easy way to do it using jquery. so I wrote some basic code to test it out. and here is the output. Now to simulate the 9gag type functionality, we just need to grab the keycode of the left and right keys and put it down in our app.
here is an example and here is the code. Now when you see the code, y'd say, its so easy. Truth is  things are always easy, it only matters when we dig them or do we dig them.
Happy Diwali
 
If you are trying to learn SQL(pronounced sequel), it would be best to learn it the hard way .Its a nice tutorial to learn sql. They emphasize basically on SQLite3 which is recommended for starters as it is pretty lightweight and implements most of the SQL.

You can also join this Course. Its a really great course from Stanford@Coursera, teaches you not only SQL but also introduces you to XML and JSON.

If you are a Windows user, I found this excellent application to try out SQL queries in a nice GUI way. Database Master is a pretty standalone app. You can connect to most of the SQL databases out there.
It provides the output in awesome looking excel format. You will forget command line once you use this.
I regret not knowing it earlier, but you know its never too late :)
Picture
database master on my system
 
PictureMy Homescreen
If you have an android 4.0+(ICS or above), screenshots are built right into your phone. Just press Volume Down and Power key simultaneously and hold for a second. The image would be automatically saved in your gallery. 

If you use 2.3 or lower, screenshot is not builtin. You may have to root you phone and install other apps available on play store.

 
Picturesync list
Its a little embarrassing if you meet your friend on his birthday and don't wish him and then later see it on facebook and wish him online. 

  So here is a  nice little hack to export  birthday of facebook friends into google calendar or any other calendar. 
  1. Select Events from left side of your homepage.
  2. click on little settings icon next to Today button.
  3. Click Export and export your friends birthdays.

I use google calendar as my default calendar app in google chrome, so it took over from there and now would automatically sync any changes in that calendar. Then it syncs to my android phone.
Pretty neat huh!