http://setasbackground.blogspot.com

The Hong Kong Jockey Club (香港賽馬會) is one of the shittest websites, their online 投注站 only support IE.

Great news is that finally changed it. Although they are still sticking to Microsoft (Silverlight) now, we do have an alternative Moonlight for Firefox users. When IE and Safari get into the hkjc website, they can automatically detect and download the corresponding plug-in. Firefox failed to do so, because Silverlight is not open-source. Surprisingly, this time Microsoft is kind enough to create a similar open source project Moonlight. They provide a firefox plug-in, letting non-MS people to bet finally.

I was trying out Sabayon, and as usual, one of the first things I would like to set up is to configure SCIM to type Chinese.

Speaking of which, Sabayon interested me for a few reasons.  It’s based on Gentoo; every Linux user thought Gentoo is cool. While I didn’t have the patient go through the installation of Gentoo, trying Sabayon seems to make a lot of sense. Just like I’ve been using LinuxMint instead of Ubuntu,  I love these distros because they just “works” after initial installation.   Even more, Sabayon has two powerful package managers – emerge and equo.  emerge uses Gentoo’s infamous portage system to build packages straight from source, while equo provides package managers to install from pre-compiled binaries, just like yum in Fedora and apt in Ubuntu.  equo is fast, while emerge gives me the cutting edge versions instead of waiting others to pre-compil the binaries.  I’ve no complain.

To install scim and Chinese input methods (倉頡 is one of them), use the following command:

equo scim scim-tables

To make scim as default input method, put following lines to ~/.profile:

export XMODIFIERS=’@im=SCIM’
export XIM=”scim”
export XINPUT=”xim”
export XIM_PROGRAM=”scim -d”
export GTK_IM_MODULE=”xim”
export QT_IM_MODULE=”xim”
scim -d &

Now, restart X( by logout login again, or Ctrl+Alt+Backspace), then Ctrl-space, there should be the SCIM toolbar somewhere on your screen, then choose your favourite input method to use it.

And try the WenQuanYi Bitmap Song CJK Font, it is the best Chinese font I’ve seen.

equo install  wqy-bitmapfont

This command should work for other distro. I just ran into this problem when I was trying out sabayon, which for reason doesn’t start sshd by default.

# rc-update add sshd default

command to display hardware:

$ sudo lshw | less

command to display motherboard’s model:

$ sudo dmidecode | less

QQ is a very popular instant messenger software in China. Links to download QQ for Linux:
http://im.qq.com/qq/linux/download.shtml

However, when it runs, it always crash.
(Currently I’m using Ubuntu 8.04LTS)

Edit the following file can solve the problem:
vi /usr/bin/qq
#!/bin/sh

add the following line:
export GDK_NATIVE_WINDOWS=true

USB is a good interface but it can be very complicated and confusing(probably only for developers?)

The USB mini-male has 2 types:

  • Mini-A-male
  • Mini-B-male

The USB OTG devices detect itself as a host or client depends on the ID pin(pin 4). USB Mini-A-male has internal wiring to tie the ID pin to GND, which let the host to identify itself as USB host.

While most of the USB Mini-male cable you see on the market is Mini-B-male, which leave the pin unconnected.