Skip to main content

Posts

Setup Blog software Movable Type

Do you want to host your own blog? It is easy. Install Linux. e.g. Fedora Core 4 including Apache HTTP server, MySQL Download free award winning blog software from http://www.sixapart.com/movabletype/ Open the tar.gz to /var/www/cgi-bin by cd /var/www/cgi-bin; tar -xzvf MT-x.y.z.tar.gz; Change the folder name for simplicity (Optional) by mv MT-x.y.z mt Setup MySQL In Linux, mysqld can be loaded by /etc/init.d/mysqld start. You can also configure service auto-load with chkconfig --level 345 mysqld on. Once the mysqld starts, you can access mysql with mysql –u root –p. By default, no password is set for root. For obvious reason, you need set the root password with mysqladmin -u root -h 'localhost' password "rootpass". Now we need create account and password for MT purpose. Connect MySQL with root account and password just assigned. mysql> grant all privileges on *.* to 'mtuser'@'localhost' identified by 'mtpasswd' with

Be careful when you play SONY CD :(

NEWS FROM CNET On Monday, October 31, alert users discovered that Sony BMG is using copy-protected CDs to surreptitiously install its digital rights management technology onto PCs. You don't have to be ripping the CD, either--just playing it from your CD-ROM drive triggers the installation. The software installs itself as a root kit, which is a set of tools commonly used to make certain files and processes undetectable, and they're the favored tool of crackers who are, as Wikipedia puts it, attempting to "maintain access to a system for malicious purposes." In fact, root kits are often classified alongside Trojan horses. And Mark Russinovich, who created a root-kit detection utility and was one of the first to blog about the Sony intrusion, discovered another little gem when he tried to remove the DRM drivers. It broke his computer--disabling his CD drive.

yum update trouble Cannot find a valid baseurl for repo

I recently installed Fedora Core 4. It is a fresh install, but somehow the yum update doesn't work. It reports "yum update trouble Cannot find a valid baseurl for repo". Search on the internet, I create 3 new repo files. cat fedora.repo [base] name=Fedora Core $releasever - $basearch - Base baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/$releasever/$basearch/os/ #mirrorlist=http://fedora.redhat.com/download/mirrors/fedora-core-$releasever enabled=1 gpgcheck=1 cat fedora-updates.repo [updates-released] name=Fedora Core $releasever - $basearch - Released Updates baseurl=http://download.fedora.redhat.com/pub/fedora/linux/core/updates/$releasever/$basearch/ #mirrorlist=http://fedora.redhat.com/download/mirrors/updates-released-fc$releasever enabled=1 gpgcheck=1 cat extras.repo [extras] name=Fedora Extras - $releasever - $basearch baseurl=http://download.fedora.redhat.com/pub/fedora/linux/extras/$releasever/$basearch/ gpgcheck=1 gpgkey=http://download.fedora.r

IKEA in Singapore

I went to Singapore IKEA store yesterday. Like many other chain brand store, IKEA looks and feels similar around the world. I have been IKEA in Beijing, China, Glendale, California, and also this one. It is homy and convenient, especially for foreigners just coming to a new environment. You can shop for your new home with a reasonable price and sound style. IKEA is popular, especially in Asia country. It serves as an icona of western culture, and is welcomed by young Asian. The quality is just so so. Singapore IKEA is an example. I bought a closet, 2 little bolts are missing from the package, a dining table, one table leg is different from the other 3, apparently the workers put the wrong one.

Singapore Road and Traffic Design Need Improved

Singapore has a special electric traffic tolling system - ERP. I need pay twice from my home to office. The charge is about $4 every day, not cheap! With all the money collected, the road can certainly improve better than now. Some examples - If you drive south from Upper Bukit Timah, you can easily miss the PIE . The road diverge before PIE and the sign to PIE is posted after the road is diverged. If you are in fast lane, you will miss it! Now driver further to AYE, you see the sign leading to AYE, you begin to accelerate so you can merge into expressway traffic. suddenly, there is a sign "Yield". It is not AYE yet, but a road parallel to AYE with traffic from right coming. What you can do is brake hard and stop. The sign is also very poorly posted. Most sign on expressway is located on the right, some are hiden under the tree. Most of time, the large size trucks are on that lane which totally block the view of the road sign from fast lane drivers. You better study the map

新加坡概况

新加坡 , 源于 1819 年英属贸易殖民地 . 1963 年加入马来西亚联邦 . 1965 年 8 月 9 日独立 . 地理位置介于印度尼西亚和马来西亚之间 , 北纬 1.22, 东经 103.48. 面积 692.7 平方公里 . 热带气候 . 潮湿闷热 , 雷阵雨多 . 最高点 Bukit Timah 166 米 , 最低点新加坡 0 米 . 新加坡人口 4,425,720. 人口增长率为 1.56%. 本人口平均寿命为 81.62 岁 . 其中男性为 79.05. 女性为 84.39. 人口中华人占 76.8%. 马来人占 13.9%. 印度人占 7.9%. 语言以华语 , 英语 , 和马来语为主要的交流语言 . 国家设有总统 , 总理内阁 , 议会 , 高等法院 . 总统任期 6 年 . 总统任命内阁主要成员 . 议会由 84 位议员组成 . 任期 5 年 . 执政党是人民行动党 . 新加坡 2004 年 GDP 为 1209 亿美元 . GDP 增产8 .1%. 人均 GDP 为 $27,800. 外汇黄金储备 1128 亿美元 . 新加坡做为世界最繁忙的海运港口之一, 与美国, 中国, 台湾, 日本, 韩国, 泰国, 和邻近国家有着密切的贸易往来. 译自 © CIA Online Publications Phttp://www.cia.gov/cia/publications/factbook/geos/sn.html

Secret Mark - BOM in UTF-8 text file

You open a text type file (.txt, .log, etc). You know it contains some Chinese or Japanese characters. You open it and it looks a mess. Is this file damaged? Maybe not. You can change the file suffix to .html, and open it within your favorite browser. Change the character encoding to utf-8. You may be able to view it. So what is wrong? The file is encoded in UTF-8. It needs hints to the view application such as Notepad to open it as UTF-8, not ASCII plain text. The hint is BOM (Byte Order Mark). For UTF-8, the BOM is "ef bb bf". When you save a file in UTF-8 in Windows Notepad, it actually inserts this BOM at the beginning. In case you generate this file in other ways, you can insert the BOM on your own. putc(0xef, traceFile);putc(0xbb, traceFile); putc(0xbf, traceFile);