Search This Blog

Thursday, November 22, 2007

browse gcc source code

To browse the source code of gcc use . For example, to look at the contents of trunk/gcc/testsuite/gcc.c-torture/execute/ directory, just go to . Similarly, to view the contents of a particular file, say pr34130.c use

Recently, a miscompilation bug has been discovered in gcc. It affects all the gcc versions from 3.3.6 to 4.2.2. This bug is fixed in 4.3.0 and a testcase trunk/gcc/testsuite/gcc.c-torture/execute/pr34130.c has been added to the testsuite so that the same problem does not arise in the future versions. I wanted to take a quick peek at this file but was not ready to download 1.2 gigabytes of gcc's svn repository just for this. The above tip came in handy under this scenario.

Alternate solutions:
1. If you are familiar with svn, it is possible to do
svn -q co svn:// execute
and download just the trunk/gcc/testsuite/gcc.c-torture/execute directory.

Related links :-

Saturday, October 13, 2007

list of predefined macros


guile-1.8_1.8.2+1 failed to build on alpha architecture. The complete build log can be found at

The buildlog tells us that the problem is in line 96 of test-round.c . To debug the problem further, the source of guile-1.8 can be downloaded by using

$cd practice/guile/
$apt-get source --download-only guile-1.8
$dpkg-source -x guile-1.8_1.8.2+1-2.dsc
$cd guile-1.8-1.8.2+1/

To see where test-round.c is residing

$find . -iname '*test-round.c*'

Now when we look at the source code of test-round.c around line 96

$cd test-suite/standalone/
$vim +96 test-round.c

we find that there is a predefined macro called DBL_MANT_DIG . But what is its value? More generally, how can we get a list of all the predefined macros and their values?

The answer is surprisingly simple. Just do

$g++ -E -dM - < /dev/null

#define __DBL_MIN_EXP__ (-1021)
#define __FLT_MIN__ 1.17549435e-38F
#define __DEC64_DEN__ 0.000000000000001E-383DD
#define __CHAR_BIT__ 8
#define __WCHAR_MAX__ 2147483647
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
#define __FLT_EVAL_METHOD__ 2
#define __DBL_MIN_10_EXP__ (-307)
#define __FINITE_MATH_ONLY__ 0
#define __GNUC_PATCHLEVEL__ 3
#define __DEC64_MAX_EXP__ 384
#define __SHRT_MAX__ 32767
#define __LDBL_MAX__ 1.18973149535723176502e+4932L
#define __UINTMAX_TYPE__ long long unsigned int
#define __linux 1
#define __DEC32_EPSILON__ 1E-6DF
#define __unix 1
#define __LDBL_MAX_EXP__ 16384
#define __linux__ 1

Since our interest is in the predefined macro DBL_MANT_DIG, the above output can be filtered by using grep.

$g++ -E -dM - < /dev/null | grep -i __DBL

#define __DBL_MIN_EXP__ (-1021)
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
#define __DBL_MIN_10_EXP__ (-307)
#define __DBL_DIG__ 15
#define __DBL_MAX__ 1.7976931348623157e+308
#define __DBL_HAS_INFINITY__ 1
#define __DBL_MAX_EXP__ 1024
#define __DBL_MIN__ 2.2250738585072014e-308
#define __DBL_HAS_QUIET_NAN__ 1
#define __DBL_HAS_DENORM__ 1
#define __DBL_MANT_DIG__ 53
#define __DBL_EPSILON__ 2.2204460492503131e-16
#define __DBL_MAX_10_EXP__ 308

This clearly tells us that DBL_MANT_DIG is 53 on this particular machine. More information about macros like DBL_MANT_DIG can be found in files
  • /usr/share/doc/glibc-doc-reference/html/Floating-Point-Parameters.html
  • /usr/share/doc/glibc-doc-reference/html/IEEE-Floating-Point.html
  • /usr/share/doc/glibc-doc-reference/html/Library-Summary.html
etc., which are all part of glibc-doc-reference package. On a Debian machine, this package can be installed by doing

$apt-get install glibc-doc-reference

Monday, October 01, 2007

websites incompatible with iceweasel

As we all know, iceweasel is basically a renamed version of firefox in Debian. The renaming was due to licensing issues. Except for the renaming there is no difference between firefox and iceweasel.

The following are the list of websites that wont work properly with iceweasel. The tests are performed with iceweasel, Debian Etch (Stable).

It is not very difficult to design a website which works the same way on all the browsers. I wonder why these companies are so incompetent in putting up a W3C standard complaint web site and not use any proprietary software. It also makes one wonder, if it would be better to take the business to companies who have the decency/ability to set up a browser-friendly website?

Updated on : Sep 25, 2008; Oct 1, 2007

Update on: July 27, 2014
On a machine runing Debian Jessie, iceweasel  30.0

Monday, September 03, 2007

initializing multi dimensional arrays in octave

In octave, multi dimensional arrays can be initialized using the reshape function. As an example, consider the following script.

$cat multidimensional_array.m
a = zeros(1, 24);
for i=1:24
a(i) = i;
b = reshape(a, [4 3 2])

The output looks as follows

$octave -q
octave:1> multidimensional_array
a =

Columns 1 through 16:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

Columns 17 through 24:

17 18 19 20 21 22 23 24

b =

ans(:,:,1) =

1 5 9
2 6 10
3 7 11
4 8 12

ans(:,:,2) =

13 17 21
14 18 22
15 19 23
16 20 24


Wednesday, August 29, 2007

thecarpcstore website is down

Wed Aug 29 13:16:35 EDT 2007

In case you do not know, the support forum for complainterator hosted at is currently down due to a massive DDoS attack. This is the second time spammers have DDoSed complainterator forums. On a positive side, this shows what an enormous effect complainterator reports are having in shutting down spammer's websites. Good job complainterator! You rock!

Related Links :

Tuesday, August 14, 2007

gmail and orkut got hacked or what?

$ date -R
Tue, 14 Aug 2007 20:34:30 -0400

Am I seeing this correctly? Did someone really manage to hack into google's servers? Some of google's popular websites such as gmail, Orkut seem to be down. I assume it is a temporary problem (a DDOS attack?). Whatever it is, it is impressive to see some non-english garbage on these popular websites.

Oh, I almost forgot, here are the screenshots for posterity :-)

Tuesday, July 17, 2007

tabs inside krusader

Krusader is a very nice file manager with lots of features. One thing that I find useful everyday is its ability to have multiple directories in different tabs. The following screenshot shows the location of these tabs in both the panes.

Here I am using Debian Etch (Stable), Qt: 3.3.7, KDE: 3.5.5, Krusader: 1.70.1 "Round Robin" . The above screenshot is produced by ksnapshot, edited by kolourpaint.

Thursday, June 21, 2007

Special shell variables in bash

Bash defines some special variables which are useful while writing shell scripts. They are

$0 = Filename of script
$1 = Positional parameter #1
$2 - $9 = Positional parameters #2 - #9
${10} = Positional parameter #10
$# = Number of positional parameters
"$*" = All the positional parameters (as a single word)[*]
"$@" = All the positional parameters (as separate stings)
${#*} = Number of command line parameters passed to script
${#@} = Number of command line parameters passed to script
$? = Return value
$$ = Process ID (PID) of the script
$- = Flags passed to script (using set)
$_ = Last argument of previous command
$! = Process ID (PID) of last job run in background

[*] Must be quoted, otherwise it defaults to "$@"

Reference :- Appendix B of "Advanced Bash-Scripting guide" by Mendel Cooper, Version 5.0. Debian users can get this document by installing the abs-guide package.

sudo apt-get install abs-guide

The necessary files can be found in /usr/share/doc/abs-guide . However, the abs-guide package contains only the html version of the document. A pdf version can be downloaded from .

Tuesday, June 12, 2007

which manpage am I looking at?

Q. which manpage am I looking at?

man -w keyword

gives the filename of the manpage that would be displayed when

man keyword

is entered at the commandline.

To get a list of all plausible manpages use

man -aw keyword

The -w option works for info also.

Q. which info page am I using?

info -w keyword

gives the path of the info file that would have been displayed if the command "info keyword" is used.

Ref :- The manpages of man, info!

Tuesday, June 05, 2007

Stapling paper

When stapling a bunch of letter or a4 sized sheets, staple sizes can be chosen using the following table.

Number of sheets Stack height Staple size
25 1/8'' 1/4''
60 1/4'' 3/8''
90 5/16'' 1/2''
160 9/16'' 3/4''

I assumed the thickness of paper is roughly around 0.1 mm (which might not always be correct!).

Disclaimer: The above info is just a guideline. Use it at your own risk. I am not responsible for any losses that you may incur due to using it.

Tuesday, May 15, 2007

updating texmacs to new upstream release

As of Tue, May 15, 2007 Debian contains the following versions of Texmacs.

Stable (Etch) : 1:1.0.6-10
Testing (Lenny) : 1:1.0.6-11
Unstable (Sid) : 1:

On my system, I am using Debian Etch, texmacs Couple of days back, texmacs released As a maintainer of this package, I want to build the package which can eventually be uploaded to Debian Sid. This document provides a recipe of commands to achieve this goal.

Here I assumed that you are using pdebuild for the first time. If you have used it before, skip the appropriate steps.

$cp /usr/share/doc/pbuilder/examples/ ~/bin/pbuilder-sid
$mkdir -p ~/pbuilder/result
$sudo aptitude install cdebootstrap
$pbuilder-sid create # if second time, use 'pbuilder-sid update'

$cat ~/bin/

DISTRIBUTION=`basename $0 | cut -f2 -d '-'`
pdebuild --buildsourceroot fakeroot \
--buildresult $BASE_DIR/result \
--auto-debsign \
-- --basetgz $BASE_DIR/$DISTRIBUTION-base.tgz \
--distribution $DISTRIBUTION $@

$cp ~/bin/ ~/bin/pdebuild-sid
$chmod +x ~/bin/pdebuild-sid

$cd ~/practice/

Obtain the latest source from texmacs website


Rename the upstream sources

$tar xzvf TeXmacs- -C .
$mv TeXmacs- texmacs-
$tar czvf texmacs_1.0.6.10.orig.tar.gz texmacs-
$rm -rf TeXmacs- texmacs-
$ls texmacs*

Obtain the latest sources available in Debian Sid


Create the corresponding Debian source for

$dpkg-source -x texmacs_1.0.6.9-4.dsc
$cd texmacs-
$uupdate -u ../texmacs_1.0.6.10.orig.tar.gz
New Release will be 1:
-- Untarring the new sourcecode archive ../texmacs_1.0.6.10.orig.tar.gz
Success! The diffs from version 1: worked fine.
Remember: Your current directory is the OLD sourcearchive!
Do a "cd ../texmacs-" to see the new package
$cd ..
$rm -rf texmacs-

Update the changelog and do other necessary stuff

$cd texmacs-
$cd ..

Build the package. The final packages will be in ~/pbuilder/result

$cd ~/pbuilder/result
$ls texmacs**
texmacs_1.0.6.10-1.diff.gz texmacs_1.0.6.10-1_i386.changes texmacs_1.0.6.10.orig.tar.gz
texmacs_1.0.6.10-1.dsc texmacs_1.0.6.10-1_i386.deb texmacs-common_1.0.6.10-1_all.deb
$linda texmacs_1.0.6.10-1.dsc
$lintian texmacs_1.0.6.10-1.dsc

Tuesday, April 24, 2007

gnuplot with GNU readline and history support

By default, the gnuplot packages in Debian are not built with libreadline (GNU readline). This is due to licensing issues (see /usr/share/doc/gnuplot/README.Debian for more info). Having the libreadline support is useful as it enables tab completion of file names inside gnuplot. Using GNU readline, one can also access the commands used in previous gnuplot sessions. The recipe for recompiling the gnuplot packages (in the Debian way) with support for GNU readline and history file is given below.

$cat ~/makefiles/gnuplot.install
#add the following or similar entry into the /etc/apt/sources.list
deb-src etch main contrib non-free
# other possible entries look like
# deb-src unstable main contrib non-free

# install packages necessary for building gnuplot
sudo apt-get install fakeroot
sudo apt-get build-dep gnuplot
# see the versions of gnuplot available
rmadison gnuplot
# I decided to use gnuplot 4.0.0-5

# go to the place where you normally compile packages
cd /home/software/compileHere/gnuplot

# (optional) move files from previous versions/compilations if they exist
# mv gnuplot-4.0.0/ /tmp
# (optional) move old binary deb files also if necessary
# mv gnuplot*deb /tmp

apt-get source gnuplot=4.0.0-5
dpkg-source -x gnuplot_4.0.0-5.dsc
cd gnuplot-4.0.0/debian/

# Edit the file named "rules" and change

# Enable the history file by adding

cd ..
dpkg-buildpackage -us -uc -rfakeroot
cd ..

ls gnuplot*deb
gnuplot_4.0.0-5_all.deb gnuplot-nox_4.0.0-5_i386.deb
gnuplot-doc_4.0.0-5_all.deb gnuplot-x11_4.0.0-5_i386.deb

sudo dpkg -i gnuplot*deb

apt-cache showsrc gnuplot

Friday, April 20, 2007

calculate md5sums in windows

A free, open source software called winMd5Sum is available from . This software can be used to compute md5sum values of files.

tested on : Windows XP

Saturday, April 14, 2007

recipe for building texmacs package with pdebuild

As of Fri Apr 13, 2007, the stable branch of Debian (Etch) carries texmacs 1:1.0.6-10, unstable branch of Debian (Sid) carries texmacs 1:1.0.6-11 . Assuming that pdebuild is used for the first time, the following recipe can be used to build the unstable's texmacs packages on a machine running Debian Etch (stable).
$cp /usr/share/doc/pbuilder/examples/ ~/bin/pbuilder-sid
$mkdir -p ~/pbuilder/result
$sudo aptitude install cdebootstrap
$pbuilder-sid create # if second time, use 'pbuilder-sid update'

$cat ~/bin/

DISTRIBUTION=`basename $0 | cut -f2 -d '-'`
pdebuild --buildsourceroot fakeroot \
--buildresult $BASE_DIR/result \
-- --basetgz $BASE_DIR/$DISTRIBUTION-base.tgz \
--distribution $DISTRIBUTION $@

$cp ~/bin/ ~/bin/pdebuild-sid
$chmod +x ~/bin/pdebuild-sid
$cd ~/practice/
$dpkg-source -x texmacs_1.0.6-11.dsc
$cd texmacs-1.0.6
The commands can be changed accordingly for other packages as well as for distributions other than sid. The ~/bin/ performs similar function for pdebuild as /usr/share/doc/pbuilder/examples/ does for pbuilder.

Tested on Debian Etch, using pbuilder 0.161

recipe for building texmacs package with pbuilder

As of Fri Apr 13, 2007, the stable branch of Debian (Etch) carries texmacs 1:1.0.6-10, unstable branch of Debian (Sid) carries texmacs 1:1.0.6-11 . Assuming that pbuilder is used for the first time, the following recipe can be used to build the unstable's texmacs packages on a machine running Debian Etch (stable).
$cp /usr/share/doc/pbuilder/examples/ ~/bin/pbuilder-sid
$mkdir -p ~/pbuilder/result
$sudo aptitude install cdebootstrap
$pbuilder-sid create # if second time, use 'pbuilder-sid update'
$cd ~/practice/
$pbuilder-sid build texmacs_1.0.6-11.dsc
The commands can be changed accordingly for other packages as well as for distributions other than sid. More info can be found at /usr/share/doc/pbuilder/pbuilder-doc.html

Tested on Debian Etch, using pbuilder 0.161

Wednesday, April 11, 2007

executing octave scripts

Using Octave 3.0.1, bash 4.1.5(1)-release on Debian Squeeze (stable)
$cat even_odd.m
# prevent Octave from thinking that this is a function file

function even_odd1(m)
# use bitand instead of mod to figure out if a number is odd or even
# if (mod(m, 2) == 1)
if (bitand(m,1))
printf("%d is odd\n", m)
printf("%d is even\n", m)

n = 25
n = 30
The above octave script can be run
1. Directly at the command line by doing
$octave -qf even_odd.m
n = 25
25 is odd
n = 30
30 is even
2. Inside Octave by doing
$octave -qf
octave:1> even_odd
n = 25
25 is odd
n = 30
30 is even
octave:2> n
n = 30
The advantage of first method is that no interaction is necessary. Useful for well tested scripts. The advantage of second method is that variables can be accessed even after the script is executed. Useful while debugging.

3. Source the script inside Octave
$octave -qf
octave:1> source("./even_odd.m")
n = 25
25 is odd
n = 30
30 is even
This approach comes in handy if the name of the script contains any special characters (ex:- '-' hyphen) or if the script has to be called by its relative path name.

Tuesday, April 10, 2007

insert page numbers in a texmacs document

To insert page numbers inside a texmacs document, do

Document -> Page -> Type -> Paper
Document -> View -> Page Layout -> Show header and footer

Sunday, April 08, 2007

copy paste code into blogger

The difference between pasting some random text and pasting source code is that, it is necessary to preserve the formatting (indentations etc.,) when pasting the source code. If you would like to list some program inside the articles posted via blogger, then you can do the following:
  • Convert all the tabs in the program to spaces. While this step is optional, I suggest this since there would be no unwanted surprises with tabs in the final document. If you are using a good editor such as vim, this takes less than a minute.
  • Go to "Edit Html" tab when editing the post
  • Put your code inside

    <pre class="verbatim" xml:space="preserve">
  • You can also use

    <pre class="literal-block">

That's it.

Thursday, April 05, 2007

Google groups feature suggestions - 1

Today I suggested the following feature to google groups at

I am the maintainer of a group called xxxx. For some reasons, I have to allow non members to post to this group. So in the group settings, I chose "Anyone can post" and checked the "Hold messages from non-members for moderation". However due to this, I am receiving enormous amounts of spam at

This is, as such, not a problem. The main problem is that I am not able to view the full headers of these pending messages. Currently, I can see only the body and subject of the pending message. Could you please allow moderators to see full headers of the pending messages? That way I can report these spams to knujon, spamcop etc.,

Tuesday, March 27, 2007

exiting full screen modes

Q. How to exit the full screen mode in VNC viewer?

A. Inside the vnc session press < F8 > and then choose "Exit Viewer". Tested this on xvnc4viewer 4.1.1+X4.3.0-2 , running on Debian Etch (currently testing).

Q. How to exit the full screen mode in NX?

A. Inside the nxclient session, go to the top right corner. Left mouse clicking there will iconify the NX session. Tested this on nxclient 2.1.0-17, running on Debian Etch (currently testing).

Related links :-

Monday, March 26, 2007

search for one word and exclude another word in vim

In vim, to find all the lines containing the word 'condition' (without the quotes) and to exclude those lines containing 'condition number', install the LogiPat plugin available at

The sample command looks like

:LP "condition" & !"condition_number"

Related links
  • Download and installation instructions
  • LogiPat on Author's homepage
  • Discussion on vim mailing list

Monday, March 19, 2007

Disable system bell

1. The annoying system beep on tab completions can be disabled in Debian by adding the following lines to ~/.inputrc
$cat /home/rajulocal/.inputrc
# do not bell on tab-completion
set bell-style none
set bell-style visible
Unlike "xset b 0", the above hack works even if you are not running X.

Tested on Debian Etch (currently stable), on

$bash --version
GNU bash, version 3.1.17(1)-release (i486-pc-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.

2. To disable the annoying bell sound in vim, gvim add the following line to ~/.vimrc
set vb t_vb=
More info for vim can be found at
:help visualbell
Tested on Debian Etch (currently stable), on vim 7.0.122

3. To disable the system bell sounds in tcsh, add the following line to ~/.cshrc
set nobeep
Tested it on Solaris 8, tcsh

Sunday, March 18, 2007

Tuesday, March 06, 2007

convert mp3 to wav

place the following script in ~/bin and call it mp3towav.

guest@kusumanchi:~/bin$ cat mp3towav
#! /bin/sh

# bash script to convert .mp3 files to .wav files
# works even if the files have spaces in their names.
# Author : Kamaraju Kusumanchi
# Email : kamaraju at gmail dot com
# Usage : cd into the directory containing .mp3 files and then execute
# this.
# Ref :- Linux Multimedia Hacks, Tips & Tools for Taming Images, Audio and
# Video by Kyle Rankin, pg-100

for i in *.mp3; do
lame --decode "$i" "`basename "$i" .mp3`".wav
Make the script executable
guest@kusumanchi:~/bin$ chmod +x mp3towav
guest@kusumanchi:~/bin$ ls -al mp3towav
-rwxr-xr-x 1 guest guest 450 2007-03-06 20:19 mp3towav
Cd into the directory containing .mp3 files
guest@kusumanchi:~/bin$ cd /entertainment/telugu_songs/godavari/
guest@kusumanchi:/entertainment/telugu_songs/godavari$ ls -1 *mp3
01 - Ramachakkani Sitaki.mp3
02 - Uppongele Godavari.mp3
03 - Manasavacha.mp3
04 - Manasaa Gelupu.mp3
05 - Tippulu Tappulu.mp3
06 - Andamgaalena.mp3
Run the script
guest@kusumanchi:/entertainment/telugu_songs/godavari$ ~/bin/mp3towav
There will be messages such as
ID3v2 found. Be aware that the ID3 tag is currently lost when transcoding.
input: 01 - Ramachakkani Sitaki.mp3
(44.1 kHz, 2 channels, MPEG-1 Layer III)
output: 01 - Ramachakkani Sitaki.wav (16 bit, Microsoft WAVE)
skipping initial 1105 samples (encoder+decoder delay)
Frame# 8878/8859 128 kbps L R
The corresponding .wav files will be created once the script completes. The .mp3 files are unmodified.
guest@kusumanchi:/entertainment/telugu_songs/godavari$ ls -1 *wav
01 - Ramachakkani Sitaki.wav
02 - Uppongele Godavari.wav
03 - Manasavacha.wav
04 - Manasaa Gelupu.wav
05 - Tippulu Tappulu.wav
06 - Andamgaalena.wav
Programs like k3b can now be used to burn these wave files onto a CD/DVD.

ఎన్ని సార్లు విన్నా ఇంకా ఇంకా వినాలనిపించే ...

నీల గగనా ఘనవిచలనా ధరణిజా శ్రీ రమణ
మధుర వదనా నళిన నయనా మనవి వినరా రామా!

రామ చక్కని సీతకి అరచేత గోరింట
ఇంత చక్కని చుక్కకి ఇంకెవరు మొగుడంట
రామ చక్కని సీతకి

చరణం 1
ఉడత వీపున వేలు విడిచిన పుడమి అల్లుడు రాముడే
ఎడమ చేతను శివుని విల్లును ఎత్తినా రాముడే
ఎత్తగలడా సీత జడను తాళి కట్టే వేళలొ
రామ చక్కని సీతకి

చరణం 2
ఎర్ర జాబిలి చేయి గిల్లి రాముడేడని అడుగుతుంటె
చూడలేదని పెదవి చెప్పె చెప్పలేమని కనులు చెప్పే
నల్లపూసైనాడు దేవుడు నల్లనీ రఘురాముడు
రామ చక్కని సీతకి

చరణం 3
చుక్కనడిగా దిక్కునడిగా చెమ్మగిల్లిన చూపునడిగా
నీరు పొంగిన కనులలోన నీటి తెరలే అడ్డునిలిచె
చూసుకోమని మనసు తెలిపె మనసు మాటలు కాదుగా

రామ చక్కని సీతకి అరచేత గోరింట
ఇంత చక్కని చుక్కకి ఇంక ఎవరు మొగుడంట
రామ చక్కని సీతకి

ఇందువదనా కుందరదనా మందగమనా భామా
ఎందువలన ఇందువదనా ఇంతమదనా ప్రేమా ??

ఈ పాట "గోదావరి" అను సినిమా లోనిది. వేటూరి గారు రచించారు. గాయత్రి గారు పాడారు. చాలా మంచి పాట కదూ? మీకు కూడా ఇది ఇష్టమేనా?

Monday, March 05, 2007

gnuplot realted links

Some useful links related to gnuplot

various ways of reading man pages

There are many ways to read man pages in Debian.

  1. man pagename
  2. In konqueror, man:pagename
  3. In vim, :Man pagename
  4. use vman, wman as described in Using vim as a man page reader
  5. In emacs, M-x man
  6. Install man2html and then go to http://localhost/cgi-bin/man/man2html in any browser
  7. xman -notopbox -bothshown &

Sunday, March 04, 2007

My experience with knujon

On March 4, 2007 I came across user damaging spammer provider thread on spamcop forums. I decided to give knujon a try after going through their website.

I registered my gmail address at after reading their FAQ.

After the registration, I was told to send the junk emails to

Submitting Junk emails to knujon is explained in and instructions specific to Gmail are at .

Install python and libgmail which are needed to run the gknujon script at
# aptitude install python python-libgmail
Get the python script
$ mkdir knujon
$ cd knujon/
$ wget
$ unzip
Go through all the files generated.

$ python -h
provides some help.

Sample command that I use looks like
$ python -l -p password -r

See gknujon.bat for sample commands and other options.

The script is really easy to use. The interaction looks like

$ python -l -p password -r
Login successful
- 89 unread messages found in spam folder
- downloading spam message (89/89)
- Zipping spam message (89/89)
- Sent report (2/2)
- There are 2 spam reports in your sent mail
Trash the spam reports? (y/n)
or Press Enter to quit: n
- There are 0 SEC-delivery notifications in your inbox
- There are 89 messages in your spam folder
Empty spam folder? (y/n)
or Press Enter to quit: y
trashing (89/89) : Get it !...
Press Enter to quit...
On Mar 10, 2007 I received a personal email address from knujon to which I can forward all my spam emails. The python script is still useful and the only change is in the "reporting address" field passed as an argument to -r.

Received my first report from knujon on Mar 15, 2007, second on Mar 21, 2007, third on Mar 30, 2007 etc.,

Currently my reporting results are
Sites reported by you: 110
Pending Suspensions: 46
Completed Suspensions: 6
Report Date: 5/13/2005

So to conclude, Knujon is definitely doing a great job in eliminating the spammy websites. I will be updating the above statistics as and when I get new reports from Knujon.

Amazing Nike ad

This is an amazing ad from Nike ( ) involving cricket. With 2007 Cricket world cup matches starting from March 13 IST, it only tells how much everyone is looking forward to it...

Sunday, February 25, 2007

Saturday, February 24, 2007

ogg player for Windows

VLC is a nice media player that can play ogg files on Windows. It is a open source software released under GPL.

Why I needed this?
I use wiktionary to search for meanings of the English words. The pronounciation of the words is stored in .ogg format. VLC can successfully play these .ogg files.

Monday, February 19, 2007

Using vim as a man page reader

vim, gvim can be used to read man pages. To accomplish this add the following lines to ~/.bashrc file.
# Use vim as a manpage reader
function vman {
/usr/bin/man $* | /usr/bin/col -bp | /usr/bin/iconv -c | \
/usr/bin/view -c "set ft=man nomod nolist so=999 ts=8 wrap\
titlestring=man\ $1" -
# Use gvim as a manpage reader
function wman {
/usr/bin/man $* | /usr/bin/col -bp | /usr/bin/iconv -c | \
/usr/bin/gview -c "set ft=man nomod nolist so=999 ts=8 wrap\
titlestring=man\ $1" -
After this man pages can be read by using vman or wman. Sample commands look like
guest@kusumanchi:~$ vman rsync
guest@kusumanchi:~$ wman rsync
Tested this on Debian Etch, running vim 7.0.122, gvim 7.0.122, man 2.4.3, iconv 2.3.6.

Advantages of using vim as a man page reader
  1. 'marks' can be used to navigate the man pages which can sometimes be quite large. Other pagers such as 'less', 'more' do not have this feature.

  2. vim's search commands, navigation commands etc., can be used. No need to learn another software or another set of shortcuts.

  3. ":syn on" gives beautiful colors while reading the man page

  4. Let's say while reading the man page of ssh, you encounter ssh_config(5). Now to read the man page of ssh_config(5), simply place the cursor on that word and do ctrl-]. This will place you at the man page of ssh_config(5).


Sunday, February 18, 2007

parts of a futon frame

The following is a Acme Black Metal Futon Frame containing a full size Futon mattress.

The various parts in this picture are

(A) Left Side Panel
(B) Right Side Panel
(C) Cross Braces (2)
(D) Left Hinge
(E) Right Hinge
(F) Upper Mattress Frame
(G) Lower Mattress Frame
(H) Short Bolts (8)
(I) Long Bolts (8)
(J) Medium Bolts (4)
(K) Protective Pads (4)
(L) Metal Washers (8)
(M1) Lock Washers 1/4'' (8)
(M2) Lock Washers 5/16'' (4)
(N) Large Hex Nuts (4)
(O) End Caps (4)
(P) Small Hex Nuts (8)
(Q) Allen Wrench C-Hooks (2)

(S) Standard Full Size mattress

Parts needed for assembling
(T) Allen Wrench
(U) Hex Wrench

Now, in what way is that useful? I have no idea! Just thought it is interesting!

Wednesday, February 14, 2007

Books on subversion

The following is a list of books on subversion.
  1. version control with subversion by Ben Collins-Sussman, Brian W. Fitzpatrick & C. Michael Pilato. The online edition is available for free at the above website. Paperback edition is also available.

  2. Pragmatic Version Control Using Subversion, 2nd Edition, by Mike Mason. Amazon has a paperback edition of this book.

  3. Practical Subversion, Second Edition by Daniel Berlin and Garrett Rooney. Amazon has a paperback edition of this book.

  4. Subversion Version Control: Using the Subversion Version Control System in Development Projects (Bruce Peren's Open Source Series), by William Nagel. Amazon carries a paperback edition of this book.
Please let me know if your favorite book on subversion is not listed here. I can add it.

Update1:- A more comprehensive list is available at

Last activity on this article : March 12, 2007

Thursday, February 08, 2007

last drafts of Fortran 95/2003 standards

The last draft of Fortran 95 standard can be downloaded from

The last draft of Fortran 2003 standard can be downloaded from

Relavent links:

Friday, January 26, 2007

input telugu characters in firefox

Reading telugu characters in firefox is good, but if you can write in telugu it would be much more cool! This, for example, would come in handy when searching in google for documents containing certain telugu words, when writing telugu scraps in orkut etc.,

The following screenshot shows how to select "తెలుగు - RTS" and search for documents containing "తెలుగు" in them.

Tested on Debian Etch (testing), firefox 1.5.dfsg+, Indic Input Extension 1.0

Friday, January 19, 2007

switched to the new blogger version

Today I upgraded my blogger to the newer version and the migration went pretty smoothly! The advantages include
  • I can use just my google account to log in! Cool! One less password to remember!
  • There is no “Publishing…” spinner anymore! Now when a new post is made, there is no need to republish; The blog gets updates automagically! Sweet!
Todo :- Previously I customized my template quite a bit. I have to upgrade this to the newer version and then customize it again!

Blog Archive