W3 Total Cache 安全性問題...

在「W3 Total Cache Implementation Vulnerability」這篇說明了 WordPress 知名外掛 W3 Total Cache 的安全性問題,原來的在通報在 Full Disclosure Mailing List 上:「WordPress Remote Exploit - W3 Total Cache」。

當沒有 opcode cache (像是 APC) 而使用 disk DB cache 時,會有安全性問題。

除了關掉 DB cache 以外,目前的 workaround 建議是針對 /wp-content/w3tc/dbcache 擋掉,像是用 .htaccess 擋:

#
deny from all

變難用的 Zite...

我很喜歡在 iPad 上用 Zite 讀文章,除了看文章以外,有些常出現的新站台我會丟到 Google Reader 訂閱...

不過最近一次改版後,操作上變得很難用...

next 的設計是希望我一直看一下去,不過我用了一陣子以後發現:

  • 大概還是有一半的文章我沒興趣。
  • 按下 next 後,如果剛好遇到 web mode 會很煩躁... (我在 Zite 裡不用 web mode 看文章)

所以後來就完全放棄 next 按鈕,我寧可點左上角的 close 按鈕... (要用左手按,很不方便)

有人要推薦其他的軟體嗎?

AWS EC2 新機種:超大台的 hs1.8xlarge...

Amazon Web ServicesEC2 在世界末日時發表 120GB RAM、16 virtual core、48TB disk (24 disks) 的「EC2 虛擬機」:「The New EC2 High Storage Instance Family」。

看起來像是 12 顆 7.2KRPM 的 2TB SATA,每顆如果可以跑到 200MB 就是 2.4GBytes/sec?如果是這種規格,給大量 sequence read/write 的運算超適合,官方 blog 的說明裡的解釋也是接近這個方向:

This instance family is designed for data-intensive applications that require high storage density and high sequential I/O -- data warehousing, log processing, and seismic analysis (to name a few). We know that these applications can generate or consume tremendous amounts of data and that you want to be able to run them on EC2.

目前只在 US-East (Northern Virginia) 有,USD$4.60/hour,硬算 720 小時,大約是每個月台幣十萬...

AWS 最近在補的硬體可以看出來是 Hybrid Hosting 的路線:這些機器應該是一台只跑一個 instance,跟 Dedicated Hosting 差不多。上面跑虛擬化只是為了算錢 (accounting) 以及一些安全機制 (像是防止 IP spoof,以及配合 EC2 提供的 firewall)。

實質上不太能說 AWS 不是 Hybrid Hosting 了...

裝 Ubuntu One...

Ubuntu One 是個類似 Dropbox 的軟體,有 5GB 免費空間可以用。

看到「Ubuntu One Mac Client Out of Beta, Now Stable」之後跑去裝 Mac 版,發現 Mac 版上的安裝介面跟 Mac 的風格完全不一樣... (很突兀,有種看到沒有 CSS 的 HTML 的感覺...)

裝完後開起來在這個畫面跑很久:

完成後的畫面:

另外在安裝完以後 Finder 不會出現 Ubuntu One 的側邊欄,對於第一次用的人應該會覺得有點茫然...

設定畫面長這樣:

那個配色與圓角框感覺起來好糟糕 XDDD

反正都裝起來了,就測試看看吧,晚點在 Ubuntu 上也跑起來看看是不是配色會比較搭?

node.js 版的 YUICompressor...

看「Fantastic front-end performance Part 1 – Concatenate, Compress & Cache – A Node.JS Holiday Season, part 4」的時候發現 node.js 版的 YUICompressor 比起 Perl 版本更早之前就 porting 完成了:「UglifyCSS」,甚至是官方版本的「yuicompressor / ports / js / cssmin.js」也都遠早於 Perl 版本...

npm 裝 uglifycss 就可以用了...

Wikipedia 把英文版資料庫的其中一個 slave 從 MySQL 5.1 換到 MariaDB 5.5...

維基百科的 mailing list 上丟出的消息,英文版 Wikipedia 資料庫的 slave server 目前已經在 MariaDB 5.5 上了:「mariadb 5.5 in production for english wikipedia」。

之前跑的版本是 MySQL 5.1 + Facebook patchset 版本,整體大約快了 8%:

Taking the times of 100% of all queries over regular sample windows, the average query time across all enwiki slave queries is about 8% faster with MariaDB vs. our production build of 5.1-fb. Some queries types are 10-15% faster, some are 3% slower, and nothing looks aberrant beyond those bounds. Overall throughput as measured by qps has generally been improved by 2-10%. I wouldn't draw any conclusions from this data yet, more is needed to filter out noise, but it's positive.

然後計畫在接下來一兩個月觀察,沒問題就全換:

MariaDB has some nice performance improvements that our workload doesn't really hit (better query optimization and index usage during joins, much better sub query support) but there are also some things, such as full utilization of the primary key embedded on the right of every secondary index that we can take advantage of (and improve our schema around) once prod is fully upgraded, hopefully over the next 1-2 months.

效能不是最主要考量,而是政治面的原因,官方說法是支持 open source 社群:(沒有講的就是「我們對 Oracle 不怎麼信任...」)

The main goal of migrating to MariaDB is not performance driven. More so, I think it's in WMF's and the open source communities interest to coalesce around the MariaDB Foundation as the best route to ensuring a truly open and well supported future for mysql derived database technology. Performance gains along the way are icing on the cake.

另外參考:「on wikipedia and mariadb」。

美國 DARPA 打算在超過 200km 的距離下建立 100Gbps 的無線網路...

DARPA (國防高等研究計劃署,不過英文應該比較容易懂,就跟「NASA」的狀況一樣) 打算投入資源,研發在超過 200km 的距離下建立 100Gbps+ 無線網路的技術,仍然要維持現在這個等級的大小與電耗:「DARPA begins work on 100Gbps wireless tech with 120-mile range」,DARPA 的新聞稿在「DEPLOYABLE RADIO FREQUENCY DATA BACKBONE TO MATCH FIBER OPTIC CAPACITY」。

DARPA 會在明年年初舉辦 conference:「PROPOSERS’ DAY CONFERENCE FOR 100 Gb/s RF BACKBONE (100G) PROGRAM」。之後才會評估計畫內容與時程。

同樣的技術拿來商用其實也有價值?200km 可以從宜蘭打到西表島了,也可以從淡水打到馬祖了... 如果速度與距離可以妥協的話,屏東與東沙的 400km 不知道能不能跑上 10Gbps...

網頁版 WYSIWYG 的 LaTeX 編輯器...

網頁版 WYSIWYG 的 LaTeX 編輯器:「writeLaTeX」。

左邊是編輯區,右邊是 preview 視窗。沒有很即時,不過應該還是很操系統資源。(可以看出來一修改後,後端就在 recompile 輸出...)

左邊編輯區的 solarized 配色看起來好舒服啊,vim 要不要換呢...

sitespeed.io 網站測速

sitespeed.io 是一個 open source 軟體,讓開發者可以測試網站的效能,然後輸出 html 報表:「Do you sitespeed?」。

執行需要 Java 1.7+ 以及 PhantomJS,我是在 FreeBSD 上跑 (Java 的部份是用 java/openjdk7),另外根據文章裡第三個 comment,在 Windows 上用 Cygwin 也可以跑。

./sitespeed.io -u http://ptt.cc/ -d 1 -o img 跑出來後會有一整個目錄的報告,包括了 summary 以及所有頁面的清單 (後面這兩個連結是跑完後用 s3cmd sync 丟上 S3 的):「ptt.cc - Summary of the sitespeed.io result」、「ptt.cc - All pages information」。

每一頁都有細項說明,像是首頁 /index.html:「Page data, collected by sitespeed.io for page - http://www.ptt.cc/index.html」。

不過我更感興趣的是 PhantomJS,不知道可以做多少事情...

Perl 版本的 YUICompressor (CSS 的部份)

看到 Booking.comYUICompressor 移植到 Perl 上:「Efficient CSS Compression in Perl」。模組在 CSS::Compressor 這裡,看日期其實放出來蠻久的了?

開發的起因是因為 Java 啟動速度太慢,所以用 Perl 改寫... 雖然只能處理 CSS 的部份,但因為現在 JS 的主力應該是 UglifyJS2 或是 UglifyJS,理論上是可以把 Java 版本的 YUICompressor 了放到旁邊了?

據開發者自己的說法,因為 Java 啟動的 overhead 實在太重,就算是處理很大的 CSS 檔案,也可以省 40% 的時間,如果是小一點的檔案甚至可以省一半...