2014美津濃香港半馬拉松錦標賽相片
Water
|
01/08/2014
|
Nginx setting to force PDF file to be downloaded instead of viewing in the browser
Water
|
01/08/2014
|

In nginx, when user click on a PDF link, if you want the file to be downloaded instead of showing directly on the web browser, we have to default the MIME type of the pdf files from application/pdf to application/octet-stream. So you can add the following lines in your nginx settings:

# force pdf files to be downloaded
location ~* (.*\.pdf) {
    types { application/octet-stream .pdf; }
    defa

Continue Reading

PLAY Issue 16: 2013 跑鞋年鑑
Water
|
01/08/2014
|
Prevent brackets.io from using discrete graphics card
Water
|
01/06/2014
|

brackets.io is a brilliant open source code editor by Adobe. The editor is completely written using Javascript. Although sometimes I feel it a little bit slow, it is very powerful as a code editor for web development.

The only thing that annoys me is that the editor will trigger the discrete graphics card on my MacBook Pro Retina that will shorten the battery life of the computer. To solve this

Continue Reading

開張啟事
Water
|
01/01/2014
|

為左方便我將平時的記事方法轉成 blog,又為左學多少少新野,又為左貫徹我乜都要落手落腳做既原則,於是我重頭起過個 blog。是的,什麼 Wordpress,drupal,joomla 也沒有用… 變左清水房不過我會努力改善。

於二零一四年一月一日,大家一齊向未來再出發!