HP Pavilion DV6000 WebCam Problems
My webcam stopped working after installing Vista SP1, I found this information in HP’s Site while helpful it did not solve my problem. I found out that my webcam was listed as a regular USB device in the Device manager, with the name Sonix WebCam. It wasn’t under the Imaging Devices section of the Device Manager, so the instructions provided by HP did not work.
As soon as I deleted the Sonix driver and performed a “Scan for Hardware Changes” Vista detected the web cam correctly and installed the right driver, and all is working now…
Eval Code Blocks or subroutines in a Perl Regular Expression
Some times you need some intelligence behind your Perl regular expressions, so you need to capture some pieces of text into $1, $2,… and then process them before you replace them in the string.
Simple example you need to convert multiple dates included in a big string from 12/24/2009 to 2009-12-24.
You could do the following:
my $line = "abc","cde","12/24/2009","fff","11/23/2008","sss";
my $rr = \&my_sub;
$line =~ s/(\d{1,2})\/(\d{1,2})\/(\d{4})/$rr->($1,$2,$3)/ge;
print $line;
sub my_sub {
my ($s1, $s2, $s3) = @_;
return sprintf("%04d-%02d-%02d",$s3,$s1,$s2);
}
Notice the /ge in the regular expression? That is what gets your code executed before the substitutions get made. This being Perl I know there are another 200 ways of doing this differently, and I am sure 198 are faster and simpler. Care to comment? What is your way of doing this?
Easy Debugging for your Perl Catalyst Web Applications
I decided to give Catalyst a try and see how it works for me.
When writing and code I feel that the easiest it is to debug it the better the quality of the product, as such although I love perl, I hate the perl debugger. It is all text/command line, very unfriendly and time consuming.
So long ago I decided to use a perl graphical debugger and after testing several packages I finally settled with ActiveState’s Komodo IDE.
It is a great IDE, and great debugger, where you can inspect all your code and variables in a nice, friendly way.
I also supports remote dubbuging which comes in handy to debug Catalyst applications.
- Download the Komodo IDE and remote debugging tools from ActiveState and install them locally on your system, if your using the MyApp_servre.pl to develop and test it, or in the target system where you application resides.There are several versions of the remote debugging tools, make sure the one you download matched your Komodo version, and make sure you download the right platform as well.
- tar zxf Komodo-PerlRemoteDebugging-5.1.0-27487-macosx-x86.tar.gz (in my case I am using MAC,)
- mkdir /usr/local/lib/perl
- cp -R Komodo-PerlRemoteDebugging-5.1.0-27487-macosx-x86 /usr/local/lib/perl
- vi /etc/profile
and add the lines, please replace the 55217 with the port your Komodo IDE expects, you can get that value in the Debug Menu, Listener Status (Port field).
export PERL5LIB=/usr/local/lib/perl/
export PERLDB_OPTS=RemotePort=localhost:55217
export DBGP_IDEKEY=
save /etc/profile and execute: . /etc/profile to read it (the dot is important.)
Now you can open your controller in Komodo and add the variable $DB::single=1 where you want your breakpoint.
# controller file: database.pm
sub index : Path :Args(0) {
my ( $self, $c ) = @_;
# template file we want to use
$c->stash->{template} = 'list_users.tt';
$DB::single = 1; # Debugger Breakpoint
# here we selected the ModelName::table_name
$c->stash->{users} = $c->model('OrdersDB::users');
}
- Start you application server with
perl -d script/MyApp_server.pl (-d starts debug mode) - leave your Komodo open, open your browser and point it to http://localhost:3000/database
- I you go back to Komodo you’ll your application the Debugger stopped at your breakpoint ($DB::single).
Enjoy the easy life of debugging Catalyst applications
Web Application Development
I am sort of an old school programmer, in the sense that when I started, there were no GUIs, web interfaces, or fancy IDEs. I never really developed any code professionally although I have done a few projects here and there, more for the fun of it than for profit.
I have developed a lot of small plugins for WordPress, or Trac, but never have I started a Web Application from scratch. I now want to write a small order management web app for my company but the reality is that I don’t know where to turn to. I would like to use one of the new Web Application Frameworks, but I don’t want to have to learn Ruby or Python. I am most comfortable with Perl.
So what do you suggest I do? Catalyst, Jifty, any other options?
Your comments are welcome!
Leopard Mac Apache Forbidden User Site Problems
While configuring Apache on my MAC Leopard I ran into Forbidden 403 errors while accessing the ~user/ directory. Read a ton of posts and Apple forums but in the end what got it fixed was a post by Ricardo at Mutantur
chmod 701 ~
chmod 705 ~/Sites
Thanks Ricardo!
101 Spy Gadgets for the Evil Genius
I bought this book and it has paid for itself many times over. The information on hacking video senders is right on the money, and for $20, I turned the VCR sender bought at a department store into the $150 spy transmitter that many websites are selling.
Oh, and the taser gun made from the disposible camera…. Yah, it hurts! I would never try the two battery model > at least not on myself
Anywho, thanks to the author, I enjoyed the way the book lays out each project as it is being made so there is no confusion, and the underground feel of this book reminds me of the old anarchist cookbook files that used to be available on dialup BBS sites.
Gadgets you will be able to do from the book:
- Build and install a nanny cam for viewing and recording activity from afar
- Hear and record what’s said from great distances
- See and photograph in the dark
- Wire yourself for undetected recording
- Construct a hidden briefcase camera
- Tap and record telephone conversations
- Privately record every called number, with a time stamp, from any phone
- Build a secret time-lapse camera
- Build and install motion-activated spy cameras or listening devices
- Alter photographic evidence
- Digitally disguise your telephone voice
- Secretly install key-logging software to see what’s done on any computer
- Learn what Web sites others are surfing
- Recover deleted computer files
- View other peoples’ computer screens from your PC
- Control your spy equipment from afar
Check it out it is great I wonder if the author is on a no fly list now?!
The new Kindle 2 from Amazon

Kindle 2
Amazon released their new Kindle 2 and I just nought one. My initial impression was that the new device is much thiner that a regular paperback, and also light weight. I often grab a book with one hand only and I liked the fact that I can hold the device up for extended periods much more comfortably than a real book.
The beat thing about it is that I can read all my PDFs, listen to MP3 music and download new content immediately from anywhere without the use of the computer, or wireless fees!
Amazon offers tons of books and newspapers, free dictionary and wikipedia.com access, and makes it easy to download new content or even send content to your “Kindle e-mail”. I found this feature very cool. You’re friends can email you documents, and you can open them in your Kindle immediately without using a computer.
I think Amazon has got a winner on their hands, think of iTunes for books. The Kindle 2 is the new iPod!
PlayStation 3 Yellow Led of Death (YLOD)
Today I got a Yellow Led of Death on my PS3. The PS3 does not turn on and the all you see is the power led going fro Red to Green, then to Yellow, then you hear three fast beeps, and finaly the LED blinks Red and nothing else happens.
I seems that the only solution is to send the PS3 back to Sony. They will do it for free if your’s is still under warantee if not you’ll need to spend $150 USD. The RMA process should take about 10 days.
If this happens to you, and like me you have a Game disk inside the PS3, you’ll also find out that the eject button will not work, and you will not be able to remove your disk.
Some people reported that Sony did not send their games back with the new console, so I was worried about loosing an additional $50.
I found a way to eject the disk:
- Power off the PS3 on the main switch on the back of the console
- Press and hold the Eject button
- Turn on the main power switch
- The PS3 LED will go green and the fan will spin at max speed
- Wait a few seconds and press the eject button a couple of times, the disk should now eject
- watch the PS3 die after 30s or so…
This procedure did not fix my PS3 but at least I got my disk back before sending it to Sony for repair.
Let me know if this worked for you?
Recover from TeraStation Live Boot Errors
If you found this post odds are that your TeraStation is in problems won’t boot, and Buffalo’s Tech Support is telling you to format your disks, and wipe out your data. First things first, hard disks today are very reliable, you have multiple copies of your data in the TS disks do not wipe them out and cause your own misery.
To follow this recovery procedure you’ll need
- Telnet or SSH access to you TeraStation, check this article on how to do it
- A Linux PC (Debian, Ubuntu, Red Hat), or Linux Live CD for to boot on you Windows PC
- SATA Cables or powered SATA USB Adapter
Well it had to happen I was so happy with my TeraStation that it finally had to die or show some stupid design flaw.
I got a PS3 for my birthday and immediately wanted to stream all my music from the TS to it. Buffalo sell’s the thing with a build it DLNA Mediaserver so I thought the process would be simple enough… Big mistake.
If your music library has few files you may be able to get along with the TS Live mediaserver but I would seriously discourage its use.
The problem arises that, by default, the TS stores all media server information in its root partition, under /mnt/mediaserver. This, in my opinion, is a design flaw since the root partition is very small and almost full in every TS shipped out of the factory. So even on a factory unmodified unit the size of this partition is less than 500Mb and full to 80%. That gives you very little space to store the media server information. On a modified unit, on which you may have installed additional tools the space on this partition maybe even less.
Now when the root partition is full all sorts of strange things start happening to your TS and you better get ready because you’re in for a tough ride.
So going back a bit, I configured the PCast, and had it recreate the media server database, after a full 24 hours the PS3 would see a lot of directories in the TS but no files, music, pictures, nothing. So I thought that the CPU on the TS was slow that it was still indexing all the media, and left it running for another day.
Day 2 same results, so disappointed I finally disabled PCast and thought that the TS cannot handle a media library this size.
After disabling the PCast server I tried to login to the TS admin interface and after logging in I would be kicked out again, and again. No error message nothing just sent back to the login page.
I rebooted the TS and horror, of horrors, it never came back up again, no network, not found by the NAS Navigator utility, firmware updater nothing!
So if you’re in the same place as I was DO NOT REBOOT YOUR TS. Open a telnet session, of if configured SSH, to the TS and delete all the files in /mnt/mediaserver. You can also delete the TS manuals from /mnt/info and save an additional 23Mb.
- ssh root@<ts_ip_address>
- rm -fr /mnt/mediaserver/data
- rm -fr /mnt/info
You should now be able to login in the administration interface and your TS should be ok.
If you already rebooted the TS, and you are getting E04 system errors, and the TS wont even go into Emergency Mode (EM Mode). Then you need to ignore all procedures you will find online telling you to delete partitions, loose your data, and disk formating…
Your data is there, untouched in the disks so don’t go ahead and delete it, causing your own demise. All you need to do now is to connect each disk into a Linux box and delete the afore mentioned files. All the disks in the TS are SATA, so I used a USB to SATA & IDE Adapter and plugged each disk to my laptop. You can use any SATA adapter as long as it has power supply, a USB port will not have enough juice to power the hard disk.
Now you need to download a Ubuntu Live CD, and boot you PC with it. No files on your computer’s disk will be changed so you can do this on a Windows machine as well.
- boot the Live CD
- connect each disk (or all disks if you have enough connectors) to your PC or laptop
- open a terminal window
- sudo bash
- mount -t xfs /dev/sda2 /mnt
- cd /mnt
- rm -fr /mnt/mediaserver/data
- rm -fr /mnt/info
- umount /dev/sda2
- repeat steps 5 to 9 for each disk. If you connected all disks at once you need to use /dev/sda, /dev/sdb, /dev/sdc and /dev/sdd in step 5
Plug all your disks back into the TS and boot it. You should now be able to access the TS as before, with all your data in it.
If not, and your TS says it cannot mount the disks on the display, then you do:
- ssh root@<ts_ip_address>
- mdadm –examine /dev/sda6
/dev/sda6:
Magic : a92b4efc
Version : 00.90.00
UUID : 402409dd:8c2c66a9:76da68d3:0e959cec
Creation Time : Tue May 20 22:34:46 2008
Raid Level : raid5
Device Size : 487315584 (464.74 GiB 499.01 GB)
Array Size : 1461946752 (1394.22 GiB 1497.03 GB)
Raid Devices : 4
Total Devices : 3
Preferred Minor : 2
Update Time : Fri Dec 19 08:42:21 2008
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 1
Spare Devices : 0
Checksum : a9bb53a5 - correct
Events : 0.2210788
Layout : left-symmetric
Chunk Size : 64K
Number Major Minor RaidDevice State
this 0 8 6 0 active sync /dev/sda6
0 0 8 6 0 active sync /dev/sda6
1 1 8 22 1 active sync /dev/sdb6
2 2 8 38 2 active sync /dev/sdc6
3 3 0 0 3 faulty removed
Notice that /dev/sdd6 (in my case) is faulty, you need to see which one if faulty in your situation then you need to:
root@YourHost:/# mdadm --stop /dev/md2
mdadm: stopped /dev/md2
root@YourHost:/# mdadm -a /dev/md2 /dev/sdd6
mdadm: re-added /dev/sdd6
root@YourHost:/# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid5] [raid4]
md2 : active raid5 sdd6[3] sda6[0] sdc6[2] sdb6[1]
1461946752 blocks level 5, 64k chunk, algorithm 2 [4/3] [UUU_]
[>....................] recovery = 1.7% (8464512/487315584) finish=495.7min speed=16009K/sec
md1 : active raid1 sdd2[0] sda2[3] sdb2[2] sdc2[1]
497920 blocks [4/4] [UUUU]
md0 : active raid1 sdd1[0] sda1[3] sdc1[2] sdb1[1]
297088 blocks [4/4] [UUUU]
unused devices:
Now what you do is wait. After 500 minutes… you should get
root@YourHost:/# cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid5] [raid4]
md2 : active raid5 sdd6[3] sda6[0] sdc6[2] sdb6[1]
1461946752 blocks level 5, 64k chunk, algorithm 2 [4/4] [UUUU]
md1 : active raid1 sdd2[0] sda2[3] sdb2[2] sdc2[1]
497920 blocks [4/4] [UUUU]
md0 : active raid1 sdd1[0] sda1[3] sdc1[2] sdb1[1]
297088 blocks [4/4] [UUUU]
unused devices:
Now the md2 array (array where you data files are) is back up and running. You can now mount it by hand running
root@YourHost:/# mount /dev/md2 /mnt/array1
Before you reboot your TS there’s one more change you need to do. Edit the /etc/melco/diskinfo file and where you see “array1=off” replace off with raid5. Like so
root@YourHost:/# vi /etc/melco/diskinfo array1=raid5 array2=off disk1=array1 disk2=array1 disk3=array1 disk4=array1 usb_disk1= usb_disk2= usb_disk3= usb_disk4=
You can now safely reboot your TS and it will be back up and running with all your data intact!
If you forget to do these last step of editing the /etc/melco/diskinfo file your TS will still complain and display disk errors when booting and the web interface will tell you to format the disks.
Again misleading information, that will make you wipe out your data. Buffalo should be more careful and redesign the TeraStation partitions.
It is unacceptable that a 2 TB device stops working and give all sorts of errors for lack of space in a boot partition, and then technical support tells you to format the disks, effectively resolving the lack of space problem but wiping out your data in the process. NICE!
ThunderBird Add-ons I use for Getting Things Done.
First and foremost I think we should do our best not to send misspelled emails so install all the dictionaries you need from https://addons.mozilla.org/en-US/thunderbird/browse/type:3
Must have calendar for Thunderbird. If you’re looking to throw away Outlook you have to start here.
Automatically compress attachments before you send your messages. It is easily configured to ZIP all attachments to a single file, or multiple files, ignore certain files or not to zip them if gains are not noticeable. unfortunately AutoZip does not work for Mac users at this point.
LookOut allows Thunderbird to work with Microsoft’s mail tools by decoding metadata and attachments encapsulated/embedded in a TNEF encoded attachment (aka winmail.dat).
This is an unavoidable add-on since most of your Outlook friends will send RTF formated email with the dreaded winmail.dat attachment. To educate them, and make everybody’s life a little easier have them reconfigure their Outlook client to stop sending email in Rich Text Format (RFT). For more information on how to do stop sending Winmail.dat files visit Microsoft’s Knowledgebase
Simply you need to Turn off Rich Text for messages in Microsoft Outlook
- Click on Tools
- Click Options, and then click the Mail Format tab.
- In the Send in this Message Format list, select Plain Text or HTML, and then click OK.
Now everyone, no matter what email program they are using, will be able to receive your email with no problems.
Change priority of the received messages from the toolbar button and the context menus…
Makes life easier by allowing to quickly change message priority in the compose window.
Quicktext is an extension for Thunderbird that lets you create templates that can be easily inserted into your own emails.
This one is a big time-saver, since you can create many text snippets or whole email templates that expand on demand from keywords or key-strokes.
Seek adds faceted browsing features to Mozilla Thunderbird and lets you search through your email more effectively. Quick and easy search for those hard to find emails.
Simple way to attache a tag to a message with one mouse click
Installing ThunderBird Add-ons
Installing add-ons is simple just
- click on Tools, followed by Add-ons
- click the Extensions button on the Add-ons window Toolbar
- click the Install button
- Select the *.xpi file you want to install
- Wait for the timer to get down to 0 and click the Install Now button
repeat the process for all add-ons and then restart Thunderbird.
Configure Thunderbird Add-ons
- click on Tools, followed by Add-ons
- click the Extensions button on the Add-ons window Toolbar
- Select the desired add-on and, if any configuration is possible the Preferences button will not be grayed out, so click it.