It’s really a great talk. The demos are amazing and Bret shows his principle about immediate connection clearly just like the nomodes principle of Larry Tesler. And apart from talking about the principles, the most valuable thing is how he suggests ppl to think about their own life. it is not just a clip about technology but how ppl change the world.
京都歷史事件簿
作者: 林明德
- 日本天皇是萬世一系,即是說日本歷史上的皇室血統從無間斷,算一算現任日本天皇 – 明仁天皇己經是第125代。
- 日本天皇是沒有姓氏,日本憲法也未賦予其公民權。(即是不是日本公民? LoL)
- 神道教(神道)是日本的傳統民族宗教而日本天皇係神道教的最高領袖。
- 日本天皇是神道教中天照大神後裔,故具有神性。而第一位天皇就是神武天皇。
- 日本皇室有三神器,分別是
三神器,一聽還以為是漫畫的故事情節,但其實全都是現實生活內日本的史料。
小時候唯一接觸到日本歷史的機會就是看我的二哥玩太閣立志傳,織田信長、羽柴秀吉等戰國名將都是那時學的。今次看的這本京都歷史事件簿令我有機會一探日本的不同時代的歷史。雖然每一章節在時間上並不相連,但當中的內容都足夠吸引我在網上搜尋更多補充資料,對日本歷史有興趣的朋友不妨以此書為日本歷史的入門書。
當然,若果將來有機會到京都,我都一定會帶同它一路上探究每個歷史遺跡。
本書的七個章節有:
- 本能寺之變
- 比叡山燒討
- 平安建都
- 豐臣秀吉
- 源義經
- 應仁之亂
- 新選組
Drupal – Limit the number of values of a content type field by role @ 2
Previous: Drupal – Limit the number of values of a content type field by role @ 1
Another way to limit the number of values of content type field is adding an extra validation on the node create/edit form. Assume we have a content type called center and a media field called field_center_video.
1. Create a custom module and add an extra validation. Continue reading Drupal – Limit the number of values of a content type field by role @ 2
Drupal – Limit the number of values of a content type field by role @ 1
Sometimes will be want to restrict the number of values of content type field by roles. In that case, we could create a custom module and alter the node create/edit form. The following example will unset any field values which are outside the limit.
Continue reading Drupal – Limit the number of values of a content type field by role @ 1
名言四十六
真正讓人感到丟臉的並不是不知道(那其實是很正常的),而是不願意知道;真正讓人感到丟臉的,是當有機會可以知道卻選擇不尋求答案。無知本身不會導致人們拒絕尋求答案,唯有自以為知者才會如此。
José Ortega y Gasset
荷西.奧德嘉.賈塞特
* 有冇人知道這句的英文翻譯是什麼? 中文是出處是What is philosophy 哲學是什麼?
Drupal 7 – Autoload View rows when scrolling down like Twitter
The Views Infinite Scroll integrates the jquery-autopager with Drupal and makes any view page behaves like a Twitter page.
1. Download the module and extract it.
2. Download the jquery-autopager to the views_infinite_scroll/js. (Download)
3. Enable the module
Continue reading Drupal 7 – Autoload View rows when scrolling down like Twitter
Linux – Find the process which occupies a specific port
Either one of the following commands could show you the process which is running a specific port
- lsof -i :<port>
- netstat -tulpn | grep :<port>
Here is an example on my Ubuntu server.
root@li266-91:~# netstat -tulpn | grep :80 tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 31024/apache2
Apache is running on port 80.
Done =)
Reference: How do I determine which application is using port 8080?
Drupal – Clear Cache programmatically
Use the following function to clear the Drupal cache programmatically.
drupal_flush_all_caches();
Done =)
Reference: Drupal API – drupal_flush_all_caches
Drupal 7 – Restrict Access by Role (403 Access Denied) for specific paths
Today i would like share another module about Drupal access permission. It is called Path Access.
With the help of the Empty Page module, i could create any blank templates with different blocks. But unlike Views page, these empty pages do not have access permission settings. Luckily the Path Access module could fill the gap.
If you have enabled the Path Access module, you can configure the forbidden paths for different roles @ admin/config/people/pathaccess.
Continue reading Drupal 7 – Restrict Access by Role (403 Access Denied) for specific paths
Drupal 7 – Redirect anonymous user to login page on 403 access denied
If you try to access a Drupal page without proper permission, you will be redirected to default 403 access denied page. But if you have enabled the Redirect 403 to User Login module, you will be redirected to the user login page with destination set to the path which you wanna access.
Continue reading Drupal 7 – Redirect anonymous user to login page on 403 access denied
