rEFIt – Boot Manager for Mac

Finally i get the Windows 7 installed on the Mac Mini.

 

Then i tried to do the same for the MacBook but i couldn’t find the usb drive on the boot menu. After asking Google, it is found that for those Mac machines which are equipped with the super drive (dvd drive), they cannot be booted by external devices. I try to install the rEFIt boot manager but it still doesn’t work.

Finally i have to use the Boot Camp to install the Windows 7, but i have to find a DVD Windows 7 installer. Anyway, the Boot Camp is really cool and all drivers are automatically installed.

Done =)

Windows Drivers for Mac machine

Recently i have tried to install Windows 7 in a Mac Mini and a MacBook. I have a Window 7 installer in a bootable usb. Just keep pressing the option key on startup and you could select the boot device in the boot menu. It works fine for the Mac Mini and the Windows 7 is installed without any problem.

But after the installation, i found that many drivers are missing. Finally i found a blog post written by Chris F Carroll. You can find all the details about getting the drivers from the Boot Camp package in that post so I am not going to repeat it here.

 

Done =)

Drupal 7 – The form has become outdated

After enabling the Cache blocks option @ admin/config/development/performance, the form inside a custom block throws the following error.

  • The form has become outdated. Copy any unsaved work in the form below and then reload this page.

 

One work around is to disable cache for that specific custom block and this could be done by adding the DRUPAL_NO_CACHE in your hook_block_info().
Continue reading Drupal 7 – The form has become outdated

陶傑 – 科學怪人

英國一項調查:在網絡和iPad世代,人類的智商下降。在沒有電腦的維多利亞時代,人類反而比現在聰明。

當然,此一調查,標明「維多利亞時代」,自然以英國為中心,因此不可以誤會:一九○○年的盧旺達非洲人,比今日的土著聰明。調查結果是指維多利亞時代的英國,人文思想家輩出,赫胥黎、達爾文、格拉士東、邱吉爾,還包括羅素,今日人才貧瘠。

英國來的朋友,聽說香港人懷念英治時代,笑說:「首相金馬倫,我們不想要,如果香港人想他來香港當總督,我們不介意轉讓。」

網絡時代,智商下降,因為這一代人不太懂得分辨和思考。
Continue reading 陶傑 – 科學怪人

陶傑 – 澳洲女強人

瑞典斯德哥爾摩暴動,理由是外來移民破壞社會和諧。

英國黑人伊斯蘭恐怖份子街頭砍殺白人英軍,兇手來自非洲的尼日利亞。

歐洲的外來移民太多,他們的文化背景不同,不是信奉可蘭經,就是心繫五毛式的另外的「祖國」,許多外來移民,從來沒有認同過歐洲的人文價值觀:崇尚寧靜,尊愛自然生活,儉樸而有品味,不盲目炫耀財富,而且,是耶教文明。

外來移民來到歐洲,有幾多個認同歐洲和西方的民主自由,還是來領取社會福利,或者用貪污來的金錢購買房產和居留權?歐洲的文化,從十字軍東征以來,就是耶教、理性、寬容──外來的新移民,利用歐洲的寬容,鑽混進來,堅持自己的「文化」裏的偏激、仇外、狹隘、喧嘩,當歐洲人覺得他們這麼做,無法融入歐洲主流,好心勸喻,他們反過來,指摘包容他們的歐洲是「種族主義者」。
Continue reading 陶傑 – 澳洲女強人

Life of Pi

作者: Yann Martel

沒有比我想象中的懸疑,除了主角在最後向日本人說出另一個版本引起很大的震撼外,大部份的篇幅都比較平鋪直敘。始終電影在視覺上可帶給觀眾很大的娛樂,若果將很多細節都有文字表達,的確比較沉悶。幸好我沒有看電影版,否則可能未能看畢全程。 =P

Pi 的冒險旅程令我確信人生其實應該要積極面對困境,並且敢於挑戰各種教條。而 Orange班馬的一段也令我動容,但最深刻都是末段的人化版,也令我聯想到 Pride and Prejudice 裡人與人之間因主觀的看法而產生的各種非理性思考與行為。當然這些情感上的因素其實也是人性的一部份,我們也不應追求那種非人性的絕對客觀,但要如何判斷自己的行為或思考有一定程度的理性支持,並盡量排除非理性的影響,或者是人類一生人都要學習的學問。

Life-of-Pi

Drupal 8 – Create a node through RESTful Web Service @ 1

In the previous posts, we have gone through some examples about working with Drupal 8 RESTful web service.

 

We can also add node to Drupal through web service. But as i mentioned before, the RESTful feature is not fully completed so we can only create a node with a title. Here is a example web service client in PHP using Guzzle.
Continue reading Drupal 8 – Create a node through RESTful Web Service @ 1

Drupal 8 – Login in Guzzle Web Service Client @ 1

1. Get your PHP client ready by following my previous post.

 

2. Update your index.php as follow.

<?php
  require 'vendor/autoload.php';
  use Guzzle\Http\Client;
  use Guzzle\Plugin\Cookie\CookiePlugin;
  use Guzzle\Plugin\Cookie\CookieJar\ArrayCookieJar;

  $cookiePlugin = new CookiePlugin(new ArrayCookieJar());
  $client = new Client('http://drupal8.localhost.com');
  
  $client->addSubscriber($cookiePlugin); 
  $request = $client->post('user', null, array(
    'name' => '<username>',
    'pass' => '<password>',
    'form_id' => 'user_login_form',
  ));
  $request->addHeader('Accept', 'application/json');

  $response = $request->send()->json();

  print '<pre>';
  print_r($response);
  print '</pre>';
?>

Continue reading Drupal 8 – Login in Guzzle Web Service Client @ 1

Connect Drupal 8 RESTful Service with Guzzle PHP Web Service Client @ 1

Previously I have setup a a Drupal 8 which is RESTful ready.

Guzzle is a PHP HTTP client & framework for building RESTful web service clients. In this example, we would create a simple .php to fetch a node from Drupal 8.

1. Make sure you have the Composer installed. You can refer to my previous post.

Continue reading Connect Drupal 8 RESTful Service with Guzzle PHP Web Service Client @ 1

Drupal 8 – Setup the RESTful Service @ 1

After studying Drupal 8 for a few days, i got the feeling that there are still a lot of works to polish it before a beta or RC release. And lacking documentation is another big problem to kick start with Drupal 8. This post may help you to get some simple idea on how to setup RESTful service in Drupal 8 but very likely, the details will change in the future.

1. Enable the RESTful Web Services.
drupal-8-setup-rest-service-1
Continue reading Drupal 8 – Setup the RESTful Service @ 1

Dream BIG and go for it =)