今天放工後和同事打算到深水埗買齊其餘的CPU,Display Card,底板等,因為我想試試 Hackintosh,及安裝CentOS玩Virtualization 所以Display Card,底板等的選擇就比較少,Display Card選了Sapphire HD2600Pro PCI-E 256MB DDR3 HK$499,但結果已經沒有貨了。只好再選另一張,但我又忘記了那一張Display Card可以用在Hackintosh上,只好放棄,星期六再買吧﹗

最後只買了Logitech Cordless Desktop S530 Laser for Mac HK$438回家,雖然是for Mac但 for PC亦可,因為 S530 的 Mouse 比 S510 好所以我選了 S530,回家途中還下著雨。:(
今天上午要回公司 OT 下午就到旺角拿訂了的 Antec p150,一看到 P150 時比想像中大,總重達 13kg,P150 機箱已經包括了Antec NEO Power 430W ATX PSU,真的很重。Antec P150 是我用電腦二十多年來最貴的 Computer Case,用了HK$963,這部新的電腦用途做 Photoshop , Video Editing 及 Storage,因為仔仔所有的相片及影片都是 Digital Format 了。

Antec P150 產品介紹
Antec P150 Review
星期一和星期二兩天上了一個Microsoft辦的課程叫做Secure Application Development,是不是有點奇怪呢?因為通常Microsoft及Secure都不會同時出現在同一句句子之中。:) 這只是一個基本課程,最令我覺得奇怪的是其他同學,他們在Training Center的電腦上Gmail,用remote desktop連上在公司的PC,這些人的InfoSec意識實在太低,要他們寫出Secure的Application真是有點……
從報紙上看到香港仔一名 14 歲中三學生,因入侵 8 間學校內聯網伺服器而遭警方拘捕,而報紙上都稱這位 14 歲中三學生少年“黑客”,『黑客』這個詞彙和『電腦病毒』一樣被濫用,所有Trojan horse, Worm, Virus 一律都被稱作『電腦病毒』,而所有Hacker, Cracker, Script Kiddie 一律都被稱作『黑客』,其實這位 14 歲中三學生少年“黑客”只可以稱作 Script Kiddie,因他在Internet上 download 一些 cracking 的 program來入侵學校的 Server 。
Hacker與Cracker
一般報紙上所講的“黑客”就是指Cracker,在 The New Hacker Dictionary中
由於 Rails 2 已經推出了一段日子,我也來寫寫 Rails 2 要注意的地方。
Rails 2.0 is RESTful by default
我也來講講人稱 Sexy migration 的 ActiveRecord Migration,在 Rails 2.0 之前,migration 是長成這樣子的︰
1
2
3
4
5
6
7
8
9
10
11
12
13
| # db/migrate/001_create_customers.rb
class CreateCustomers < ActiveRecord::Migration
def self.up
create_table :posts do |t|
t.column :first_name, :string
t.column :last_name, :string
end
end
def self.down
drop_table :customers
end
end |
到了 Rails 2.0,migration 就變成這樣子︰
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| # db/migrate/001_create_customers.rb
class CreateCustomers < ActiveRecord::Migration
def self.up
create_table :posts do |t|
t.string :first_name
t.string :last_name
t.timestamps
end
end
def self.down
drop_table :customers
end
end |
除此之外,還新增了一個 rake task︰rake db:rollback,在以前,要 rollback 就只有用 rake db:migrate VERSION=xx 來做,新的 rake task 比較好用,不需要再去理會 version。
換了 Server 後,今天又買了新玩具 - Intel D201GLY2 Fanless miniITX motherboard with onboard Intel Celeron 220 CPU。打算把它打造成平價的 Solaris in a box,安裝 Solaris 10 U4 8/07 的過程都算順利,安裝完成後 reboot 問題就來了,這部 Solaris in a box 就進入了 reboot hell,不停地 reboot,只要一到 loading kernel 就 reboot,好吧試試修改 GRUB 的 parameter,在 GRUB boot menu 按 “e”,再按 “e”修改加入 “kernel/unix” 指定使用32bit kernel,而 64bit kernel 是在 “kernel/amd64/unix,修改後再按 “b”,今次沒有進入 reboot hell 了 。
看來是 64bit kernel 的問題,但Celeron 220 CPU 是 support EM64T 的,也就是運行 64bit 的 Solaris 10 是應該沒有問題的,好吧只好暫時用 32bit kernel 吧。reboot hell 的問題暫時解決後,就要 install LAN Card Driver,雖然這一張是 intel 的 motherboard,但卻使用了 SiS 的晶片組,而 Solaris 10 U4 並中沒有 SiS LAN Card 的Driver,所以要使用 Free SiS Solaris Driver。
下一步就是要替 Solaris in a box 打造一個合適的機箱
很久沒有寫 blog 了,可能因為假期關係,整個人都很懶散。
今天終於把本站的 Server 換了,其實一早就想把本站的 Server 由原來的 Mac Mini 換成普通的 PC,這樣就可以把 Mac Mini 帶回家給老婆使用。
新 Server 的 configuration 如下︰
| Intel motherboard D945GCNL |
| Intel Pentium Dual Core E2160 1.8GHz |
| Kingston 1GB DDR2-667 Ram X 2 |
| Seagate 250G SATAII Harddrive |
| Asus 20X SATA DVD/RW |
Rails 2.0.2 is out, this version fixed the rake rails:freeze:gem problem with RubyGens 0.9.5, this version is a drop-in replacement for Rails 2.0. From the release announcement.
Rails 2.0.2 contains a bunch of smaller fixes to various bugs, no show-stopping action, just further polish. But it also contains a few new defaults. The major change is mysql is no longer the default database. SQLite3 is the new default database, SQLite3 is shipped with Leopard. Use
$ rails -d mysql dummy_app
to set the default database to mysql.
Rails 2.0.1 已經正式推出了,而我也把我的 development machine update 到 2.0.1,但假如現在要 create 一個新的 Rails project,但又要用回 Rails 的舊版本如 1.2.6,應該怎麼辦呢?
做法很簡單,只要 create 新的 project 時指定版本即可
$ rails _1.2.6_ dummy_app