hemanth's blog

31 Jul

YQL YUI and JQuery

in

Last week i had been to Yahoo! hack day i came across an amazing tool called YQL -> "The Yahoo! Query Language is an expressive SQL-like language that lets you query, filter, and join data across Web services." I tried few methods of representing the JSON data retrieved from the query using YUI and jQuery as below. Do share your methods in the comment section.

28 Jul

Twiit your Google status

in

Most of the time we share a link in our Gtalk status, so do we tweet the same, would it not be fun and easy to do the same from CLI?!

After Finding invisible mates I tried a simple python script again to do me a neat job of twitting and setting the same as by gamil status.

18 Jul

Find your invisible friends on Gmail

in

After google news in terminal i was much interested in playing with XMPP Extensible Messaging and Presence Protocol, my first mistake using it, gave me an idea of finding gmail friends who stay invisible, as i used to stay invisible most of the time, the idea made me learn many more steps and experiment more on it.

The below is the code that might help you to catch your hidden friends, but there is no program yet to make them reply!

16 Jul

Sort text blocks

in

I recently came across a simple task, wherein i had to sort a massive text file which was an output of a heavy data crunching code.
In pursuit of the short and easy way to do a block sort on each text blocks separated by a new line character, the first think that appeared to me for solving this was indeed BASH.

05 Jul

Google news in terminal

in

After Upload to picasa from cli and google-sunrise-sunset-terminal in past few days, i was gaming on some substantial data gathering code. Python and Google indeed blend very well together, this time i tried a tiny class that gives the top results from Google news from each category.

05 Jul

Desktop session detection python

in

As, i was doing a bug fix for this bug i had to find a way to detect the current desktop session, based on which further changes had to made, so i did something like :

02 Jul

RSS feed twitt bots

in


The open source world has always be a great source of energy to all especially for code monkeys and terminal junkies, not all sharing code, but also happiness to the whole world, indeed with the free as in freedom making life more better.

I coded the below two piece of code, one in python and other in ruby to update twitter stats which would be the title and shorten link of the RSS

01 Jul

Twitter Updates with geolocation

in


Update your twitter with your current geolocation, from terminal
I was playing with a python wrapper around the Twitter API and made a simple class that would update twitter status with the geolocation derived from your IP address. The limitation begin proxies and a limited 70 chars status, yes there are few command like whereami but this is for the fun of it. When we travel here and there we can update our location with latitude and longitude, yes indeed even that can be made via a web browser, this for people who love there terminal more than anything.

The code is self explanatory with sensible comments where ever necessary, it uses urllib2 and python-twitter, which you must down from get python-twitter and install.

The below is the code that need to be edited, to indeed add the username and password of your twitter account.

30 Jun

Bash vs Python

in

A simple case study:
It's not about one programming language killing and replacing the other, its all about the purpose!

29 Jun

Mutt Gmail Labels and contact suggestions via IMAP

in

No matter how many E-Mail client are released, the power of Mutt remains unbeaten

IMAP or POP3 ?!

This has become much a religious war like the Emacs vs VI. With most of the ISP's facilitating the users with both the protocols and POP3 with few additions like "Leave messages on server" and "until I delete them." or "archive them" is making the battle more violent. But with the fundamental principle and enormous response from the majority of Mutt users IMAP and Mutt goes very well together

sudo apt-get install mutt to get mutt or can get the source and compile if not on Debian based OS.IMAP must be enabled in Gmail (settings -> Forwarding and POP/IMAP -> IMAP Access).

The below is configuration template i made that helps to achieve Mutt+IMAP+SSL+GNU GPG+Labels and also contact suggestions using GoogleCL:
Place the file in ~/.muttrc or ~/.mutt/muttrc