MBP 更換硬碟小註解

雖然網路上流傳, 2011 年版的 mbp 換起硬碟來就像喝水那麼簡單, 但是…傳言就是傳言, 和真相還是有點差距.

在軟體方面, 要先去抓一個 Carbon Copy Cloner.app 回來安裝, 它是個免費軟體, 只不過在安裝時要看看廣告. 而我非得選它的原因是: 我按照書上說的, 把新硬碟 format 好後用 USB 連回 MBP, 接著再執行系統裡的 “系統轉移輔助程式", 那支程式竟然就像是 hack 住一樣, 完全不往前進, 只是耗在哪裡找新硬碟. 剛好查到 CCC 這隻程式比內建程式還快, 我就毅然決然地跳槽了.

花了 5 個小時多一點點, 我才把 300GB 備份完. 不過這段期間我也在做事, 所以速度可能稍稍有拖累到. 而我印象所及, 前一次拿到金牛頓去更換硬碟, 他們從晚上六七點備份到打烊, 200GB 不到都還沒轉移完. 所以我感覺 CCC 還是比較快的.

首先必備的工具就是 T6 和 PH00 的螺絲起子.  PH 就是 Philips 的意思, 00 和 0 也不一樣. 如果買到 PH0 那就要哭了. PH 這一系列都是十字起子. 另外 T 系列就是六角形的起子. 比較困擾的是:有些人用 T 為型號, 有些人用 TX 為型號. 好!那 T6 和 TX6 是同一支起子嗎?這個令人流淚的問題, 答案是 Yes! 那為何會令人流淚呢?是因為我各買了一支.

首先我們用 PH00 把 MBP 的鋁殼拆掉, 然後看到硬碟那一區. 哇!好多六角形的螺絲喔!且慢! 那是硬碟的螺絲, 拆下來也沒用. 此時仍然是用 PH00, 把紅色那一區的一塊擋板拆下來. 然後呢, 如果能把綠色區域的 SATA 接頭先拆下來是最好. 若是不能, 記得要輕輕地把硬碟往擋板空出來的區域移動, 以免扯斷了超輕薄的 SATA 排線.

把硬碟移走後, 會看到這個畫面.

圈起來的黑色的線即是 SATA 線. 橘色的部分就是硬碟的支架要插進去的地方. 下圖的右上角,  已經有一個支架拆下來了, 這才是會用到 T6 的地方.

按原樣把新硬碟鎖上這四個支架, 把排線調好別捲到, 就可以鎖上擋板了.  最後把背面的鋁板蓋回去.

然後, 就這樣大功告成了嗎?並沒有!

開機之後, Outlook 一啟動, 死要錢的 Microsoft 就跳出來問 Office for Mac 的序號了. 我想它大概已經偵測到硬碟變大, 或許已經被 copy 到別台電腦了吧. 如果大家的序號不記在腦袋中, 或抄在筆記本上, 而是存在 office 文件裡面的話…., 那可就有點小麻煩了!這點提醒大家留意.

最後, 附帶一提, 2010 版 15.4″ MBP 真的可以裝 1TB 的硬碟. 0.5 inch 的高度對它是 OK  的. 但是它只適合放在原來硬碟的那個位置, 想要改裝到光碟機那個位置就不可能. 光碟機那邊的高度只適用 9 mm 高的 (750GB 以下)的硬碟. 除非以後單碟的容量有突破, 不然 3 碟就是會比 2 碟厚, 而且轉速慢.

[ref]

1. 多用途套裝起子型號 

GIST 戰 MSN

此處的 Gist 並不是指醫學名詞 (腸胃道間質瘤) 那個 GIST, 而是一種整合型的人脈管理工具. 說到管理人脈, 大家心中可能浮現出正經八百的印象, 但是如果把它想成不玩遊戲的 facebook, 這樣的描述還比較精準.

http://gist.com/, 這個網站註冊一個 email 位址之後, 它允許使用者加入常用的 IMAP 信箱帳號, 以及常用的社交網站帳號 (目前只有 facebook, twitter, LinkedIn). 接著我們就可以看到所有人的動態都集合到一個公佈欄. 這個公布欄可以幫常常聯絡的朋友排名在前面 (注意下圖有個 importance 指標), 這樣即使不上twitter, facebook, 也可以看到誰的眼睛被貓踩到之類的訊息. 這個網站有 Outlook 和 browser 的 plugin, 就算不開 browser, 仍然可以對朋友的狀態一目了然.

當然, 如果這上面的東西和 facebook 差不多, gist 就沒有什麼特別了. 它的主要訴求還是人脈管理. 所以每個朋友 (或者說聯絡人) 換了工作, 或是大頭照, 我們都可以在畫面中清楚看到. OOO 的公司換成 XXX 了之類的. 所以 XXX 公司對你的 importance 就上升了. 甚至它也內建 Google 欄位, 讓使用者可以快速查詢, 比方說:XXX 公司是做什麼的? 你的朋友最近有什麼新聞?

此外, 某人可能是你的 MSN 聯絡人, 但不是 facebook 朋友, 沒關係, gist 可以建議你 facebook 的 AAA, 就是 twitter 的 ZZZ. 然後附上一個信心指數. 很有趣吧!

原本我想用 msn 的帳號來註冊 gist. 但是註冊時需要到信箱收信 confirm, 註冊才能生效. 說也奇怪, 我送到 msn 帳號的確認信, 完全都收不到, 連垃圾信裡面也沒有?驚訝之餘, 我忽然想到 msn 和 gist 是競爭關係嘛!MSN 默默地把對手過濾掉也是正常的. 如果大家登入 wiindows live, 應該有看到下面的圖案吧?Microsoft  顯然不希望 gist 變成人脈管理的老大, 這樣以後要買下來就比較貴了, 哈!

當然, 我不排除是我自己的疏忽, 導致 hotmail 收不到 gist 的信. 總之, 這個世界, 因為科技而變得和以前不一樣了.

 

清理 Outlook 裡面重複的信件

假如 outlook 每次都把以前備份的信件匯入, 那麼信箱裡就會塞滿很多重複的信件, 假如是使用 exchange 的話, 還會有很多重複的聯絡人, 會議等等, 相當地佔記憶體.

Windows 的用戶可以上網去抓一些免費的小工具, 但是 Mac 的用戶就比較辛苦了. 看來看去, Barry's Applecripts 不失為一個沒辦法中的選擇. 首先把有很多重複 mail 的 Outlook 信箱選起來 (select/select all), 然後在 AppleScript 編寫程式裡面選 "執行" 就可以了. 

當然, 最好是先備份一下, 以免誤殺義士, 還要把紫微拋入深谷~~

— Remove Duplicate Message v2.1

— An Applescript by Barry Wainwright, 15th October 2010

— Detects and deletes duplicate messages within a selected folder

— works on Message-ID header – uniquely identifying duplicates


— Version History

— v1.0 – 2002-03-18: First Release (For Microsoft Entourage)

— v2.0 – 2010-10-07: modified to work with Microsoft Outlook for Mac

— v2.1 – 2010-10-15: added final dialog to summarise messages removed


tell application "Microsoft Outlook"

set theMessages to current messages

if theMessages = {} then

try

set theFolder to selected folder

set mb to theFolder

on error

display dialog "In the folder listing, please select the folder you want to be scanned for duplicates" with icon stop buttons {"Quit"} default button 1

return -99

end try

else

set mb to folder of item 1 of theMessages

end if

set theName to name of mb

say "Removing duplicates from mail folder: " & theName

set y to count messages of mb

say "Number of messages to check, " & y

set IDlist to {}

repeat with x from y to 1 by -1

try

set theHeaders to (get headers of message x of mb)

set AppleScript's text item delimiters to {return & "Message-"}

set temp to text item 2 of theHeaders

set AppleScript's text item delimiters to {return}

set theId to text 5 through -1 of text item 1 of temp

on error

set theId to ""

end try

if theId is in my IDlist then

delete message x of mb

else if theId ≠ "" then

copy theId to end of IDlist

end if

if x mod 100 = 0 then say "" & x

end repeat

set removedCount to y – (count messages of mb)

if removedCount is 0 then

say "Finished. No duplicates detected"

else

say "Finished. " & removedCount & " duplicates removed"

end if

display dialog "" & y & " messages checked" & return & removedCount & " messages removed" buttons {"OK"} default button 1

set AppleScript's text item delimiters to {""}

end tell


對了!這個 script 是會說話的, 我本來還以為我幻聽了…原來是音量開得太小聲, 難怪一直聽到斷斷續續的人聲, 再猛一聽又沒了….:/. 如果不想聽到聲音的話, 用 — 把 say mark 掉就行了.
 
2011/12/26 補充

太久沒用, 我都忘記 Apple Script 在哪裡了?首先進到 Finder 的工具程式, 再點選 Apple Script 編輯程式的 App. 把上面的 script 貼上去, 按執行就可以了!
 
如果 folder 太大, 確實有 time out 的危險. 按 command + option + shift + ESC 三秒鐘可以停掉當前 active 的程式.
 
2011/12/28 補充
 
因為這個 script 太慢了, 我想了一下. 畢竟相同的 mail 應該都是同一個時間, 主旨, 寄件人等等. 所以不論怎麼 sorting, 這些信都會連在一起. 所以不需要搜尋整個 IDList, 只要看到未見過的 theId 就把 IDList 清掉就好了. 我加了一行, 底色標成黃色.
 

if theId is in my IDlist then

delete message x of mb

else if theId ≠ "" then

set IDlist to {}

copy theId to end of IDlist

end if


要解決 time out 的問題, 把 tell 到 end tell 裡面用 time out 包起來就可以了. Time out  只能以秒為單位.

tell application "Microsoft Outlook"

with timeout of 1000000 seconds
end timeout
end tell

ID3 的語系設定

客戶又抱怨為啥我們的 ID3 顯示經常是亂碼, 競爭者每次都對, 一定不是運氣的關係… 於是我只好又求助 Google 大神了. 果然, ID3 的規格是這樣寫的, 無論有幾個 frame, 每個 frame 都由 frame ID, frame size 和 flag 共 10 個 bytes 開頭, 後續至少有 1 byte 的 content. 如果 frame ID = TLAN, 就表示 ID3 的語系寫在後面的 3 個 bytes 裡面. [1]

這三個 bytes 採用  ISO 3166-1 alpha-3 的定義 [2], 包括簡體 (CHN), 繁體 (TWN) 都有. 據說本來這個定義是用在護照上面, 機器讀到這個代號, 就知道這是哪個國家. 

那麼, 既有 alpha-3, 也會有 alpha-2 嗎?有! 此時中國是 CN, 台灣就是  TW, 美國就是 US [3]. 1但是兩個字母的組合太少, 辨識上比較困難. 南韓叫做 KR, 北韓叫做 KP, 就是沒人認領 KO (knock out)…

[REF]

1.  http://www.id3.org/id3v2.3.0#ISO-639-2

2. http://en.wikipedia.org/wiki/ISO_3166-1_alpha-3

3.  http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

真假 QuickTime

我們的客戶一直強調不可以播 Quick Time 格式. 但是什麼是 Quick Time 格式呢? 我 Google 了一下, 但是 keyword 不對, 怎麼也抓不到重點. 像是 "wiki quicktime" 這些都沒用. 唯一有用的 keyword 是 "quicktime spec.", 只有願意看規格的人才找得到答案. :D

 Apple 認為 Quick Time 格式是 MPEG4 的基礎, 雖然 quick time 和 MPEG4 長得很像, 但是 Quick Time 是 Apple 的智慧財產權, 和 MPEG4 不能混為一談!如果因為長得很像, 就當做同一個東西的話, Apple 豈不是要和 MPEG-LA  分權利金了嗎?當然不行囉!

Important:  The QuickTime File Format has been used as the basis of the MPEG-4 standard and the JPEG-2000 standard, developed by the International Organization for Standardization (ISO). While these file types have similar structures and contain many functionally identical elements, they are distinct file types.

QuickTime file format 由一個個的 atom 組成, 每個 atom 都和 MPEG-4 的 box 差不多. 再強調一次, 只是看起來很像…

Note: An atom, as described in this document, is functionally identical to a box, as described in the ISO specifications for MPEG-4 and JPEG-2000. An atom that includes version and flags fields is functionally identical to a full box as defined in those specifications.

對於一個典型的 MOV 檔, 它就是以 movie atom, movie data atom 所構成的 quick time file. 這個 movie atom 後面會跟著 4 bytes 的 atome size, 接著就是 4 個 byte 的 atom type. 當 atom type = ftyp, 那麼它可能就是一個 MPEG-4 或是 JPEG2000.

緊接在 ftyp 後面就是這個 atom 的 data, data 的開頭則可能是 major band.

Major_Brand

A 32-bit unsigned integer that should be set to 'qt  ' for QuickTime movie files. If a file is compatible with multiple brands, all such brands are listed in the Compatible_Brands fields, and the Major_Brand identifies the preferred brand or best use.

 所以 ftypqt 連在一起, 就是 quick time 的 MPEG04. 除了 major band 還有 compatible band, 它包含了 major band.

Compatible_Brands

A series of unsigned 32-bit integers listing compatible file formats. The major brand must appear in the list of compatible brands. One or more “placeholder” entries with value zero are permitted; such entries should be ignored.

如果 compatible band 沒有一個是 qt, 那麼這個 file 就不是 Quicktime movie. 因此, 判斷方式很明顯了. 就算附檔名看起來一樣, 檔案結構很相似, 但是有個明顯的標記區分著 QuickTime 和一般 MPEG4 或 MOV, 賴也賴不掉~~~

Note: A common source of this error is an MPEG-4 file incorrectly named with the .mov file extension or with the MIME type incorrectly set to “video/quicktime”. MPEG-4 files are automatically imported by QuickTime only when they are correctly identified as MPEG-4 files using the Mac OS file type, file extension, or MIME type.

[ref]