Subscribe to RSS Subscribe to Comments Blog of Roy Chan

Blog of Roy Chan

使用 vim 編輯 web textarea (Firefox or Kazehakase)

用了 vi/vim 十多年,其他 text editor 對我來說確實很麻煩。大部份事用 vi/vim 做都有說不出的爽!!! 就算多年前因工作需要在 windows 寫程式寫,也懶得用 UltraEdit 等,抓個 vim windows 爽很多。近年,經常要在網頁上的 textarea 打一大篇文章,結果還是受不了,很多時需要在 copy&paste 到 vim 執行仔細的編輯。簡潔的按鍵自然是我喜用 vi/vim 的主要理由,regular expression 更是我編輯時不缺的利器。

幾年來,我花了不少工夫企圖把 regular expression 或 vi/vim 式的編輯引入 web,包括寫了些 bookmarklet 等,但始終和 vi/vim 差很遠。嘗試過幾個令 Firefox 使用 external editor 的 extension, 不過都不太有效。近兩年前,找到了 It’s All Text,終於把我這個難題解決了。

It’s All Text 這個 Firefox extension 安裝後,會在每個 textarea box 的右下角浮現一個 “edit” 小按鈕,按下就會把 textarea 的內容送去指定的 text editor 進行編輯,絕對是 vi/vim 的必裝 extension。

然而,這年來因為安全問題,我經常會同時使用多個 browser,用不同 browser 執行不同安全級別的 web apps。(都是 ajax 惹的禍)。Prism, Epiphany, Kazehakase,甚至 Opera 都會常用來代替 Firefox 執些較低 reliability 的 web site/apps (Prism 一般用來跑重要的 webapp 如 gmail 和 online-banking),Noscript extension 則用來限制不明網站的 javascript。不過用其他 browser 時,就少了 It’s All Text 用 external editor 的爽便。早期才發現用了半年的 Kazehakase 其實內建使用 external editor 的功能,多了個可以便利使用 browser。

在 Kazehakase 設定使用 gvim 很簡單,首先 UI Level 要設定為 Expert (View -> UI Level -> Expert),在 Edit -> Preference 中的 External Program,設定 Editor command 為:

gvim -f %s

就搞定了。 (-f 選項是避免 gvim 自動 fork 入背景工作,令 Kazehakaze 不知 gvim 完成編輯)

往後在要編輯的 textarea 按右鼠鍵在選單選 Launch Editor 就可以了。(當然是經謹關閉了 gvim 才好 submit web form)


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


Ubuntu 7.10 和 Fedora 8

這大半年的時間都很懶寫 blog, 一來忙 MSc, 二來也多花時間去整理 OSWikiHK。順帶提一提 Ubuntu/Kubuntu/Edubuntu/Xubuntu 7.10 (Gusty Gibbon) 的安裝手冊 (桌面伺服器)早在個多月前已完成了。也有份教人由 Ubuntu 7.04 (Feisty)升級至 7.10 的文章Fedora 8 (Werewolf)才完成了幾個星期 (LiveCD 倒時未正式動手)


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


What religion do you fit in with?

似乎正路過頭!十年都無乜變過!

You fit in with:
Atheism


Your ideals mostly resemble those of an Atheist. You have very little faith and you are very focused on intellectual endeavors. You value objective proof over intuition or subjective thoughts. You enjoy talking about ideas and tend to have a lot of in depth conversations with people.

60% scientific.
60% reason-oriented.

Take this quiz at QuizGalaxy.com


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


How Do People See You?

Slow and Steady
Your friends see you as painstaking and fussy.

They see you as very cautious, extremely careful, a slow and steady plodder.

It’d really surprise them if you ever did something impulsively or on the spur of the moment.

They expect you to examine everything carefully from every angle and then usually decide against it.
How Do People See You?

Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


What Are The Keys To Your Heart?

The Keys to Your Heart
You are attracted to those who are unbridled, untrammeled, and free.

In love, you feel the most alive when your lover is creative and never lets you feel bored.

You’d like to your lover to think you are stylish and alluring.

You would be forced to break up with someone who was ruthless, cold-blooded, and sarcastic.

Your ideal relationship is lasting. You want a relationship that looks to the future… one you can grow with.

Your risk of cheating is zero. You care about society and morality. You would never break a commitment.

You think of marriage something you’ve always wanted… though you haven’t really thought about it.

In this moment, you think of love as commitment. Love only works when both people are totally devoted.
What Are The Keys To Your Heart?

Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


tk421 character

Which Fantasy/SciFi Character Are You?


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


當Blog變成一種職業

我不是指建立一個網站供人寫 blog 或協助人寫 blog 。而外國已有一些公司聘請人寫 blog 或把寫 blog 放入員工工作範圍的一部份。WSJ報導這些職業blogger年薪約四萬到五萬多美金,條件好像頗吸引。但有關blogger一般都需要管理多個不同形式的blog,而顧用這些blogger大都期望可以透過blog加強公司和顧客的關係、收集多點顧客的意見及增加其產品的銷量,所以一般都找一些善長口語式寫作blogger。

事實上隨著 Blog 文化的流行慶起,不少企業都意識到blog對其公司運作及印象的影響。很多員工在其blog多少都會談及工作上的事,引起了不少顧客。blog令一些顧客可以更直接接觸到一些産品的開發者或有關員工,亦可以取得公司主要職員對市場及世界的看法。有趣地,這一切一切令公司和顧客建立了一種和一般宣傳手法很不同另類的溝通渠道。


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


Jung Personaility

INFP - “Questor”. High capacity for caring. Emotional face to the world. High sense of honor derived from internal values. 4.4% of total population.
Free Jung Personality Test (similar to Myers-Briggs)

Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


《新增點》的 Blog

因為CableTV的《新增點》對Blog的報導引來香港blog界熱烈討論。上週看完節目後本來也想插幾句,但看到一大堆「狠評」,反而激起我那「包拗頸」的心態。節目對Blog文化的評價仍是很正面,而大部份解釋亦只算是收集資料不多,還未到達扭曲的地步。相比以往傳媒定性動漫畫為小孩玩物,狠批「暴力」和「色情」成份的動漫畫,將 Hacker 和Script Kiddie混淆扭曲hack為電腦犯罪,對自由軟件文化和免費畫成等號,對 P2P 分享的以先設觀念及對知識產權和專利問題的傳達等,可謂小巫見大巫。年紀大了,開始有點麻目。

並不常看《新增點》,不過大體知其主體在於學習及自我增值的話題上,用近二十分鐘的篇幅去介紹blog文化,能這樣已算不錯。看了幾集覺得這節目的目的觀眾並不是年青人,反而是三十以上被人要求去「增值」的一群(個人觀感,絕對有錯)。 對其仍抱一般成年人角度去看blog文化倒不意外。以節目性質,很難要求其有《鏗鏘集》、《星期X檔案》或《新聞透視》的程度。或者我一向頗在意blogger的陰暗面 (正確應說我個人陰暗面) ,對節目對Blog正面的報導已感安慰。

有人狠評節目鼓勵家長多看子女的blog令blog成為審查工具。我看節目時也暗笑叫家長多看子女blog只會嚇怕年輕人不想寫blog,但被評為審查工具又未免誇張。大概很多人都會感覺到最不瞭解年輕人一般都是家長及老師,在一切被成年人主導的環境以外,Blog自然為年輕人提供了一個自主的思考及交流空間。讓成年人接觸年輕人外一面確實對兩代溝通有很大幫助,不過節目表達方式就有點笨拙,又是一句:「時間關係」。或者令我最覺得可惜的是節目並沒有鼓勵成年人去寫 Blog ,仍夠是典型HK Uncle的「 XXX 是青少年玩意。」

作為一個斷斷續續七、八年的「網上日記」者,看著 OnlineDiary->Weblog->Blog 的變遷,我從來不覺得Blog是什麼偉大的東西(我對Wiki的評論會高點) ,去年看見阿當對Blog的分析實在有點:「Orz」。在我來說Weblog™只是一種管理網站的形式,Blog™是舒展個體思維片段的方式(或者這是這七、八年老blog不叫座的原因 P )。對社群或社會的影響始終在於內容而非形式本身。而作為文化看,我的著眼點又和其他人不同。 (寫得太多,懶再提)

或者簡單地說,這是一種玩意,這是一種興趣,這是一種文化,這是一種寫作,這是一種分享,大家享受就夠了。 )

P.S. 「網誌」OK, 「博客」,受不了。我仍舊認為有些東西不應有中譯。

P.P.S. 當一個blog的瀏量達一個數目,他算不算主流媒體!?


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


My age

I think I should glad to see such a result. p

You Are 23 Years Old
23
Under 12: You are a kid at heart. You still have an optimistic life view - and you look at the world with awe. 13-19: You are a teenager at heart. You question authority and are still trying to find your place in this world. 20-29: You are a twentysomething at heart. You feel excited about what’s to come… love, work, and new experiences. 30-39: You are a thirtysomething at heart. You’ve had a taste of success and true love, but you want more! 40+: You are a mature adult. You’ve been through most of the ups and downs of life already. Now you get to sit back and relax.
What Age Do You Act?

Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


心理測驗 - 你有條件做大老闆嗎 ?

用 Flash 來答問題頗好玩!

Are you the big bos?

心理測驗 - 你有條件做大老闆嗎 ?


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


Yet another Woodstock!!! ^_^

Aaww, youre woodstock! Youre a peculiar but popular cutie, who always seems confused. Youre a little forgetful and adventurous and although you might get the odd funny look, the opposite se
Aaww, youre woodstock! Youre a peculiar but popular
cutie, who always seems confused. Youre a
little forgetful and adventurous and although
you might get the odd funny look, the opposite
sex flock around you! Sweeeet!

Which Snoopy Character are you?
brought to you by Quizilla


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


My english is ……!?

You Belong in Australia
Ace! Sunny, upbeat, and cute You make the perfect surf bum Now stop hogging the vegemite!
What English Speaking Country Do You Belong In?

Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


Whether I think like a male or female!?

It might be a bit surpire that if a guy think like a female more the a male. Although some of my friends comment my charactor is totally a male charactor, some people had also stated that I’m pretty hyper-sensitive on some area and so easy to attach to some story or song which act like a girl. So, let do the test.

Your Brain is 33.33% Female, 66.67% Male
You have a total boy brain Logical and detailed, you tend to look at the facts And while your emotions do sway you sometimes… You never like to get feelings too involved
What Gender Is Your Brain?

Oh… I still a male. P


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


關於 blog & Planet

接連看到 CarlosJserv 先後對我 blog 的回應,也感到有點壓力。不過能在兩個 Planet 之間令兩岸三地的自由軟件愛好者有多點交流,也是令我興奮的事。

早前曾在Carlos的blog 討論關 Planet 在自由軟件界扮演的角色,也在這裡再引用一次(順帶做一做記錄),Carlos說道:

planet 只是诸多发布方法的一种,倒不一定非用它不可。但相比于其它的形式,planet 的优势也是明显的。
  1. 对于参与者来说,他们之间可以更方便地进行交流,却又不失自己的个性。这简直就是与开源社区百分之百的契合!
  2. 聚合文章的质素都相当高。因为参与者实际上都是在写自己的 blog,他们当然会努力将最好的东西表现出来。
  3. 作为一个社群推广网站,planet 又比传统的网站模式多了几分新鲜感和人情味。如果我不是极爱 Debian,估计用不了几天就会对 www.debian.org 厌烦了。
  4. planet 完全也可以跟邮件列表等其它交流方式进行配合,DebianTW 的 planet + forum + wiki 组合就相当成熟。

而我再補充

planet 的作用是想各项目的开发者或参予者们可以得方便看到大家的 blog ,了解彼此的工作和生活锁碎事,也对开发工作有好处。Planet Gnome 也曾讨论过应是否限制只贴有关 Gnome 的 blog ,管理员还是决定维持现状。如 carlos 所说, planet 对一般大众的门槛较低, 开发者们也有互动性。如果你有留意 Planet GnomePlanet Debian ,他们经常一起去做同一个心理测验,用 blog 讨论同一个题目 (Mono vs java, evolution, hula 等),当然同样的事也可以用 mailling list 去讨论。但 planet 就可以吸引多点使用者去留意。他们也经常把自己对软件的新 idea 贴出来 (偶然还有 screenshot) ,可以取得多点非开发者的意见,这是其他媒体较难做到的。

在寫 blog 方面,我已習慣每次都拜訪 Google 大神幾趟,找link之餘也用來確定自己沒有太多白字。沒法子的話,唯有避重就輕,改用那一詞匯。寫好後,也連檢幾次。其實寫 blog 對我來說一向是自娛、發洩的地方。幼時懶於寫日記,腦中念頭多多,但大部份都沒有表達過出來。Blog 可以記錄腦中某時間的某個想法,也方便我以後把一大堆思緒整理螎合。所以很多內容也不免留於過份偏激或不完整。期望不會引起太大問題。另外,寫blog也是練語文的地方。不寫就永遠不知自己會在那裡出錯。尤其我這類 geek ,不可以一世都只寫和電腦有關的文章。寫 blog 可以在修辭和用字上有多點嘗試。(無論中英文都好)

P.S. 哎,Planet 似乎在讀 atom feed 有問題,一時讀到內文,一時讀不到,現在經常只顯示到 Carlos 及 Ling Li 的標題。等有時間才搞搞。

P.P.S. 幾個月前在家母的書架上找到本教老外普通話的書,文中經常一大段長長的漢語拼音,中文多在頁尾,對糾正我那爛爛的普通話很有幫助。 (在普通話方面給長註北京的 YP 追過有點不甘心。 P )


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


捉白字的 blog

遇然發現一個專捉網站及漫畫白字的blog - 《 去吧!錯誤特攻隊!》,蠻有趣。我本身也出名很吹毛求疪,理工時代曾專在 newsgroup 捉人白字 (主要是因為舍妹的協力),那時更美其名「專捉字『倉』」。當然我的中文一向都很差,也經常打了白字。偶然重讀自己寫的舊文就會發現不少白字,但我對這些事是頗認真,可以改的話都會盡量去改。大家如果發現本站有任何白字,也請指出。有些人覺得這是小事,不過看見今天的報紙丶雜誌寫的中文,我也不免為中文的未來而擔心。


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


Are you a nerd or loser?

I am nerdier than 87% of all people. Are you nerdier? Click here to find out! What is your weird quotient? Click to find out! I am 89% loser. What about you? Click here to find out!


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


你是那個 OS?

「你是那個 file extension 」後,這次是到「你是那個OS」:

You are TRSDOS. Compatibility is always an issue with you.  You feel the world has passed you by.  Time has not treated you well.
Which OS are You?

看看其他 OS 是怎樣?


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


你是那個 file extension ?

看見 Planet Gnome 不少人做了這個小心理測試,我也試試。結果是:

You are .jpg You are very colorful.  Sometimes you forget things, or distort the truth.  You like working with pictures more than words.
Which File Extension are You?

我覺得一般,不怎準。


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


blog.xychen.org

Blog of Roy Chan - Blogging again

I have migrated all my blog including some comments from xychen.org and DebianHK to blog.xychen.org and now it is running WordPress


Share It: [del.icio.us] [Technorati] [Google Bookmark] [Yahoo MyWeb] [Furl]


Based on Fluidity© 1998-2007 Roy Hiu-yeung Chan