Monday, December 26, 2011


This post is a translation of my other post in Chinese.  I wrote that to share my personal reaction toward a recent incident in Taiwan: the municipal administration used water jets to drive away homeless people in the park in a cold evening.

Please note that since this is a direct translation from the original Chinese post, the composition flow may not be as natural to English readers. Please bear with me and hear out what I have to say, if you are interested in reading this anyway.

When I moved from Southern California to Philadelphia for my graduate study in 1998, I was shocked to see so many homeless people. I witnessed a country in which the rich can personally own a hill, while the poor would seek food in the garbage can.  While some spend their afternoons watching seagulls with their beer on the beach, some others try to survive a cold night by staying close to the external vent of a building's heater.


(English readers, you may be interested in my English translation of this post.)



Friday, November 11, 2011

Sunday, November 6, 2011

About this blog 關於本網誌

The primary topics covered in this blog are listed as "labels" (Arts, Composition, Technology, etc.) so please use them if some topics are less interesting to you.

I see myself as a citizen of the globe and I believe sharing thoughts in an honest way helps make the world a little bit better. A lot of people are already doing this in a much better way, and I do my small share with this blog. I write things that I think may help somebody out there.

"Still reflection" sounds non-English and it gives away the fact that English is not my native language. I hope one day the machine translation technology will allow everyone in the world to express themselves with their most comfortable language. However, before that day comes, I still choose the most international language (at the time of writing) to write most posts because I believe linguistic origins should not impair the exchange of thoughts and ideas. Sometimes I'll write in other languages if the specific contents benefit the readers of those languages the most.

This blog contains decades of posts and earlier posts do show the immaturity and the big ego of an ignorant young man. This blog, therefore, records my growth and self-reflection.

You can read more about blog organization details here.

本網誌涵蓋的主題列在Labels之下(藝術,音樂創作,科技等等)。 您可用來篩選您有興趣的主題。





Saturday, November 5, 2011

Contact 與我聯繫

If you are responding to one of my posts, please leave your comments there. If you have a reason to send me a private message, please use this form. However, please understand that I may or may not be able to reply to your message, although I will try.

Note that the old contact method no longer works.



Sunday, September 25, 2011

Create distinguishable device IDs for two Dell Keyboards

I like the Dell keyboard SK-8115 (or L-100) because of the left Ctrl key allows my palm to hold it naturally (as opposed to moving my pinky, or worse, my thumb, toward it by twisting my wrist). When I am setting up MultiSeat under X11, I need to distinguish the two keyboards. Unfortunately, both of them come up as /dev/input/by-id/usb-Dell_Dell_USB_Keyboard-event-kbd (the latter recognized one overwriting the first one) so in my xorg.conf I can't specify either.

Fortunate for me, they have different product ID (by "cat /proc/bus/input/devices") so I can create a udev rule to produce two different device nodes. (Update: even if both devices have the same product ID, one can still distinguish them according to their USB port addresses)


# /etc/udev/rules.d/60-dell-keyboards.rules
# udev rules for dell keyboards.
# This solves the problem of the same /dev/input/by-id/usb-Dell_Dell_USB_Keyboard-event-kbd problem while I need to distinguish the two Dell Keyboards
# ref:
# ref:

KERNEL!="event[0-9]*", GOTO="dell_key_end"

# Port specific link for users of multiple keyboards of the same type.
# The ID_PATH variable is set by the "path_id" script in an earlier rule file.
ATTRS{idVendor}=="413c", ENV{ID_PATH}=="?*", SYMLINK="input/by-path/$env{ID_PATH}-dell"

# Type-named links for multiple keyboards
ATTRS{idVendor}=="413c", ATTRS{idProduct}=="2003", SYMLINK+="input/dell_keyboard_2003"
ATTRS{idVendor}=="413c", ATTRS{idProduct}=="2105", SYMLINK+="input/dell_keyboard_2105"


Sunday, June 5, 2011

Scan old black and white books

I had to digitize an old book with yellowed pages and the following bash command helped me to do the job.

convert is part of ImageMagick package. pdftk is a utility to manipulate pdf files.

-threshold split all colors into black and white. +delete removes the extra page created from cropping.

mkdir work
for i in *[13579].png; do convert $i -crop 2544x3250 +repage -threshold 40% +delete work/$i.pdf; done
for i in *[02468].png; do convert $i -crop 2544x3250 +repage -threshold 40% +delete -flip -flop work/$i.pdf; done
cd work
pdftk *pdf output ../all.pdf