Category: Others (其它)

A Forgotten Tool to Quickly Remove All Related Files

By admin, May 31, 2014 10:58 pm

Today I found out there are over 100K PHP session files locate in Windows Temp directory and it’s impossible to open the Temp directory with Windows Explorer, hence not able to remove any file.

The solution is to use a dinosaur tool called DOS Command!

del /F /Q sess*

Da Da…after a few minutes, you can open the temp directory again with Windows Explorer, this really comes handy when you need it.

Of course, I’ve also changed the session.savepath and since PHP uses garbage collection every 24 minutes, so this left over session problem is fixed as well.

Why My PHP Script is Showing Raw Code? (Fixed)

By admin, May 31, 2014 11:47 am

Recently, I need to configure PHP to run on Windows Server 2008 R2. Even I’ve done this countless previously, but things still didn’t work in the first go, my test.php below displayed the raw code when running from browser.

<? phpinfo; ?>

It turns out to be a simple parameter (ie, short_open_tag) wasn’t turned on in php.ini.

;;;;;;;;;;;;;;;;;;;;
; Language Options ;
;;;;;;;;;;;;;;;;;;;;

; This directive determines whether or not PHP will recognize code between
; <? and ?> tags as PHP source which should be processed as such. It’s been
; recommended for several years that you not use the short tag “short cut” and
; instead to use the full <?php and ?> tag combination. With the wide spread use
; of XML and use of these tags by other languages, the server can become easily
; confused and end up parsing the wrong code in the wrong context. But because
; this short cut has been a feature for such a long time, it’s currently still
; supported for backwards compatibility, but we recommend you don’t use them.
; http://php.net/short-open-tag

short_open_tag = On

Phantom Of The Opera 25周年謝幕特別演出

By admin, May 30, 2014 2:45 pm

我最喜歡的Sarah Brightman和多位曾經飾演歌劇魅影的男主角同台共唱,Bravo !!!

A Simple Anti-Spam Technique That Works!

By admin, May 27, 2014 6:25 pm

Out of blue, after years of searching for the best way to prevent spammer from inside. I think I probably found the solution by extending Delay between Recipients to 5 seconds on Outgoing SMTP, which keeps the email password cracker away. :)

It’s really more a mind tactic than the actual technical solution, as the spammer will give up right away if they find your SMTP server is so slow sending out emails per second. I strongly suspect they have a set of standards, say if a SMTP server can’t deliver more than 10 email per second, then they won’t use it…after all, why bother to use a slow SMTP while they are plenty powerful ones out there.

In contrast, by using Grey Listing on incoming SMTP also greatly reduced the spam or email DDOS by a large percentage.

Just my 2 cents.

Update: Jan 16, 2018

Today client’s email server had a DDOS attack, one of the users got tens of thousands of email and this made the spooler almost crashed, hence CPU stays at 100%. Solution is to decrease the SMTP Delay from 5 seconds to 1 second, so the email server can quickly bounce back the email (of course, remove that user temporarily).

Lesson learned, Delay SMTP delivery may cause dearly at a specific occasion, so use it wisely according to the actual filed scenario.

Damn…Even eBay Got Hacked!

By admin, May 24, 2014 8:30 am

Received a letter from Devin Wenig, President, eBay asking everyone to change their password.

ebay

If you used the same eBay password on any other site, I encourage you to change your password on those sites too. And if you are a PayPal user, we have no evidence that this attack affected your PayPal account or any PayPal financial information, which is encrypted and stored on a separate secure network.

Adidas Barricade V Classic Bk/Silver/Green

By admin, May 17, 2014 6:52 pm

今天經過商場的運動鋪,發現了一個熟悉的身影擺在貨架上。仔細一看,竟然是退役了近3年的Adidas B5,比旁邊同色的最新B8好看多了,而且還有折扣。

原來Adidas今年1月靜悄悄地復刻了過去最多人讚許的B5,這次命名為Barricade V Classic!

另外一個復刻的顏色就是我之前買的第一對黑白B5。試過穿B6/7/8,沒一對稱心,這下太好了,我的意思是現在有兩對做後備,Nike Courtballistec 4.3 blue/white和這對很Cool顏色的B5。

我喜愛的Adidas Barricade V 萬歲!

IMG_0912

Black Mirror裡的意外收穫

By admin, May 14, 2014 6:24 pm

最近在追看英劇Black Mirror,意外地喜歡上了裡面的一首60年代的老歌Anyone Who Knows What Love is (will understand)

對上一個你欣賞尊重的無記節目是什麼? 別說《天與地》是神劇,神劇該是英劇《Black Mirror》的級數。

這面「黑鏡黑鏡,邊個最陰暗」,勁過魔鏡,照妖捉妖,警世贖世,以科技為反思軸心,映照異變中的紅塵和人心。數碼世代電子行為,要多黑暗有多弔詭。獨立單元,一小時一醒世故事,足夠心腦震盪一星期至一世。

第一季第一集,恐怖份子在YouTube發放皇家公主被綁架短片,勒索英國首相當眾和生豬做愛,透過電子網絡全球直播,否則公主分件回收。要一個國家崩壞已不必大殺傷力武器。眾生嗜血嗜色,道德扭曲,蔚為可怖,但再大件事再譁眾再嘔心再轟動,喧鬧過後,無痕,才是最喪奇的集體行為藝術。

又如果一生記憶都可以完全從眼球攝錄備份,無限重播自賞或投射播放公開分享或交權力機關檢視端詳,當中有幾多荒謬沉溺幾多私隱劇透,就有幾多人性侵蝕。

兩季播出,眾口皆碑近乎完美,想像力和反諷性見血封喉,國際艾美獎話贏就贏,那個似遠還近的虛構世界,科幻奇情觸目驚心,可怕可信,看完連拿起手機的心跳都不再一樣。

睇電視,睇呢啲!《House of Cards》、《Game of Thrones》、《Downton Abbey》、《Sherlock》。尋求戲劇,上述選擇品種多樣:權術、政治、存活、智慧、愛情,人性,階級,時代,倫理,對白精妙佈局精奇,現實、古典、魔幻、懸疑一應俱全

- 畢明

About Time

By admin, May 14, 2014 6:12 pm

If you could Re-Live any moment in life, what will you do?

at

時間沒有告訴你的 (1458) – 畢明

這個世界大約有九成人在賣時間,一成人在買時間。

每天上班,你都在賣時間,買家是你老闆。時間寶貴,有出冇入,天天放血,能買時間的,多少有點本事;能替你省時賺回時間的,都比較昂貴。速遞、直航機、特別快車、電腦更快的處理器、上位捷徑,都代價更高。時間,是貨幣,你用來替自己買過什麼?有兩樣東西我很介意怎樣花:時間和信任。錢,花掉了賺得回,時間和信任我吝嗇地珍惜。

時間,就是人生。

如是,如何賣時間,就是如何賣人生。英國電影《About Time》不是關於愛情,根本是關於人生,可愛到不行,善良得過份,我愛死了。那純情傻仔主角Tim,擁有一個可以屈時間機的人生,家族遺傳了成年後可隨心所欲回到過去的異能。大拿拿,at will地穿越時空喎,不同的生命章節,可一可再,初戀初吻初夜,Tim可以有take2、3、4,take到滿意為止,發達!把歷史修理修正再修補,是超級英雄的力量,是super power!如果是荷里活佬,可能早就大美國英雄主義上身,撈個什麼「Take2俠」來救世一番,好歹逆轉911事件,或者拯救戴妃於車禍,至少去偷窺一下碧咸是否如傳聞的和湯告魯斯有私情之類了。Power令人喪,何況超級power!

但,沒有。英式幽默和智慧,連用這異能去令自己每期中一次六合彩都沒有,人生,是about time,不是關於權力、財富、名氣、是關於時間。比兒子早玩時光倒流大半生的爸爸,父傳子的錦囊是:最終,很多東西都是次要,名利權甚至令人不快樂多於幸福,人生最重要是花時間於你在乎的人和事身上,蒸餾滴淨,就是相處和陪伴。因為就算你可以不停回到過去,死亡仍是早就斟好了酒在另一端等你。

從來相信哲學家Aristotle說人生兩大悲哀是not yet(還未)和never more(不再)。還未,祇差一點點的歎息風露立中宵人比黃花瘦;不再,任你粉身碎骨都回不去的決絕,兩大警號總提醒我們「珍惜」。本片卻說,就算你有特異功能去搞掂「還未」和「不再」,仍更要珍惜。到底沒有人能搞掂死亡。與其忙着去把昨天修正變好改變世界,不如豁然擁抱每天。有變天力量的家族,ego小,沒野心,都是貪嗔癡矣,在海邊祖屋看書聚天倫就是了。人生不是關於動地驚天去證明自己,或24×7完美無瑕薔薇明媚,有莫大本事的人告訴你要享受平凡,享受沙石,享受風雨,享受缺損,享受每天:As is。超能力都不用了。

這是何等境界。在笑爆嘴的求愛、拍拖、結婚、生仔中,在可以溶掉你的父子親情中,是領悟和禪趣。與世無爭而入世,善良得通透,簡單得明媚,宋代《五燈會元》卷裏有惟信和尚說三境,人起初見山是山,見水是水;後來,見山不是山,見水不是水;最後,自己、世界、眾生都見過了,再次見山是山,見水是水。從無知到世故到豁然,本片是看似平凡的第三境了。

在九死一生的萬條死線裏,在幾段命不久矣的愛情中,生還存活的我們,還要懂得:make time。騰出時間,為了你愛的人和事。我說騰不出就再野蠻一點,去製造時間,反地心吸力都要製造些時間出來,可以的。大家要make money及make love,我知,但營役賣時間之餘記得make time,你會喜歡自己這樣做。

震撼!

By admin, May 13, 2014 6:50 pm

一直都很喜歡紐約的Metropolitan,高聳入雲的摩天大樓加上到處都充滿了文化氣息的大都市感覺。今天在翻看一本紐約的攝影集時突然看到了這張,自由女神像屹立在雄偉的雙子塔前,是的,當年的美國曾經是多麼的雄霸天下…

ny

600萬的上車盤

By admin, May 10, 2014 4:32 pm

最近有政府財經高官說600萬在香港最多也只能買個上車盤,今天偶然在家裡找到了一本2003年沙士時期的豪宅攻略,這些當年頂級的名廈,一個小單位也只是600萬左右,今天看來當然便宜得嚇死人,原來是我的記憶選擇性地抹去了當年的慘況,咦,才11年前的事,難道我提早患了老人痴呆症﹖

IMG_0876

Pages: Prev 1 2 3 4 5 6 7 ...44 45 46 ...102 103 104 Next