Search
Categories
Ad

Archive for July, 2009

Upgrading Ubuntu using CUI: From 7.10 Gusty to 9.04 Jounty

Wednesday, July 15th, 2009

Problem

You want to uprade Ubuntu Linux to the latest version. (9.04 at this time)

Solution

to 8.04 Hardy

If your version is old enough that when you type

>sudo apt-get upgrade

and you will see 404 Errors, then You have to edit your sources.list like this.

$ sudo -s
# mv /etc/apt/sources.list /etc/apt/sources.list.gusty
# sed -e 's/gusty/hardy/g' /etc/apt/sources.list.gusty > /etc/apt/sources.list
# apt-get update
# apt-get upgrade

Then, install update-manager.

$ sudo apt-get install update-manager-core

to 8.10 Intrepid

$ sudo -s
# mv /etc/apt/sources.list /etc/apt/sources.list.hardy
# sed -e 's/hardy/intrepid/g' /etc/apt/sources.list.hardy > /etc/apt/sources.list
# apt-get update
# apt-get dist-upgrade

Intrepid to Jounty

sudo apt-get update
sudo apt-get upgrade
sudo do-release-upgrade

Finally, you can check your Ubuntu version like this.

cat /etc/lsb-release

Checking Ubuntu Version

Wednesday, July 15th, 2009

Problem

You want to check the Ubuntu version from a CUI terminal

Solution

You can find the version info here.

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.04
DISTRIB_CODENAME=jaunty
DISTRIB_DESCRIPTION="Ubuntu 9.04"

Sending ISO-2022-JP Mail from Ruby1.8

Thursday, July 9th, 2009

Problem

You want to send Japanese mail encodded in ISO-2022-JP from Ruby

Solution

I wrote a small class called Hog for this purpose.

Customizing the Explorer Menu

Thursday, July 9th, 2009

Problem

Right clicking on the Windows Explorer tends to be so slow, since the Windows needs to scan through the Registry to collect “extra menus” extended by some installed applications.

Solution (or, Suggestion)

If you do not want to change the registry by your hand, Lopesoft’s FileMenuTools is recommended. This application lists up all the extended menus and offers to toggle the visiblity of them.

using UTF8 in MySQL5

Monday, July 6th, 2009

Problem

You want to set the default character encoding to UTF8 everywhere in your MySQL

Solution

Edit my.cnf.

On Debian or Ubuntu Linux, you can find my.cnf at /etc/mysql/my.cnf. Add those lines below.

[mysqld]
default-character-set=utf8
 
[mysql]
default-character-set=utf8
 
[mysqldump]
default-character-set=utf8

On MacOSX, when you installed MySQL via MacPorts, you have to create one at /opt/local/etc/mysql5/my.cnf.

[mysqld]
default-character-set=utf8
socket=/opt/local/var/run/mysql5/mysqld.sock
 
[mysql]
default-character-set=utf8
 
[mysqldump]
default-character-set=utf8
 
[client]
socket=/opt/local/var/run/mysql5/mysqld.sock

overlay contents over flash object

Wednesday, July 1st, 2009

Problem

You want to show some overlay contents (e.g. dropdown menu items) over Flash objects.

Solution

You can enable z-index features of HTML to Flash objects by adding some parameters.

<object ...>
<param name="wmode" value="transparent" /
<embed ... wmode="transparent"/
</object>