Ubercart – Charge throught membership subscription on Drupal 7

I have never tried to build a Drupal application with paid membership. Both Ubercart and Drupal Commerce provide membership subscription feature. This example is a proof of concept on implementing paid membership on Ubercart.

1. Enable the Roles module in Ubercart.
ubercart-membership-1
Continue reading Ubercart – Charge throught membership subscription on Drupal 7

陶傑 – 正說「包容」

「包容」這個詞,近年在香港,時時受到歪曲和誤解。

「包容」不是縱容陋習、助長罪惡之風的意思。「邪惡之所以勝利,在於善良的人一事無為」──路見不平,不予干預,以「包容」的一知半解來自慰阿Q的懦弱,是很可鄙的。

什麼是「包容」(Tolerance)呢?一九八六年六月,倫敦一群作家,在市中心海德公園附近定期聚會,痛論時政。他們尤其不滿首相戴卓爾夫人的管治,商量有什麼辦法,可以用自己的寫作影響力,令戴卓爾夫人倒台。

他們成立了一個鬆散的同盟,自稱「六月二十日小組」,因為正是在一九八六年的六月二十日,決定同氣連枝,以結束戴卓爾夫人管治為目標,他們認為這將是歷史的一天──其中的典故,是第二次世界大戰時貴族出身的德國將領史托芬堡密謀刺殺希特拉的壯舉。
Continue reading 陶傑 – 正說「包容」

陶傑 – 講錢傷感情

前政務司司長林瑞麟原來是個值得懷念的人物。在「汶川大地震」之後,有一筆為數二百萬元的香港捐款,用作在災區「重建學校」,哪知道學校建好之後,很快拆掉,改建成夜總會。林司長到四川去追查這二百萬捐款的去向。

林司長為什麼膽敢這樣做?不知是不是受到上帝指引。二百萬元雖然很少,但當初你有捐出去的義務,因為「血濃於水,本是一家人」,但後來錢不見了,你如果想查究,就變成「干涉內政,井水犯河水」。中國人的邏輯標準像四川底層的地殼板塊,時時移來移去,林前司長膽敢去查究,不論追不追得到,這份身入虎穴的道德形象,十分令人欽佩。如果要求不太高,二○一七年若林前司長選特首,香港人還是可投一票。

這次又地震,中國政府表現大國成熟器度,宣佈婉拒境外援助,確實,中國已經強大,歐洲和冰島都乞求中國資金,強國的定義是你有事求我,我出點事,不必求你。當年鄧小平說收回香港主權,戴卓爾夫人告訴他:「收回香港,將會是一場災難。」鄧小平答:「再大的災難,中國人民也能獨自承擔。」
Continue reading 陶傑 – 講錢傷感情

Mongoose – Simple web server

Thanks my friend Mart who introduces reveal.js to me. It’s a great presentation framework and we used it for our Front End Web Development course in General Assembly.

Without the web development framework like Python Django or Ruby on Rails which bundle with pserver and WEBrick, i would like to find a light weight web server such that i could edit and preview my markdown which runs on reveal.js. Finally i find Mongoose.
Continue reading Mongoose – Simple web server

名言七十九

The universal voice of mankind is always declaring that justice and virtue are honourable, but grievous and toilsome; and that the pleasures of vice and injustice are easy of attainment, and are only censured by law and opinion. They say also that honesty is for the most part less profitable than dishonesty; and they are quite ready to call wicked men happy, and to honour them both in public and private when they are rich or in any other way influential, while they despise and overlook those who may be weak and poor, even though acknowledging them to be better than the others.

Plato/Plátōn

Drupal – Run Drush in Windows PowerShell

1. Install the Drush Windows Installer.
 

2. Open the DrushEnv.bat in a text editor. The default location should be C:\Program Files (x86)\Drush. You should see the ENV variable setting as follow.

@ECHO Command Prompt shell optimized for Drush 
@SET PATH=%PATH%;C:\ProgramData\Drush\
@SET PATH=%PATH%;C:\Program Files (x86)\Drush\GnuWin32\bin
@SET PATH=%PATH%;C:\Program Files (x86)\Drush\Php

Continue reading Drupal – Run Drush in Windows PowerShell

陶傑 – 歷史的懲罰

鐵娘子逝世,香港網絡展開辯論,追究戴卓爾夫人當年交還香港的責任。

戴夫人不想交回香港,但怡和匯豐一直迫英國解決租約。本來,中國一貫立場,從毛周開始,就是「香港前途問題由中英雙方談判解決,談判之前,維持現狀」。這句話有兩點意思:一是毛主席周總理無意與英國開戰,二是「維持現狀」符合中共利益。維持多久?中方那時講得很白:一是「長期利用,充份打算」,二是「不承認三個不平等條約」。

意思明顯不過:你英國不主動提租約,我就不會收回,一九九七年也不會。英國人講「契約精神」,但跟中國交往,必須遷就中國國情文化。面子攸關,叫你別把那層薄薄的紙戳破,你就要規矩些,大家裝作不知,千萬不要攪局。
Continue reading 陶傑 – 歷史的懲罰

Dream BIG and go for it =)