Author Archives: Ying Kit Yuen

About Ying Kit Yuen

Life is for fun~ =)

mdpress – Present your markdown file in slideshow

I have been using reveal.js to create slideshow from markdown. It’s very nice and powerful. But the setup is a bit complicated. Sometimes i want to have a more simple solution.

Other than reveal.js, impress.js is a similar tool which allows you to present your ideas in a even more fancy way. I am not going to go into details of impress.js. Instead, i would introduce a tool called Mdpress which generate the .html presentation from markdown.

1. Install the Mdpress.

gem install mdpress

Continue reading

陶傑 – 天寒說佛

大陸北京毒霧鎖天,居民在街上戴防毒面具。洋人憂慮子女健康,陸續回國。

兩年前美國駐北京領事館每日發佈北京的污染數據,一片好意,但遭到中國政府辱罵為「干涉內政」,現在,北京一片灰霾。

美國駐華大使駱家輝便服親民,中國也大罵,指為做秀挑撥,現在,中國的總書記模仿,去北京吃包子,這又不是「做秀」了。

一個民族缺乏基本的理智和邏輯,卻又迷信「GDP壓倒一切」,道德信仰,又被他們膜拜的真神毛澤東摧毀淨盡,這下子,可精采了──說是精采,因為大陸是不可以批評的,一批評,即是「偏激」,你便是那十四億人民的敵人了。
Continue reading

陶傑 – 夏志清與錢鍾書

夏志清逝世,民國時代剩下的一廟殘燈,又滅了一盞。

夏志清不但推崇張愛玲,還心儀錢鍾書,尤其錢鍾書的小說,連同張愛玲,夏志清認為比魯迅好。

在七十年代,因為毛澤東和共產黨將魯迅尊為文學的穆罕默德,說魯迅的小說很一般,甚而推許所謂「漢奸」張愛玲,對於那時的中國人,好像端了一塊肥豬肉進阿富汗塔利班的清真寺裏供奉膜拜,加上夏志清的反共,夏志清被左仔文人攻擊為「學閥」。

夏志清比錢鍾書晚半輩,一九四四年,夏志清在宋淇家裏初見錢鍾書,覺得在盛年的錢鍾書,有周瑜的氣質,雄姿英發,羽扇綸巾,因為年少得志,有孤傲倜儻之氣。

錢鍾書問夏志清,最近讀了什麼書。夏志清說他讀了古希臘史詩,錢問夏志清喜歡哪一部。
Continue reading

永遠の0

作者: 百田尚樹

譯者: 王蘊潔 (我看的這個中文譯本譯得非常好,超讚!)

震撼人心的一部小說… 一部關於二戰時期美日兩軍戰爭的小說…

未看過的可能會懷疑這是一部美化日軍係二戰時所犯罪行的小說,我不能判斷書中所描述的有多真實,但我相信有很多在前線作戰的士兵都不是戰爭狂熱份子,佢地只不過是後方策動與指揮戰爭的棋子。最大的錯誤係佢地無去反抗外在環境所附於佢地身上的壓力,盲目遵循,造成生靈塗炭。

作者用文字告訴世人戰爭的可怕,我不敢想象戰爭親身在戰場時那種壓力。另一方面我認為作者給世人帶出了一份非常重要的信息,那就是要有否定甚至對抗那大圍意識形態的勇氣,堅持自己的信念。

artwrok

AngularJS directives of Foundation

We got the Foundation 5 with Sass styling working on our AngularJS project which was scaffolded by Yeoman.

 

Let’s continue our ng-foundation example above.

To utilize the Foundation framework in a more effective way, the Mad Mimi team creates some native AngularJS directives based on Foundation‘s markup and CSS which is available on Bower.

Continue reading

Yeoman – Setup AngularJS and Foundation 5 with Sass

The generator-angular written by the Yeoman team comes with Bootstrap integration. But instead of using Bootstrap, i would like to use Foundation 5 with Sass. The following example is created under Node.js v0.10.29.

1. Create your project directory. In my case, i will name the project ng-foundation.

mkdir ng-foundation

 

2. Move to the ng-foundation folder.

cd ng-foundation

 

3. Scaffold the AngularJS project using the generator-angular as usual.

yo angular

Continue reading

rbenv – Ruby version manager

rbenv is an alternative to rvm for managing your Rubies. You can find some articles comparing the two. In general, rbenv is more lightweight without overriding the cd and gem command which rvm does and their similarities outweigh their differences. Here is a great article written by Jonathan Jackson about the two solutions.

 

For Mac users, you could install rbenv using Homebrew. Otherwise, you need to checkout the repository on GitHub.

Continue reading

Manage your Python projects with virtualenv

Last week we talked about managing multiple Pythons using pyenv.

 

But still we are lacking something like the Gemfile in Ruby for managing the version of those Python packages in a Python project. And here comes the Python virtualenv.

We can create different virtualenv on the same machine and each of them has its own Python binary, the pip package and the all other standard Python libraries needed to run the Python. In other words, each virtualenv acts like the Gemfile in a particular Python project.
Continue reading

陶傑 – 文化不多元

「文化多元」(Multiculturalism)是一個理想,卻是一個神話:一個國家,不同的種族和平共處,可以各自保持自己的傳統習俗,但又擁有共同的價值──譬如加拿大:共同的價值,是人權和自由。

「文化多元」在一些小國,從來沒有問題。譬如瑞士,在「文化多元」的詞彙發明之前,本來就是文化多元的國家。瑞士由德、意、法三大族裔組成,還有百分之一的古羅馬帝國後裔,叫做Romansh。四種族裔各自保留本身的語言、習俗、食物,但是,四裔都擁有共同的耶教文明,雖然語言和食物不同,對於自由、人權、寬容,以至藝術的品味,譬如都喜愛莫扎特和貝多芬的音樂,都欣賞達文西和印象派的繪畫,瑞士這四種族裔都一致。

但是,瑞士卻很排外。在這四種族裔之外,瑞士不太歡迎非歐洲白人的移民。搬來一家很有錢的中國人,無論日內瓦或蘇黎世,還是洛桑,都要由一條街的瑞士人──不論是德、意、法還是羅馬裔,嚴格審核:該中國家庭若在花園供奉四面佛,農曆新年放爆竹,瑞士的街道委員會不會批准其買房產。

同理,搬來一家巴基斯坦人,瑞士也予以排斥。為什麼?因為德、意、法、羅馬裔的「文化多元」,不包括容納清真寺和觀音廟,更不包括容納一戶來自中國重慶的富戶,在洛桑的湖邊買一座豪宅,然後升起一枝五星旗,天天對着湖光山色播「東方紅」。
Continue reading