Scheduler in Sinatra

Sinatra 上有些 webservice 要定時跑, 以前都是用 cron + curl 在做, 今天發現了一個好用的 gem: rufus-scheduler

»

Reduce disk usage on Debian-based distro.

前陣子因為公司產品上的需求, 客製了一套自己的 distro: V____x, 因為我很懶一些因素選擇直接從 Ubuntu Minimal 出發… 最終 Xorg, Openbox WM 加上公司產品及一些相依套件庫, »

Switch to rbenv

一直對 RVM 的 shell-hacking 行為很感冒也很困擾, 但是沒有了她又勢必崩潰在如滿天星斗的 Ruby 版本中… 決定從 RVM 轉到 rbenv (早該這麼做了). 先不管 rbenv 有什麼吸 »

清理那些不堪回首的 Git 歷史

Git commit comment 風格慣例統一之後, 遺留在 master 上那些不堪回首的 commit history 怎麼辦?

git checkout --orphan tmp <new_starting_point>
git commit -m "bye bye history"
git rebase --onto tmp <new_starting_point> master
git branch -D tmp
»

ArrayList and LinkedList in Java

http://stackoverflow.com/a/322742 接手的專案裡幾乎全部類似 list 型別的物件不分青紅皂白都用 ArrayList 著實使人困擾… »

為什麼你們就是不能加個空格呢?

看到網路上轉貼一個很有意思的 Google App. 為什麼你們就是不能加個空格呢? 漢學家稱這個空白字元為「盤古之白」,因為它劈開了全形字和半形字之間的混沌。另有 »

virsh error: Cannot allocate memory

Today I was trying to increase memory size on a qemu-kvm hosted VM. My plan was as simple as shut it down and then change memory setting via virsh edit <VMName>, but both virsh edit and virsh start throws the same error message:

error: cannot fork child process: Cannot allocate memory

»

Dealing with legacy code?

處理 Legacy Code 的步驟就是:(1)決定更新的邊界(2)依據邊界範圍設計介面(3)實作新介面的轉接器實作(4)把客戶端程式碼升級到新的介面版本(5)依 »