Posts Tagged ‘Internet’

The little twitter client I use :)

Here’s a small python script to update and read tweets from different timelines. You can use it with head/tail commands to customize the output. Actually, I wrote this script just for personal use and now I would like to share it with you 🙂 Thanks to tweepy python module, make sure it’s installed before trying the script 🙂

#!/usr/bin/env python
# Copyright 2011 Ershad K <ershad92@[nospam]>
# Licensed under GPL Version 3

import sys
import tweepy

CONSUMER_KEY = ' Fill here'
CONSUMER_SECRET = ' File here too'
ACCESS_KEY = ' Type yours here'
ACCESS_SECRET = 'Type yours here too'

auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(ACCESS_KEY, ACCESS_SECRET)
api = tweepy.API(auth)

if sys.argv[1] == 'u':

elif sys.argv[1] == 'p':
    public_tweets = api.public_timeline()
    for tweet in public_tweets:
        print tweet.user.screen_name,":",tweet.text
        print ""

elif sys.argv[1] == 'r':
    mention_tweets = api.mentions()
    for mtweet in mention_tweets:
        print mtweet.user.screen_name,":",mtweet.text
        print ""

elif sys.argv[1] == 'h':
    friends_tweets = api.home_timeline()
    for ftweet in friends_tweets:
        print ftweet.user.screen_name,":", ftweet.text
        print ""

Hope you like it 🙂


How to download .deb packages for offline installation

Some of my friends always complain that they are not able download packages due to Internet availability issues or usage limit. Most of them are using different Ubuntu versions, hence I cannot use APTonCD to download the packages for them. Here’s a small solution for this, Thanks to ilug-tvm and Rajeesh ettan.

Step 1: Get the download URLs in a file :

Execute the following command replacing package-names with required ones, separating by a space.

$apt-get -y install --print-uris package-name | cut -d\' -f2 | grep http:// > apturls

Step 2: Copy this file (apturls) to a machine which has high-speed Internet access, and execute the following command to download the packages:

$wget -i path-to-apturls-file

Step 3: Now get those downloaded packages to your machine, and install them using :

$cd path-to-the-downloaded-packages-directory

$sudo dpkg -i *.deb


Thank you, Good Luck 🙂

Irssi notification in terminal using ‘write command’

In Desktop Environments like KDE or GNOME, we have special libraries like knotify or libnotify to display notifications from various applications. Some applications like Konversation has its own notification systems. But what about command line tools like Irssi? Imagine you are chatting in tty1 using irssi and doing something in tty2.How will you know if someone has mentioned you nick in channel message? Well, here is a small solution for this.

Luke Macken has written a wonderful  perl script to display notifications using notify-send command in desktop environments. Thanks to open source, I tweaked the call to notify-send command to suit our tty-notification. All that you have to do is this :

Step 1 : Get the Script and write it to a file ‘’.

Step 2 : Replace

system(“notify-send -i gtk-dialog-info -t 5000 ‘$dest->{target}’ ‘$stripped'”);


system(“echo ‘$dest->{target}’ ‘$stripped’ | write <Your username>”);

Make sure you replace <Your username> with your system username.

Step 3 : Put it in ~/.irssi/scripts/ directory.

Step 4 : Execute the following commands in irssi:

/load perl
/script load notify

Done, you will get notification to the latest tty to which you are logged in!
Good luck 🙂

PS: The notification that you get is not eye-candy, please adjust for it now 🙂

Connect TATA Docomo Internet in Ubuntu 9.04

It’s wonderful to see people browsing in their mobile phones at work places and while they travel. Many Telecom companies provide cheap GPRS / EDGE based internet connectivity which can also be connected to a computer. Here, I will explain how to connect TATA Docomo Internet service in your Ubuntu machine.

Step 1 : Connect your phone and create a new ‘Mobile Broadband’ connection from the appeared wizard. You can Select ‘Airtel’ in ‘Service Provider’ which we will change to suit Docomo Internet.

Step 2 :  Change the ‘Name’ in ‘Summary’ page to “Docomo Internet”

Step 3 : Go to System –> Preferences –> Network Connections, Under the “Mobile Broadband” tab, select “Docomo Internet” and click on “Edit”.

Step 4 : Change APN to ‘ TATA.DOCOMO.INTERNET ‘ without quotes. Also, Under “IPv4” tab, select “Method” as “Automatic (PPP) addresses only”. We will give Open DNS as DNS servers, ie, in the “DNS Servers” box, give ‘,’ wihout quotes.

Done! Now click on the antenna icon in system tray, select “Docomo Internet” from the list – You are connected! Best of Luck 🙂

Categories: Experiments Tags: , , ,