補回 Firefox 4 取消的 RSS Icon

Firefox 4 正式版快要放出來了,這陣子開始強迫自己用 Firefox 4,結果覺得奇怪「怎麼這些網站不提供 RSS 啊」,後來才想到很久前有報導提到 Firefox 4 把 RSS icon 拔掉:「Where is the RSS Feed Icon in Firefox 4?」。

這代表一定有人會寫 extension 把 RSS icon 補回去,測過以後看起來「RSS Icon」是個還不錯的選擇,跟之前沒什麼差異...

HTTPS 的 Persistent Cache...

Twitter 上又看到有人在講 HTTPS 的資料無法 persistent cache (寫入硬碟保存),所以當瀏覽器重開後就消失,如果能避免使用就應該避免...

但實際上並不是這樣,HTTPS 的資料是「可以」被 persistent cache 的,只是預設不會這樣作。

只要在 response header 裡告訴瀏覽器 Cache-Control: public,瀏覽器就會 persistent cache。因為你已經跟瀏覽器說這個檔案是公開資料,就算是透過 HTTPS 傳輸也可以寫到硬碟裡保存。在「HTTPS Performance Tuning」這篇文章裡有提到 IE 與 Firefox 都沒有問題...

有用 HTTPS 的可以檢查看看是不是能夠加速...

Google 推出 VP8 的硬體設計

Google 推出了 VP8 編碼與解碼的硬體設計,代號「Anthill」:「Introducing "Anthill," the First VP8 Hardware Encoder IP Release」。

透過 Anthill,對於 GPU 的 loading 及電源消耗會大幅降低:(這是在 ARM 平台上的估算)

不過比較奇怪的是只有寫 H1 encoder RTL 不收錢?重點在 decoder 吧?

Google does not require payment of any license fee or royalty in connection with use of the H1 encoder RTL.

另外 source code 不直接公開,必須填表格索取...

Ubuntu 上跑 VirtualBox 連接 USB 裝置...

Ubuntu 10.10 系統內的 VirtualBox 是 OSE 版本 (Open Source Edition),先到 VirtualBox 官方網站下載對應的 deb 檔:「Download VirtualBox for Linux Hosts」,像我的電腦是跑 10.10 amd64 版本。

接下來是把系統內的 VirtualBox 移除:

apt-get purge virtualbox

移除完畢以後將剛剛下載的 deb 檔安裝進系統:(後面的檔名自己變更)

dpkg -i virtualbox-4.0_4.0.4-70112~Ubuntu~maverick_amd64.deb

然後把自己加到 vboxusers 這個 group 內 (我是直接改 /etc/group),改完後重新登入,然後:

  • 在 Guest OS 關機狀態下,設定允許讓 Guest OS 使用的 USB 裝置。
  • 將 Guest OS 內的 Windows XP 開機後,安裝 VirtualBox 提供的 Guest Additionals。

接下來就可以用 IE 到網路銀行安裝 ActiveX,然後測試讀卡機是否正常運作...

header file 與 GPL(v2) 的「衍生作品」...

Slashdot 上看到 Richard Stallman 在 2003 年 1 月對於 GPLv2 header file (當時只有 GPLv2,沒有 GPLv3) 對於作品是否有「感染力」的看法:「RMS On Header Files and Derivative Works」,也就是「如果我用了 GPLv2 的 header file,是否我的 code 因此就要使用 GPLv2」的問題。

Richard Stallman 在找了律師談過之後,引用 header file 不足以成為 GPLv2 裡面定義的「衍生作品」(Derivative work):

Our view is that just using structure definitions, typedefs, enumeration constants, macros with simple bodies, etc., is NOT enough to make a derivative work.

這篇剛好回應最近有人質疑 Android 因為使用 GPLv2 header file 而軟體本身使用非 GPLv2 授權的問題:「Android Faces Serious Linux Copyright / Copyleft Issues with GPL」:

Google used Linux headers, but did not release Android under the same GPL2 license, which is the most basic precept of GPL. (Android is released under the Apache Commercial License.)

多使用 namespace::clean 與 namespace::autoclean

純粹實際驗證用:

因為 Carp 預設會將一些函式 export 到現有的 namespace 下,如果不使用 namespace::clean 或是 namespace::autoclean 這類工具幫你清除,會造成 namespace 與 object 內帶有這些函式。

結果是:

可以看到沒有 B 沒有 clean 導致外面 (package main) 可以看到 carp

其實這篇是要測 pastie 是不是比 Gist 好用... :o

加速 Perlbrew 安裝 Perl 的速度

Perlbrew 0.18 其中一項很重要的功能,是在 install perl 時可以使用 -j 的參數,像是這樣:

perlbrew --force install -j 4 perl-5.12.3

-j 這個參數會傳給 make,同時跑的 job 數量。(make 會處理 dependency 問題,理論上不會有問題)

Linode 512 上面 (Debian 64bits) 只用了 7 分鐘就把 Perl 5.12.3 裝完了 (之前是 21 分鐘),時間就是金錢啊... 細節可以參考 0.18 的 Changes 的說明。

Twitter 提供使用者「強制使用 HTTPS」的選項

Twitter 剛剛公告,使用者現在可以選擇強制使用 HTTPS:「Making Twitter more secure: HTTPS」。

之前是透過 Force-TLS 強制設定 twitter.comapi.twitter.com 強制使用 HTTPS。現在官方提供這個功能等於多了一層保護...

目前還不包括 3rd-party 應用程式,只有網站版本與 iPhoneiPad 的官方 client。

AWS RDS 的 INSERT 效能...

PerconaBaron SchwartzAWS RDS 能提供最大台的 database (68GB memory + 26 ECUs) 上測試 insert 的效能:「MySQL on Amazon RDS part 1: insert performance

數字是 Per Minute,換算成常用的 Per Second 要記得除以 60。大約是 4k~5k 40k~50k queries/sec 的數量。這個效能不知道能不能算「好」...