Tag Archives: Postaday2011

Linux – Check Memory Usage of a Specific Process

Use the following command to check the memory usage of a specific process.

  • cat /proc/<process ID>/status

 

You will get the following output. Continue reading Linux – Check Memory Usage of a Specific Process

名言四十三

The master of art of living makes little distinction between his work and his play, his labour and his leisure, his mind and his body, his education and his recreation, his love and his religion. He simply pursues his vision of excellence in whatever he does, leaving others to decide whether he is working or playing. To him, he is always doing both.

Lao Tzu

PHP – Write an Array/Object to File by print_r()

In debugging PHP program, i always use print() and print_r() to output the variable content to the browser. But this does not work when we are not using browser. A simple way to get the content is to write it to a file.

I found a nice post written by Ivan which provides this simple way with just a few lines of code.
Ivan Kristianto – [TIPS] Write print_r() Output To File Continue reading PHP – Write an Array/Object to File by print_r()

吳志森 – 假如我們都願意活在黑暗中

【明報專訊】「你睇吓我哋呢個世界,睇下我哋呢個城市係乜嘢樣,除咗錢呢個字之外,我哋已經分辨唔出是非黑白,我哋每個人都被環境訓練到,好似倒模出嚟咁。鍾意食同一樣嘅嘢、鍾意同一樣電視節目、支持同一種政治立場,信奉同一種生老病死嘅做人方法,this city is dying, you know?」

無綫《天與地》Dr. Dylan金句,全城瘋傳,「城市之死」,成為最時髦議題。這城市的死因,劇中人只說出了箇中現象,問題還沒有說透。蔡子強兄日前在本版點出了關鍵所在——「沉默和冷漠」,為什麼大多數香港人對不公平不公義的事情,都選擇把頭別過去,「認命」,認為什麼都改變不了的態度?健吾兄再作了一番透徹的演繹。因為他們都「自我感覺良好」,覺得目前的處境還不算太差,還有口飯吃,還可以炒賣,炒不起樓還可以炒iPhone 4S,還有一定的自由,還不至於講句異見就被失蹤、被漏稅或被精神病。香港還是不錯的,大家還可以湊合覑,將就將就的過吧!

香港人的沉默和冷漠

回歸14年,香港急速衰敗,不能怨別人,是因為香港人的沉默和冷漠,香港人未衰到貼地仍自我感覺良好,是自招的必然結果。 Continue reading 吳志森 – 假如我們都願意活在黑暗中