Monday, November 20, 2006

FreeBSD Love

Don't know why, I have installed FreeBSD on many machines. I am a primarily GNU/Linux user. I use mainly Ubuntu GNU/Linux on my laptop. But still, I hope one day, I would find FreeBSD better and switch to it, while I haven't noticed any performance differences between them, nor I have understood the architecture/design/implementation differences between them.

One noticeable difference is, that the arguments accepted by FreeBSD commands are less flexible. For example, "ls * -l" is acceptable on GNU/Linux, but not on FreeBSD, which only allows argument before the file names such as "ls -l *". But perhaps due to this, I think FreeBSD is more Unix like. It is more traditional, and maybe more powerful. Perhaps this is due to its image - "The Power to Serve". Its advertisement may have won my heart. It is often said that Yahoo uses FreeBSD for its web servers. It shows that it is very powerful. And perhaps I have fallen in love with FreeBSD, so I have installed it on three desktop machines other than my laptop.

Same to some other products. I have started to believe that:
  1. I wanted a Core 2 Duo from Intel.
  2. Apple Mac OS X is 'younger', more energetic, and more innovative than Windows from that 'fat' old guy Bill.
Well, marketing is important!

街頭騙案?

今日行經旺角,遇到一個年約三十的男士。他劈頭第一句就問我能否聽懂普通話,我以為他只是問路,於是勉勉強強答了他一句,我懂一點點。於是他用流利的普通話跟我說了什麼賓館,什麼幫忙幫忙。我以為他想找什麼什麼賓館,於是我發揮政府廣告教落的好客之道,耐心地問他想去哪間賓館。

說了一陣,我又聽到他說什麼食飯。噢,他原來想問我借錢,並向一位不知從那裏走來的女士指了一指,說他只是想帶愛人去吃一頓飯,但沒有帶錢。她的愛人無夸地走了過來一點,站在約兩三步處,聽着我們對話。我於是直接了當問他想要多少錢。他說幾十塊錢。我第一個反應在想,如果他是來行騙的,我給他錢,便會助長更多的人來到香港行騙。但第二個想法是,就算他是來行騙,也許他有什麼原因需要點錢周轉。我看一看他,樣貌端莊,穿了恤衫西褲,額上有點汗,像是奔跑過一輪。想了想,算了,或他真的有什麼急需。於是我從錢包取了五十蚊,說應該夠給他們兩人吃飯。

這時他說要拿我的電話號碼,說要還錢給我。我扮好人,說沒關係,隨便還給其他人就行。(我原想說給個乞丐便行,但我不懂說乞丐二字!)但是他還不心息,再用他流利的普通話跟我說要找賓館,並沒有錢住,什麼明天就有錢還給我。我想他應說了有什麼原因沒有錢,但我聽不到,亦沒有問。之後他又說什麼大家也是年青人,什麼他在北京一晚也花費三五千,但越講我就越覺得他是個老千。也在想他說得這麼流利,就是想我聽不懂!結果我沒有理會他的請求,說他若再說我就要拿回我的五十大元。他唯有說了句謝謝,並握握我的手走了。

遇到這情況,究竟應否幫助呢?到現在我亦不清楚。

福音有句說話,相信很多人也聽過,就是如果別人打你右面,你就讓他打埋你的左面。耶穌說這話後,另有一句說話,不知應否用在這處了。

後記:
  1. 今日一連貼了三篇文,而三篇文也是用「今日」作開頭。
  2. 看了這文章不要以為我是善心人,我想我有十幾年沒有施捨錢給乞丐了。
  3. 朋友如果你看到這篇文,不用想你若問我借錢我必會借給你。因為我根本沒有錢可以借。哈!
  4. 我發現科大周圍也聽到人講普通話,而我的老闆及我的同學亦都是大陸人。但我真不長進,如終仍未學懂錯通話。唉!

你們一向聽說過:『以眼還眼,以牙還牙。』我卻對你們說:不要抵抗惡人;而且,若有人掌擊你的右頰,你把另一面也轉給他。那願與你爭訟,拿你的內衣的,你連外衣也讓給他。若有人強迫你走一千步,你就同他走兩千步。求你的,就給他;願向你借貸的,你不要拒絕。
(瑪5:38-42)

食評

今日逛書局看到梁文道先生的一本書。書的名字不記得了,是關於他對讀了的書的一些感受。在引言/前言中作者提到,現在的旅遊特輯只注重吃喝玩樂。

我在想,一些的網誌也是如此。有些網誌常常寫一些食評,說到那裏那裏可以吃到一些美味的東西。我看了總是有點不舒服。可能心裏羨慕人家為何這樣有錢,可以享受各種美味的東西。看了後,令到我也想掙多點錢,好好享受我的人生。哈,但我確是一個騎呢人!另一邊廂,我又會去想,為什麼我會有好東西吃,而其他人沒有呢。貧窮似是我的終生伴侶;這一生,我也注定沒好日子過。

對不起,未來的老婆仔女,你們跟着我,也是注定沒「好日子」過!

Sunday, November 19, 2006

「學卷制」

今日讀明報見到一篇關於李國章局長的報道,標題是:

李國章否認要脅幼園
「接受或收回?」
學券制獲業界一致接納

看到這報道,真的有點氣憤。似乎教統局常常都用一點利益去誘惑其他團體去受到他的監管。說這是學券制,表面上是尊重自由市場,實際上是想更多的私立稚幼園轉為受政府監管。明明說要做「大市場小政府」,但卻又什麼都要管。空氣污染這些問題又不去管,有否公平競爭又不去管,每間學校怎去辦學卻又要管!

早陣子的什麼「校本條例」亦是如此。說什麼多些讓家長參與,什麼民主化,但其中一個結果就是要分化/分折辦學團體,讓大的辦學團體不再容易辦學。

有些人說,為什麼07年要有普選,反正都一定是由曾特首連任。我也不十分反對他連任,但我最怕的是,要是07年沒普選,2012年也沒有普選,我怎知李教授會否走出來選特首時。到時我連投反對票的權利也沒有,而只能無夸接受,我就真的不順氣!

Saturday, November 04, 2006

Samba over SSH

Last night I tried to connect a Windows XP machine to a Samba server on FreeBSD. I follow a nicely written webpage by Edwin Olson but failed for many trials. At last, I found that I missed out some important steps from that webpage and after I followed also those steps, it succeeded! A lesson for reading instructions carefully.

There are two reasons for using Samba over SSH:
  1. The port 139 is blocked for the outside connection to Samba server machine.
  2. SSH can encrypt the packets transferred, so that it gives better security for Windows file sharing.
Here is a summary of the configuration steps for the Windows machine.
  • Install a loopback network adapter for SSH port fowarding (or follow the steps from Microsoft):
    1. Go to Control Panel -> Classic View -> Add Hardware
    2. Choose "Yes, I have already connected the hardware"
    3. Choose "Add hardware device" from the bottom of the list
    4. Choose "Install the hardware that I manually select from a list"
    5. Choose "Network adapters"
    6. Choose Microsoft -> Microsoft Loopback Adapter
  • Configure the loopback adapter:
    1. Go to Control Panel -> Classic View -> Network connections
    2. The new loopback adapter should be called Local Area Connection 2
    3. Right click on it and choose Properties.
    4. Enable "Client for Microsoft Networks"
    5. Disable "File and Printer Sharing for Microsoft Networks"
    6. Click Properties of Internet Protocol (TCP/IP)
    7. Enter an IP address such as 10.0.0.1, subnet mask 255.255.255.0
    8. Click Advanced -> WINS
    9. "Enable LMHOSTS lookup" and "Disable NetBIOS over TCP/IP"
  • Connect to the Samba machine through SSH:
    1. Download and install PuTTY from PuTTY webpage.
    2. Start PuTTY.
    3. Go to Connection -> SSH -> Tunnels.
    4. In source port, enter 10.0.0.1:139
    5. In destination, enter 127.0.0.1:139
    6. Click Add
    7. Then enter your host name as usual for SSH connection and click Open
    8. After you have connected successfully to the Samba machine through SSH, the port forwarding should be OK.
  • The connection should be ready and you can access the files on Samba machine by:
    1. Click Start -> Run
    2. Enter \\10.0.0.1
    3. You should see the files shared by the Samba machine
Notes:
  • You may need to enable port forwarding of SSH on the server machine.
References: