Copy hard disks or partitions using dd

Warning: The following is for personal note only, and is not meant to be a tutorial or guide. On Debian server at work, we have /home reside on /dev/hda6 and I want to move to a new hard disk /dev/hdb. First, I need to format /dev/hdb using fdisk. Then use dd to copy the content from /dev/hda6 to /dev/hdb1, the newly createdd ext3 partition. # dd if=/dev/hda6 of=/dev/hdb1 bs=1024 The above commands instruct dd to read the content from /dev/hda6 and write it to /dev/hdb1....

July 14, 2009 · 1 min · 154 words · kenno

Pidgin – old version of libpurple and unknown protocol

Aaaahhh… I fixed the Pidgin problem with Unknow protocol just 5 minutes after the previous post was made. I’m going to write how I found out the problem and how it has been fixed. If you’re interested, keep reading. In the previous post, I mentioned that I would removed the Pidgin package completely including its configuration file (# apt-get –purge remove pidgin.) I did and followed by re-installation of Pidgin, unfortunately, it didn’t fix anything....

July 10, 2009 · 2 min · 255 words · kenno

Pidgin – Protocol Unknown (FIXED)

Update: The problem has been fixed. Please see the above post. A few weeks ago, Pidgin could not connect to Yahoo messenger server because Yahoo was changing its protocols. At the time, the Pidgin was at version 2.5.5. Then that Yahoo connection problem has been fixed in version 2.5.7 and newer of Pidgin. Anyway, Pidgin is acting up again. This time I’m not sure what is going on, and it didn’t seem other people are experiecing the same problem – Protocol Unknown for all types of accounts....

July 10, 2009 · 1 min · 209 words · kenno

PHP: number of days between two dates

It’s Saturday, what am I doing in front of the computer? I should be out and enjoy life. ^o^ A colleague asked to customize a theme for his blog using WordPress. Because I didn’t have any good plan this Saturday, learning PHP sound like a logical and useful choice. Well, I bribed myself with a bottle of Tui. Then, I found an interesting PHP related post by Chorn Sokun entitled “PHP date diff“....

July 4, 2009 · 2 min · 240 words · kenno

Import photos from iPhone without iPhoto

So how do you transfer your photos from the iPhone 3G to your laptop running OS X if you don’t have iPhoto app? — Easy, just use the buit in app called Image Capture. The app can be run from: Finder -> Applications -> Image Capture Now, you can either download some or all photos by clicking on either one of the bottons as shown in the screenshot. Remember that you should have the iPhone connected to your copmuter, otherwise you would see the message saying the no device found or connected....

July 3, 2009 · 1 min · 102 words · kenno

Remove Universal Access Preference icon from Gnome panel

One of the advantages of using GNU/Linux operating system is that you hardly have to restart it. I have Debian on my laptop and it’s been running for months, until last night. It crashed and froze. Anyway, that’s not the main point this post was written. After restarting, I saw this new icon in the Gnome top panel (the third icon from the right): Well, for the start, I don’t know what it is and I don’t think I will have a need for it either....

June 23, 2009 · 1 min · 213 words · kenno

C# Math.Round

This is just a quick note to remind myself: <br /> Math.Round(4.4); //Returns 4.0.<br /> Math.Round(4.5); //Returns 4.0.<br /> Math.Round(4.6); //Returns 5.0. Credit: Math.Round Method

June 23, 2009 · 1 min · 25 words · kenno

Pidgin 2.5.5 &#8211; cannot connect to Yahoo messenger

I just noticed the abnormality with Pidgin 2.5.5 (running on Debian) these few days — I couldn’t connect my Yahoo messenger account at all. According to the discussion of Bug #389278 it appears that Yahoo was trying to change its protocol. A quick way to have Pidgin connecting to Yahoo messenger server again is to change the Pager server setting for the Yahoo account in Pidgin. To do this, from Pidgin:...

June 20, 2009 · 1 min · 158 words · kenno

NHibernate.MappingException: Unknown entity class

If you get MappingException error, there are two things you should check out: Make sure the name of the *.hbm.xml is spelled correctly — not *.hmb.xml nor *.mbh.xml Make sure the Build Action property is set to “Embeded Resource.” I learned this the hard way. First, I wrongly spelled hbm.xml and I had its Buld Action property set to “Content”. The above 2 points fixed the problem. Credit: VerySimple, Inc

May 26, 2009 · 1 min · 70 words · kenno

Debian JSON for Ruby

I tried to install JSON for Ruby via RubyGem, # gem install json and I got the following error message: Building native extensions. This could take a while...<br /> ERROR: Error installing json:<br /> ERROR: Failed to build gem native extension. <br /> /usr/bin/ruby1.8 extconf.rb install json<br /> extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)<br /> from extconf.rb:1<br /> <br /> Gem files will remain installed in /usr/lib/ruby/gems/1....

May 24, 2009 · 1 min · 120 words · kenno