Friday, July 23, 2010

Wubi has no install inside windows option

Err make sure that the USB drive has been plugged out. This option won't popup if the USB drive exist. Copy the iso and wubi.exe on local disk and then try out.

Wednesday, July 21, 2010

Using WinMerge with GIT

First set the environment as following

git config --replace --global diff.tool winmerge
git config --replace --global difftool.winmerge.cmd "winmerge.cmd \"$LOCAL\" \"$REMOTE\""
git config --replace --global difftool.prompt false

Prepare winmerge.cmd as following as it will be used by git. Make sure its in a path:

cat D:\MyDocs\bin\winmerge.cmd
echo Launching WinMergeU.exe: $1 $2
"C:/Program Files/WinMerge/WinMergeU.exe" -e -ub -dl "Base" -dr "Mine" "$1" "$2"

Use git command as :

git difftool

Thats it! Its all set.

Wednesday, June 16, 2010

Ubuntu | Force switch on screen lock and turn off lcd display

gnome-screensaver-command -l && xset dpms force off

Does the job, unless you, audience, can please suggest me better.

Saturday, June 12, 2010

Calculating time difference for reservations using Python

import datetime
# Since I wish to do reservation on 12 Sept 2010
d = datetime.datetime(2010,09,12)
# I can do reservation 90 days before
b = datetime.timedelta(90)
# The day when I can do reservation is
print d - b

Saturday, May 1, 2010

Timex HRM for Sale


Selling following:


Mail me!

Monday, April 12, 2010

A 3 years old defect!

Just can't believe it! A 3 years old defect lying there in the Python for so many years!

Sunday, February 28, 2010

Pidgin | libPurple | Python | Motion | Whacking combination to get instant motion alert!

Tried out writing a python snipped to post instant messages whenever a motion is detected by Ubuntu 9.10. I will post in details about the whole recipe latter. However important fact is, its its much much faster then using Twitter!


Happy Holi 2010

Happy Holi Folks!

Enjoy the colors!

Friday, February 19, 2010

django and threading :)

Figured out how to deal threading on django! While there are quite great many argument's and counter arguments, I believe its going to be a great if it doesn't break anything :)

A drop in for the threading:

Also a proxying solution using django:

Looks like I am all set with a desired proxy server :)

Saturday, February 6, 2010

SSH Chrooting on Ubuntu 9.10

SSH Configuration Section:

First thing first, setup sshd so that it allows chroot for a given user as following:

Match User jazz
ChrootDirectory /home/jazz
AllowTCPForwarding yes
X11Forwarding no

Next, make sure the directory /home/jazz is owned explicitly on root and no one else:

chown -R root:root /home/jazz

Next execute following:

cd /home/jazz
mkdir etc
mkdir bin
mkdir lib
mkdir usr
mkdir usr/bin
mkdir dev
mknod dev/null c 1 3
mknod dev/zero c 1 5

Execute following:
APPS="/bin/bash /bin/ls"
for prog in $APPS; do
cp $prog ./$prog

# obtain a list of related libraries
ldd $prog > /dev/null
if [ "$?" = 0 ] ; then
LIBS=`ldd $prog | awk '{ print $3 }'`
for l in $LIBS; do
mkdir -p ./`dirname $l` > /dev/null 2>&1
cp $l ./$l

Please note apps above can be modified as per needed binaries. In a nutshell all the libraries on which binaries depend must be copied to lib, even those libraries depending on libraries must be copied.

Finally copy library as following:

cp /lib/ lib

If you would like to share files between chroot and otherwise use following:

mount --bind /home/ubuntu/Downloads /home/jazz/Downloads

Ofcourse /home/jazz/Downloads must exist!

There chroot should work!

Thursday, January 28, 2010

Installing Ubuntu without functioning CDROM, Bootable USB Bios

In a nutshell here are the steps to be executed:

  • Assumptions: there is a bootable MBR already present, either though Linux or Windows.
  • Get a bootable USB drive and the CD image of the ubuntu distribution.
  • Install the CD image on the usb drive using software say: PendriveLinux.Com
  • Make sure that software goes fine, else it may crib about some error if the usb drive is not bootable.
  • Get a hold of plop boot loader. This guy allows you to boot to USB drive through its boot loader.
  • Reboot into plop boot loader and you are good to go!
Here is the screenshot of plop that should be visible:

Smooth, eye catching fonts on linux - using Ubuntu 9.10 - Karmic

First thing first, let the screen shots do the talk:

Thats pretty good looking font ;)


Thursday, January 14, 2010

|| प्रार्थना ||

आवाहनं ना जानामि न जानामि तवार्चनम् |

पूजांचैव न जानामि क्षम्यतां जगदीश्वर |

अपराध सहस्त्राणि क्रियन्तेऽहर्निशं मया |

दासोऽयमिति मां मत्वा क्षमस्व परमेश्वर |

पापोऽहं कर्माऽहं पापात्मा पाप संभवः |

त्राहिमां कृपया देव शरणागत वत्सल ||

गतं पापं गतं दुःखं गतं दारिद्रयमेवच |

आगता सुखसंपतीः | पुण्याच्च श्री दर्शनात् ||

Wednesday, January 13, 2010

Android theme on Ubuntu.

Looks pretty cool :P

Accessing X11 through VNC

Tested in Ubuntu Karmic 9.10

Create following file /etc/xinet.d/x11vnc as following:

service x11vnc
port = 5900
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/x11vnc
server_args = -inetd -o /var/log/x11vnc.log -display :0 -passwd yourpassword -many -bg
disable = no

Make sure it has permission set to 600 for security sake. Restart the xinetd daemon and you are good to go.