2009年7月24日 星期五

ruby benchmark

Benchmarking Makes it Better

2009年7月19日 星期日

X-Sendfile

mod_xsendfile
Reference : Advanced Rails p121

The X-Sendfile protocol is a very simple standard, first introduced in the Lighttpd
web server, which directs the web server to send a file from the filesystem to the client
rather than a response generated by the application server.

X-Sendfile uses the X-Sendfile HTTPheader pointing to the server’s path to the file
to send, in conjunction with the other standard HTTPheaders. A typical response
using X-Sendfile would look something like this:


From Rails, you can set the response headers by modifying the response.headers
hash:

2009年7月18日 星期六

delegate

Rails delegate method


那個 :to => :user 其實是由customer object 再去找 user 的 instance method
所以其實可以在 overwirte 掉做其他的處理

2009年7月16日 星期四

Metric Fu

Metric Fu railscast
ASCIIcast Metric Fu
About metric_fu 1.1.4
flog_file error
test_helper error

apache 設定

一些apache 設定 Etags and expire gzip compression
Speed up your Apache/Passenger Rails app in 2min

capistrano, fast_remote_cache

fast_remote_cache

37signals 用hard link 取代 copy 的方式

因為有需要一直用新的branch 更新, cache_copy 有需要一直變換其svn repository

所以需要overwrite 一下 fast_remote_cache 的一些 methods

ssh 免打密碼自動登入 memo

from here
在 自己電腦 Client 端


server 端