[Rails] PUT v.s. PATCH

The difference between PUT and PATCH in Rails. Rails 4 switched from PUT to PATCH for resource updates to follow proper HTTP semantics, where PUT means full replacement and PATCH means partial update.

[AWS] ubuntu swap

AWS EC2 Ubuntu 新增 1GB swap 的完整指令步驟,並提醒 micro plan 用戶需注意 I/O 用量上限,建議需要時才啟用以避免額外費用。

[Vagrant] use knife-solo to deploy a new VM

使用 knife-solo(Chef 工具)在 Vagrant VM 上自動化部署的基本流程,以安裝 nginx 為例示範如何撰寫 cookbook 並執行 bootstrap/cook 指令。

[Ruby] PP to Ruby as Var_dump to PHP

Ruby 中 pp(pretty print)的使用方法,require 'pp' 後即可像 PHP 的 var_dump 一樣輸出變數詳細內容,方便除錯。