2012年9月24日 星期一

喜愛的書

  最近在討論面試的話題,我就想如果我是面試官的話要問啥問題才能瞭解一個Candidate的程度呢?我想了想覺得可以詢問他在資訊領域中最喜歡的一本書。雖然資訊領域是一個變動快速的世界,但經典的著述可以使人站在巨人的肩膀上。
  以我而言,經過這幾年的學生和工作生涯,一直存在我心中的莫非Advanced programming in Unix environment了。Richard Stevens以平易近人的語法說明了在Unix環境下system programming的技巧,也可以從中領略到Unix世界裡KISS的哲學,還可以瞭解到作業系統的演進,一舉數得。
  相對而言以我最近拜讀的Learning Python來說,也算是一本好書,但作者的用句相對不夠簡潔有力,我個人認為可以縮短1/4的篇幅吧。
  果然"名作在一出生時就已經註定是名作了吧"(遠目)


2012年9月14日 星期五

Setting up input method in CoLinux using Hime

vim ~/.bash_profile

export XMODIFIERS=@im=hime
export GTK_IM_MODULE=hime
export QT_IM_MODULE=hime
hime&

$hime-setup
1. Check "Remote client support"
2. Change Toggle input window to something such as "Shift-Space"

P.S. There is a bug in using Eten keyboard with Chewing.  Using Tsin for now.

The installation of SpeedLinux

What is SpeedLinux? 



  SpeedLinux,aka, freetzlinux, is a distro (http://sourceforge.net/projects/freetzlinux/) based on kernel built by Colinux (http://www.colinux.org/).  One might heard of once famous AndLinux (http://www.andlinux.org/), which is sadly not being maintained anymore, and Speed linux has taken the architecture from it.
  The central idea of this series of Linux is that it's creating a "true" native linux environment on top of MS Windows OS.  The kernel itself runs as a normal task under MS Windows, and thus no need of VM or any translation layer like the way Cygwin does.  I'm quoting sentences from Colinux here, "For instance, it allows one to freely run Linux on Windows 2000/XP/Vista/7, without using a commercial PC virtualization software such as VMware, in a way which is much more optimal than using any general purpose PC virtualization software."
64 bits Windows is not supported!


Why using SpeedLinux?


  1. Fast, comparing to any Linux solution running on top of VM.
  2. Easy to get package support.  For example, SpeedLinux is based on Ubuntu, and therefore you can get any latest released software through the great "apt" tool kits.  Unlike Cygwin, you'll need to rebuild from scratch if the software is not already supported by Cygwin.


Installation:


  1. Download installation binary from http://sourceforge.net/projects/freetzlinux/files/latest/download, just like installing any Windows software.
  2. Check WinPcap and the WinPcap bridge option under Colinux.
  3. SpeedLinux will set up a virtual network interface, namely xtunnel, to communicate with Windows OS.  Configure the IP address as 193.168.0.1 on Windows side, and configure IP address as 193.168.0.150 on Linux side.  The default setting was 192.168.0.1 and it will easily clash with many LAN settings.
  4. Create C:\sharedFolder folder.  This is the folder that is visible from both Windows and Linux side, of course, through Cofs' help.  If you don't like the name, you can always change it in C:\Program Files\speedLinux\settings.
  5. Select Cofs when the installation program asks you what kind of filesystem support you want to use to communicate with windows partition.  Samba is great, but it would take too much effort to set it up.  Let's just select Cofs here.
  6. After installation, run startup.  Try to ping local host through $ping 193.168.0.1 on your console.  If it fails, check your windows firewall settings.
Okay, now you're good to go.

P.S.
If Windows failed to create Xtunnel interface for some reason, it can still be set up manually.


Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318}\{USE_YOU_INTERFACE_SERIAL_HERE}\Connection]
"PnpInstanceID"="ROOT\\NET\\0000"
"MediaSubType"=dword:00000001
"Name"="Xtunnel"
"ShowIcon"=dword:00000001
"IpCheckingEnabled"=dword:00000000

2012年9月13日 星期四

潛水筆記

1. 調節器尋回:
將手臂往前伸直,貼著大腿側往後畫開直到摸到氣瓶,向右畫大圈即可將調節器尋回。

2.調節器尋回,順管摸索法:
左手向後摸到氣瓶底,將氣瓶往右上方頂,右手向後摸到一級頭,順著中壓管找回二級頭。

3.面鏡脫著排水:
將面鏡上方裙邊拉開使水流入,然後再將面鏡脫下,戴上時記得撥開毛髮使裙邊附著完整,用手掌壓住面鏡上緣,用鼻子吐氣,讓水順著下方流出,然後將頭稍微上揚使剩餘的水流乾。


4.中性浮力:
將BC點充氣,使吸氣時身體上浮,呼氣時下沉

5.配重脫著:
右腳高跪,雙手順著大腿摸到配重扣,右手抓著游離端,將配重置於右腳大腿根部,左手由後方跨下抓住扣環,將配重戴上。

6.BC脫著:
打開胸前的快卸拉環,打開腹部的扣環,將BC脫下時要抱住氣瓶,以免浮起,反向穿回。

7.緊急游泳上升:
上升時必須一直吐氣,速度不要超過氣泡18m/sec。


裝備組裝

1. 輕開氣瓶,檢查氣體是否有異味
2. 將氣瓶口與自身同方向,套上BC,固定氣瓶高度約為一手掌寬,扣帶順序為1324
3. 將一級頭與氣瓶O形環接上,二級頭在右手邊
4. 接上BC充氣管
5. 氣壓表向下,開氣瓶檢查氣壓,氣瓶開關轉到底再回轉一圈半
6. 二級頭呼吸測試,BC充氣測試