Setting up keyboard with Raspbian on Raspberry Pi

Type in the below mentioned command in the terminal and follow the prompts :

sudo dpkg-reconfigure keyboard-configuration

The list of verified keyboard can be found here


Selectively hide posts on Facebook using Greasemonkey

Unlike a lot of people, I don’t happen to be a fan of Soccer. I know thats a bit difficult to believe, especially with this World cup season going on. Since the last few days, I’ve been waking up in the morning to a facebook full of soccer posts. I tried to tolerate it for a while, but then I realized that I couldn’t take it anymore, so I wrote this simple Greasemonkey script to hide all the posts on facebook containing the term soccer.

Named “I hate Soccer”, this script hides all the facebook posts that contain the word soccer.

In order to see it working, you need to install Greasemonkey addon for mozilla. from here. Once installed, just navigate to the URL:

You’ll see a dialog box come up, select install and that’s all. You won’t see any posts that contain the term soccer from now onwards on facebook.

The source code for the script:

// ==UserScript==
// @name           I Hate Soccer
// @namespace      none
// @description    removes all posts containing the keyword soccer
// @date           2010-06-13
// @author         texens
// @include*
// @require
// ==/UserScript==

$(document).ready(function() {

Modem Configurations for BSNL Broadband

I just got a BSNL Broadband connection (UL 750 Plan) and spent all day trying to setup the connection on my laptop and desktop. The setup on Windows 7 via wired connection was a cake walk, but the wireless on the Windows gave me hell.

After a lot of googling and some hit & trial, I was finally able to get the wireless as well as wired connection on both my machines – laptop and the desktop, in both Windows and Ubuntu.

System Information

I’m using Type 2 ADSL modem Teracom T2-B-Gawv1.4U10Y-BI. The machines I’ve connected run Windows 7 Professional and Ubuntu 10.04.


I’m assuming that you have been able to connect to the modem using the wired or wireless connection and we’re going to concentrate on connecting to Internet part.

  1. Fire up your browser and navigate to This is your modem’s IP address. You’ll be prompted to give username and pasword. By default, BSNL uses admin and admin as the username and password. respectively.You’ll be directed to the Home >> Overview Page.
  2. Before we start playing around with the settings and configuration, lets create a backup of our current modem settings. Go to Admin >> Backup & Restore, and create a backup file and save it on your local hard drive.
  3. If you’re using Teracom T2-B-Gawv1.4U10Y-BI, then you just got lucky, because I have the configuration file that you can use straight away and save yourself the effort to manually change all the settings. You may download the configuration file off this link:
  4. In order to save this configuration file to your modem, go to Admin >> Backup & Restore.Backup & Restore
  5. You still need to set your username and password in the new internet connection that has been created. Go to Configuration >> Internet Connection and edit the pppoe_0_35 connection. Keep on pressing the Next button until you arrive “Configure Broadband Username and Password” page. > Internet Connection Configuration” src=”” alt=”” width=”640″ height=”515″ />Use the username and password provided to you by your provider and click on Next. Finally on the last page, click on Apply to set everything up.
  6. The last step is to reboot the modem. Go to Admin >> Reboot and reboot the router therefrom. Wait for a minute and you’re all set with the modem.

Now that we have our modem properly configured, we can move to setting up the PC. For Windows, its pretty straight forward, but for Linux, it may not be all that easy. I had a hard time trying to configure linux to get the internet connection. And then I came across this totally awesome tool wicd. wicd worked like a charm and it was all very easily setup without any problem.

the bitch is here !

Ever since I replaced my CPU and 17 inch monstrous CRT monitor with a 14 inch HP laptop, I’ve been missing the large screen badly. Getting a new monitor to connect with my laptop was on my cards since quite some time, but I was unable to materialize it due to one or the other reasons. But, finally I bought a new big black beautiful bitch from Kolkata. It was pretty difficult to find a 22 inch monitor with HDMI port. I checked in 4 shops – including the (in)famous E-Mall in Chandani Chowk, Kolkata and got a negative. 22 inches are very common in CC but HDMI port was the problem. Finally, I was able to lay my hands on one with HDMI port at good old Arihant’s. Thanks to his bias for kgpians, he not only arranged the monitor with HDMI support, but also gave it to me at the old (cheaper) price. Here’s a snap of the laptop with the monitor connected with the HDMI cable.

Big Black Beautiful Bitch
the Big Black Beautiful Bitch

Coming to the specifications:

It has a maximum resolution of 1920×1080 and a dynamic contrast ratio of 10000:1. It has a D-sub, DVI-D as well as HDMI input connector. I have tried the DVI-D input connector once, but most of the time I’ve been running with the HDMI connector. Note that, the HDMI connector doesn’t come along with the Monitor and you’ll have to buy it separately. The picture quality has been great ! It took me quite some time to grasp all the functionalities of its vast menu. It has a number of preconfigured settings which can be changed from the monitor’s panel manually. It also has inbuilt speakers and supports HDMI audio. The response time is 5 ms (gray to gray is 2 ms). Its user manual also boasts of a senseye+photo technology which gives 5 preset modes to support everyday needs. I haven’t been able to discover these modes fully yet. But, for sure this bitch is on for some real adventure for the coming few days.

There seems to be some problem with ubuntu 10.04 as it has failed to support the HD audio on my system. It works absolutely fine on windows 7 but ubuntu is creating quite some trouble. But I’m not surprized, 10.04 was launched jst a week back and its pretty much expected to have some bugs in the system for the next few days. I’m hoping that the problem will be fixed asap. I’ve been using the monitor for mostly 2 purposes – viz coding and watching movies in full HD. The experience is simply awesome ! Combined with a Creative 2.1 speakers, it acts pretty much like a Home Theatre system. Very soon I’ll be getting myself a 5.1 speakers and it’ll add some more fun to the experience.

Hindi translations for limesurvey

I had an interesting experience today. We needed to translate a news article posted on limesurvey website into hindi. I had never done any translations before and had absolutely no idea how to do it. In the absence of a Hindi keyboard, it bacame all the more difficult.

My first thought was to try Google translations. After a couple attempts, I realized that the google translations wasn’t good enough. Fortunately, while googling for translations I stumbled upon 2 very useful resources – Google Transliterations and shabdkosh.

Using Google Transliterations, one can type hindi words using english alphabets and the transliteration engine automatically convrerts the words from english alphabets to hindi alphabets. On the other hand, shabdkosh is an excellent English to Hindi dictionary. On querying english words, it returns the translated words in hindi alphabets and makes life easier 🙂

It would have been a herculian task to do all the translations in the absence of these two amazing resources. I’ll be getting myself a HIndi keyboard in a couple days to make it easier to type in the hindi alphabets physically.

Google Summer of Code 2010: Limesurvey

The Google Summer of Code results are out and I luckily made it to the final list :D.

For those who aren’t aware of GSOC, The Google Summer of Code (GSoC) is an annual program, first held from May to August 2005, in which Google selects hundreds of students from across the world who successfully complete a requested free software/open-source coding project during the summer.

The event draws its name from the 1967 Summer of Love (of the Sixties counterculture), and the idea for the SoC came directly from Google’s founders, Sergey Brin and Larry Page. This year Google has awarded 1025 projects to about 125 organizations.

I’m working on the project “Limesurvey 1 – File Upload Question Type”

LimeSurvey (formerly PHPSurveyor) is an open source online survey application written in PHP based on a MySQL, PostgreSQL or MSSQL database. It enables users without coding knowledge to develop, publish and collect responses to surveys.

In all there are 3 GSoC students in Limesurvey. While I’m working on the File Upload Question Type project, the other two are working on the Database Storage Engine project.

My proposal is available here, feel free to take a look at it and drop back any feedback.

Protecting files and directories on webserver using .htaccess and .htpasswd files

You can protect specific files and directories on your webserver using .htaccess and .htpasswd files.
The following is an example to get you started.

Create a simple text file using your favourite text editor and name it .htpasswd
Now you need to write the following into your file in a line:


But it is not put as it is, rather it is encrypted and then entered into the file.
For example this is what it looks like on my system


You can use this link to encrypt your file:

Here, we are done with the .htpasswd file.

Lets move to the .htaccess file. One can use the .htaccess file to prevent the access to certain files and/or directories on the webserver.
Create a new text file named .htaccess and put the following lines to the .htaccess file.

AuthUserFile /absolute/path/to/.htpasswd
AuthGroupFile /dev/null
AuthName ‘Protected Area’
AuthType Basic

Now depending on you requirement, you may add the following lines to the file.

  • If you want to prevent access to a directory, then put the .htaccess file into the directory which needs to be protected and add the following lines to it. Note that these lines are in addition to the 4 lines aforementioned.

<limit GET PUT POST>
require valid-user

the whole .htaccess file will look something like this:

AuthUserFile /opt/lampp/htdocs/gk/.htpasswd
AuthGroupFile /dev/lampp/htdocs/gk/.htpasswd
AuthType Basic
Allow From All

<limit GET PUT POST>
require valid-user

  • If you want to prevent access to a file, then put the .htaccess file into the directory which contains the file to be protected and add the following lines.

<Files file-to-be-protected.extension>
Deny From All

The usage of .htaccess and .htpasswdd given here are very basic. For a detailed tutorial, take a look at this.