Umapathy's tech blog

My technical adventures, hacks or what I do in my free time.

Saturday, November 14, 2009

django

After learning python and using it as an alternate for perl (I have many reasons to ditch perl here and move to python), I came across django.

Never used a web framework before, it was a completely new thing for me. But it has turned out to be very good, easy and really rapid web development. I could switch some of my applications written in php and perl to python within days.

The django admin is a wonderful addition to the framework and reduces the development time to almost nil.

well. on a roll here.

Thursday, January 10, 2008

Javascript and ExtJS

Been doing something new for the last two weeks. I started researching on ExtJS and felt that I need to learn Javascript properly before trying to understand how ExtJS works. It's a very nice toolkit or framework or whatever is called. I tried with dojo 1.0 but it's too complex and lack of documentation forced me out. JQuery is uber cool but lacks widgets. We go for javascript only for the widget collection and dynamic manipulation which is currently absent in JQuery. Mootools is promising but I found I lacked intelligence to understand it. I don't know why. There is a good tutorial in clientside.cnet which helped me during the intial learning curve. It lacks one important panel (for layout) and so I had to discard it.
ExtJS is improving but will have some serious trouble in adaptation as it grows. First one is the license. Documentation is not as good as I expected. A dojo book like doc would help lot of web developers to learn and master ExtJS. Charting engines are missing. It's very important for any serious application to have some charting capability (Because the managers need it :-). I have heard that open flash can be combined with ExtJS but where are the tutorials. Are there any or am I not searching properly?

Tuesday, October 23, 2007

activemq

This is a open source messaging product from Apache foundation. Interesting. It seems to be around for a while and implements two protocols. Trying to learn and see what I can do with it.

Installing Ubuntu 7.10 aka Gutsy Gibbon

Further to the last post, I had managed to install the other required applications on my WinXP partition. Now it's the time for ubuntu.

Gutsy was released last week and everybody was looking forward to it. I had downloaded the ubuntu-7.10-dvd-i386.iso via torrents and burnt into a dvd. The dvd was loaded to do an integrity check which took 40 minutes to complete. Once done, I rebooted and choose to install Ubuntu. After the usual settings of time zone, location, language, keyboard and parition info, I was astonished to see ubuntu offering me to copy the accounts with their Documents and Settings from the WinXP installation. This one I have never seen before :-). It took 23 minutes to install and reboot my laptop.

Gutsy boots up and the first action is to update software. 8 updates are available as of today and it took around 7 minutes to download and install. After that, I checked the restricted drivers section. Found out and installed NVIDIA accelerated graphics drivers for my Geforce2 4200 and firmware for broadcom 43XX chipset. I had to reboot for the nvidia drivers to take effect.

The good part is that it took somewhere around 45 minutes for me to get a usable ubuntu system ready when compared to 7 hours of constant attention when compared with WinXP. Gutsy even reported my battery is broken and yes it is quite old (4 years) and needs a replacement. Cheers Ubuntu.

Sunday, October 21, 2007

Rebuilding laptop and my experience with reinstalling Windows XP

My laptop's Windows XP has slowed down quite considerably (god knows why?) and I was getting split or piecemeal responses when I was playing Age of Empires II. Its high time and I decided to reinstall Windows XP home edition from the OEM restoration disk.

I remember reinstalling 2 years back when I had a tough time in getting the right drivers for WinXP. Hope the problem would not have become worse after the importance given to Vista. Also I've been reading in some forums and articles that Windows installation is tougher than Ubuntu installation. Let's see how it goes.

My plan is to hav
Windows - 15 GB
Ubuntu - 15 GB
FAT32 share - 10GB

The OEM disk has booted and I have opted for a fresh installation. I deleted all the partitions (I had 7 partitions... oops) and I created a NTFS partition for 15360 MB and opted for a full format. It took exact 10 minutes to finish the formatting. Setup followed closely. My name, location, language and keyboard details were changed to UK. Some other minor settings followed and the whole installation got finished within 40 minutes and WinXP rebooted.

Now the hardest part. I loaded the Dell Driver System software CD and installed all possible drivers. The worst part is I couldnt find the driver for Broadcomm 4401 100 BaseT ethernet driver. That means, I can't connect to the internet and my wireless driver was also not perfect. After minutes of deliberation, I had one idea. I inserted my 2GB USB memory stick and the WinXP recognized it. Cool. I booted my office laptop, went to dell driver and downloads section and downloaded all possible drivers for Inspiron 8600. When installing the drivers, I had to reboot 6 times.

Time to install the updates. When I just configured windows update, it applied more than 40 hot fixes. I thought this is not going to end and instead went to the Microsoft windows update site and after a handful of screens and verifications, Windows XP Service Pack 2 was identified, downloaded and installed. I thought finally I had seen the light of the day, but when I rebooted again my laptop for the 9th time, I was in for a shock. I still had 42 updates to be applied on my computer. Its almost 7 hours now since I started installing Windows XP home edition. The sad part is Antivirus installation is yet to begin. That means I still cant use my system for another day :-(.

To be continued...

Saturday, August 18, 2007

how to enable mod_perl in apache2 for Fedora 6

I had a tough time in configuring this, may be my brain was not working at its best. perl.conf is the required conf file usually found under the httpd conf.d directory. In Fedora 6, it is found under /etc/httpd/conf.d/perl.conf. Open the file and uncomment and alter where ever necessary. Leave the PerlSwitches -w and PerlSwitches -T in your development environment and not in the production one. This will help you to identify problems easily. I usually consider it safe to keep the perl scripts in different directory as the default configuration goes. Uncomment the Alias /perl /var/www/perl and the subsequent Directory section.


SetHandler perl-script
PerlHandler ModPerl::Registry
Options +ExecCGI

Saturday, August 04, 2007

nslu and openslug upgrade

I have a slug which I use it as my home NAS. It has been running fine for last 1+ years with a 250GB hard disk attached to it. I had installed unslung on it which is the open source equivalent of linksys firmware with slight modifications but retains the same functionality. For long I wanted a bigger hard disk and a true embedded linux on my slug and wanted to try how the RAID stuff works.
Bought a new hard drive and upgraded the slug to SlugOS(BE)/openslug 3.10 beta. The whole effort of upgrading and migrating my existing storage is taking more time than I initially planned for.
I downloaded openslug 3.10 beta and flashed it on slug using upslug tool from my ubuntu laptop. Connected the new drive and erased all existing factory partitions. With fdisk, I created three partitions on /dev/sda. /dev/sda1 will have the / filesystem and the linux images. The next one was assigned to swap. The third one is the remaining bulk of the drive assigned to one partition which will be later shared via samba. Rebooted, logged in as root and ran turnup init to setup the initial configuration. After that, I created ext3 partitions (using mkfs.ext3) on /dev/sda1 and /dev/sda3 and initialized swap with mkswap /dev/sda2. With the script turnup disk -i /dev/sda1 -t ext3 created a root file system / and migrated the linux from internal flash memory to the disk. It was ready to be used with a reboot.
ipkg update, updated the packages list. Now, I installed samba with ipkg install samba which fetched the package from nslu2 repositories and applied it on my slug. Once done, I configured and shared some folders via samba.
I have installed mt-daapd as my itunes server which is pending setup. Ntpclient is not available in nslu2-linux package repository and returns nothing to be done here.

Thursday, July 26, 2007

Rebuilding PC

Again, my PC crashed this time because of my stupid mistake of hard booting when I realised the file system had problems. The first time happened when the PC crashed because of a power failure. I usually do with a single / file system to reduce the work (lazy) of creating file systems or LVM. So, I thought this time I will do the proper way. With this, I have lost all my perl scripts which weren't backed up elsewhere. Need to rewrite them again (sigh).
I installed CentOS 4.4 with LVM configured apart from /boot and swap. The installation was successful. Later I created two more logical volumes for mqm file systems under /var. Installed WMQ 6 and planning to learn the new features with WMQ6.
Planning to upgrade/move my nslu slug from unslug to debianslug in near future. I havent got a real value in moving towards debianslug and don't want to tamper with a NAS which is working perfectly fine.
Meanwhile, Microsoft has launched their own open source website with their own license submitted for OSI approval. Is it acknowledging open source? or EEE (Embrace, Extend and Extinguish)?. Time will tell.

Friday, July 06, 2007

Sensex hitting 15K and beyond

Today Sensex has touched 15000 mark and has slipped. With inflation on low, interest rates on high, the bulls are riding the market again. IMHO, the interest rates cannot go more and when it returns to normal levels, we may be seeing another spike in the market sentiments. Is the rupee exchange rate against dollar is worth in its current value. Are the Indian companies are over rated in their worth/value. Is their worth of their intrinsic values as Buffet says in his Essays to Investors? Only time will tell, but by the time people are trying to make money as much as they can. I suspect huge profit booking going to happen over the next week, but with new IPOs and NFOs, there is so much money with the AMCs, anything is bound to happen.

Saturday, June 30, 2007

Refreshing the Perl and the weekend

Its been a while I did something on perl. So, I introduced perl into one of the tasks I am doing write now. It uses the CPAN module MQSeries to talk to remote queue managers and publish queue statistics. Its been sluggish till now since I have forgotten some basics of perl (too much PHP). I tried out almost all Conf modules for different type of configuration files and finally settled down to XML::Simple with a xml based configuration file.
I was also hearing a presentation by the popular free software lawyer Eben Moglen who has contributed significantly to GPLv3. He was explaining in basic terms to a congregation of lawyers and software specialists of what is community development, patent issues and what was the process followed for drafting GPLv3. Nice presentation must do for all free/open software enthusiasts. Lastly, google maps have come with a customise your route option. Just drag the blue line which you get when you plan your route. Its nice and I am relying google for my daily life and can't imagine a life without google.

Saturday, October 28, 2006

Upgrading to Ubuntu Edgy from Dapper

Friday evening and a nice time to spend on upgrading to Ubuntu Edgy.
replaced all dapper to edgy in /etc/apt/sources.list and ran
sudo apt-get update && sudo apt-get dist-upgrade

I had to run apt-get update couple of times and apg-get dist-upgrade to capture those missing packages which were updated due to connection error.

At first, the apt-get update failed because of multiverse repositories. I commented out the following lines to proceed with the upgrade.
deb http://gb.archive.ubuntu.com/ubuntu/ edgy universe multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ edgy universe multiverse

Once the upgrade is complete, after the reboot, I ran update, upgrade again. I uncommented the above lines and ran update and upgrade again to complete the distribution upgrade to Edgy.

Thursday, October 26, 2006

I love Firefox 2

Too good is a simple word. I dont have statistics, but the overall experience is good. The pages load much faster (I can feel it), the tabs looks neat and glossy. Will update more in the days to come.

Saturday, September 16, 2006

mynslu2 on mypc

mynsul2 is my little NAS, which I want to be accessible on my PC. This nslu2 runs V2.3R63-uNSLUng-6.8-beta and till now not able to access it as root. Hope it gets fixed with stable version or planning to move to openslug in some time.

So, for now, the nslu2 is accessible only via samba and I had to mount my shares via samba rather than nfs. Installed smbfs
sudo aptitude install smbfs
smbclient -L returned all shares. Now,
mount -t smbfs -o username=
<user>,password=<passwd> //<nslu2>/<share> /mnt/<shared_folder>
It got mounted and I could browse the NAS. Now to make it permanent, I found an excellent resource (http://www.mattvanstone.com/2006/06/automatically_mounting_smb_sha.html thanks to Matt). Not that I didnt know this before, but I was lazy on a saturday morning and wanted to avoid reading man pages :-)

sudo vi /etc/fstab
//<nslu2>/<share> /mnt/<shared_folder> smbfs credentials=/home/<user>/.smbcredentials,uid=<user>,gid=<group> 0 0

sudo chmod 600 /home/
<user>/.smbcredentials

sudo mount -a worked.

Other settings

Once vnc is up, I had my gnome desktop so that I can play around with GUI. I was playing some games and wasting time. I configured the Desktop background to no image (to speed up loading), configured network to have a static ip rather than dhcp.

Fired synaptic package manager to update all packages (/etc/apt/sources.list was modified to include all universe, multiverse options).

Configuring vnc on my PC

I had connected my PC to network, but I dont have a monitor. I had installed openssh-server, so I could ssh to this host. Now my task was to enable vnc on ubuntu on command line.
Edited /etc/vnc.conf
added $XFConfigPath = "/etc/X11/xorg.conf";
set $geometry ="1680x1050";

And installed tightvncserver
sudo aptitude install tightvncserver

Fired up realvnc viewer from my windows laptop (realvnc is better in windows that tightvnc) and it came up good.

Got a PC

I got a PC (Dell optilplex Gx270) from ebay. Powered by pentinum 4 with 512 MB RAM with 40 GB harddrive. Installed Ubuntu dapper drake desktop version on top of it and set on to configure in my network.

Too many things

Too many things done. Planning to explain them in individual topics.

Sunday, July 09, 2006

Switching to Ubuntu

I had Open Suse 10.0 installed in my laptop. I was planning to switch to ubuntu for long and when DapperDrake got released, trying to get some freetime was proving to be difficult.
The installation was not straight forward for me. I had LVM configured in the previous Suse installation which I had to completely remove for the ubuntu installation to go ahead.
After installation I was nearly shocked to learn that root account by default is disabled. I enabled the root account using sudo passwd root. I am still trying to fix my ndiswrapper for Broadcom 4306 802.11g/b WLAN.

Saturday, May 06, 2006

Failed to get uNSLUng on my cute NSLU2

Its been pending for a long time and this week I decided to upgrade my Linksys NSLU2 to unslung firmware. I already run V2.3R63 and planning to go for unslung V2.3R63-uNSLUng-6.8-beta. I started off early in the morning (around 07:00) and still having troubles in restoring it.

I followed religiously what was told in the readme.txt of the firmware. I got it flashed and when trying to unsling to my disk, I got lost. I loaded up the firmware, boot with the disks and it was very much fine showing me all the disks and shared music over samba. I reboot it without disks, enable telnet and telnet into the box with root. Now I connect the disk1 and try to unsling, it says mounted disk not found.

I reboot without the disks and connect disk1 again. I login as root and check the mounted partitions. It is shown briefly

# mount
/dev/mtdblock4 on / type jffs2 (rw)
/proc on /proc type proc (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/mtdblock4 on /dev.state type jffs2 (rw)
ramfs on /dev type ramfs (rw)
/dev/mtdblock4 on /var.state type jffs2 (rw)
ramfs on /var type ramfs (rw)
none on /tmp type ramfs (rw)
/dev/sdb1 on /share/hdd/data type ext3 (rw)
/dev/sdb2 on /share/hdd/conf type ext3 (rw,sync)

# ls /share/hdd/data
caps lost+found public quota.user
quota.user~

# ls /share/hdd/conf
backup_sh.conf config config.bin group
group.ttt lost+found passwd
passwd.ttt server.log share share.info
share.info.ttt smb.conf smb.conf.ttt
smbpasswd smbpasswd.ttt tmp upgrade
usrgrp.info usrgrp.info.ttt


But the mount is lost after some time. Curious, I go out and check /var/log/messages.

<47>May 6 16:31:44 klogd: WARNING: USB Mass Storage data integrity not assured
<47>May 6 16:31:44 klogd: USB Mass Storage device found at 2
<46>May 6 16:31:47 klogd: kjournald starting. Commit interval 5 seconds
<44>May 6 16:31:47 klogd: EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
<46>May 6 16:31:47 klogd: EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,17), internal journal
<46>May 6 16:31:47 klogd: EXT3-fs: mounted filesystem with ordered data mode.
<46>May 6 16:31:48 klogd: kjournald starting. Commit interval 5 seconds
<46>May 6 16:31:48 klogd: EXT3 FS 2.4-0.9.19, 19 August 2002 on sd(8,18), internal journal
<46>May 6 16:31:48 klogd: EXT3-fs: recovery complete.
<46>May 6 16:31:48 klogd: EXT3-fs: mounted filesystem with ordered data mode.
<46>May 6 16:31:52 klogd: Adding Swap: 120480k swap-space (priority -1)
<44>May 6 16:33:07 klogd: EXT3-fs warning: maximal mount count reached, running e2fsck is recommended

So doing a fsck now to get the disk1 in order before proceeding. It is not going to finish by today.

Monday, May 01, 2006

New blog for technical posts

Most of the times I write only technical stuff interleaved with personal life. I decided to split this and hence have opened this blog exclusively for technical posts including the new I try out from time to time. My other blog will become a pure personal blog.