6/05/2014

二十五周年

  拖到今天才写,最近几年的六月四日都会写一篇文章来纪念。其实也没什么好说的,我的观点都在 Twitter, 微博 上反复阐述过。

  但今年确实不太一样。今年是二十五周年,四分之一世纪过去了。美国独立到制定宪法也不过是十几年的事情。整个法国大革命也不过是十年时间。但中国的这段历史却持续的特别久,虽然时间是让人遗忘、磨灭仇恨的最好工具。几代人之后我们一生所经历的只不过是历史书中的一页而已。但对于我们则是实实在在的生命历程。我们等不起缓慢地「改良」(其实我认为改良未必就会缓慢、革命一定能迅速解决问题),何况它们根本没有任何继续改革的行动。近年来的种种事情表明,新一届政权更加专制。许志永博士被判刑;以所谓的「寻衅滋事」逮捕浦志强、徐友渔等五君子;甚至浦志强的律师也被逮捕。But you can't kill us all! 所以等待它们改良无疑是异想天开,在当前情况下,进一步地集权以及打压异己无疑是趋势。以前李庄被抓,只是一个重庆在非法抓律师,现在中国大陆就是一个大重庆。不知道薄熙来在狱中看新闻联播时有何感受。

  还有一点是最近经常发生的「恐怖袭击」与「邪教」。具体事件的详情我不知悉。但可见清华的孙立平教授所说的社会溃败已经发生。民族间的仇恨、愚昧的民众不仅是中共的难题,也必然是即将到来的民主运动的挑战。南非是民族和解的典范,但那也是经过几代人的暴力与非暴力的抗争、长时间的洗礼而达到的。但中共对中国人的伤害似乎是永远不能达到和解的。前三十年,迫害了几乎各个阶级的人,企业家、学者、农民、学生。后三十五年中的大事与转折点无疑是六四。犹太人特别记仇,但仅仅所谓的「三年自然灾害」饿死的三千多万亡魂可比纳粹对犹太人的迫害多得多了。我觉得但凡有点人性的人都不应该原谅这个政权。这也是我不同意「平反六四」的原因之一。另一个原因是它们不配「平反」,政府的权力只是国民让渡与它的,它只配道歉与忏悔。

  很多人说这几十年还是有进步的。我觉得本质上并没有区别。以前是不让听歌曲,现在美剧说禁就禁了。所以只是程度不同,政府对人民的控制依然存在甚至有愈演愈烈之势。借助于互联网与强大的财政能力,政府有足够的能力监控与定位每一个有较大影响力的异议者。也许有人会说,「这些和我都没有关系,反正我就是想过正常人的生活,不反对政府也不反对国家」。但须知当有一个人的自由被侵害的时候,所有人都不安全。这个不光是政府滥用权力的行为有可能会用到你身上;另外当被害者被逼急或逼疯了之后,任何一个人都有可能成为受害者。所谓的「恐怖袭击」也许就是这样,不树立法治,「恐怖袭击」会源源不断地到来。游击战其实就是无赖战术,任何正规军都不可能彻底战胜游击战。所以说这个政权过去没有进步,将来更不可能进步。

  我自认为是个乐观主义者,但在中国的前途上,实在是乐观不起来。两千多年的专制手段几乎都被当权者学过去了,再加上配备高科技的监控手段,以及动辄「煽动颠覆国家政权」的敏锐嗅觉。使得它们每次都能化危为安,甚至把危机转换为巩固权力的工具。但这些并非不可战胜,我感到可怕的是人的思想。像 V字仇杀队 中所描述的一样,如果有一定数量的人有战胜极权的思想,那独裁者分分钟就会灭亡。但相反也是成立的,即这种思想不被大多数人所认可,那抗争者几乎无法成功。但那又如何呢?为了自由,我愿意继续抗争,不像极权主义低头。希望以后的我勿忘初心。

2014-06-05 于布法罗

3/11/2014

Weird function in Emacs 24.4: x-display-pixel-width

When you use two or more monitors, Mac, Emacs 24.4, actually it's Emacs 24.3.50.3.

You will find weird behavior about the function: x-display-pixel-width.

In Emacs 24.4, the function return the width of your all monitors.

This is the description in Emacs 24.4:
x-display-pixel-width is a built-in function in `C source code'.
(x-display-pixel-width &optional TERMINAL)
Return the width in pixels of the Nextstep display TERMINAL.
The optional argument TERMINAL specifies which display to ask about.
TERMINAL should be a terminal object, a frame or a display name (a string).
If omitted or nil, that stands for the selected frame's display.
On "multi-monitor" setups this refers to the pixel width for all
physical monitors associated with TERMINAL.  To get information for
each physical monitor, use `display-monitor-attributes-list'.

This is the description in Emacs 24.3:
x-display-pixel-width is a built-in function in `C source code'.
(x-display-pixel-width &optional DISPLAY)
Return the width in pixels of the Nextstep display DISPLAY.
The optional argument DISPLAY specifies which display to ask about.
DISPLAY should be either a frame, a display name (a string), or terminal ID.
If omitted or nil, that stands for the selected frame's display.

3/08/2014

Install Emacs from homebrew, Mac user only

For brand new install, just run this 4 lines in shell:

brew install --cocoa --srgb emacs
ln -s /usr/local/Cellar/emacs/24.3/Emacs.app /Applications/Emacs.app
ln -s /usr/local/Cellar/emacs/24.3/bin/emacs /usr/local/bin
ln -s /usr/local/Cellar/emacs/24.3/bin/emacsclient /usr/local/bin

Please make sure that "/usr/local/bin" before "/usr/bin" in your $PATH

2/26/2014

Tip for Google Calendar: sync subscribed other calendars

Sometimes we need subscribe calendars from other people or organization.

But in the Google Calendar settings page we cannot select which one should sync with mobile device.

If you wanna manually select which one to sync, pleas visit this page:
https://www.google.com/calendar/syncselect

From:
https://support.google.com/calendar/answer/151674?hl=en

2/20/2014

The Best Music Player: Vox

Vox

It's the best music player I've never used.

I've used lots of music player, such as foobar2000, AIRPLAY, TTPlayer, iTunes, Cog, etc.

But I feel Vox is better because it naturally support ape, flac and its intuitive interface. In addition, it's default config is pretty.

I feel comfortable when I use Vox.

The official site: http://coppertino.com/vox/
The Mac App Store: https://itunes.apple.com/app/vox/id461369673

Tips for Alfred hotkey

I love Alfred. It's awesome. Of course, I'm a Mega Supporter. :)

I use Alfred to manage almost all of my hotkeys, especially those must be done by KeyRemap4MacBook.

But there're conflicts with different hotkey:
  • Case1: Suppose you have a hotkey ⌘+E to trigger an applescript. And the applescript will send ⇧+E. Then when you press ⌘+E and release ⌘ little slow. The applescript actually send ⇧+E, but you system receive the ⌘+⇧+E. Terrible.
  • Case 2: My Alfred hotkey is double tap ⌘ (Command). I have other hotkeys to toggle App, such as ⌘+⇧+E to toggle Finder. But when I press ⌘+⇧+E, sometimes the Alfred appear. 
It's really terrible and annoying. 

Until I find the post:
http://support.alfredapp.com/kb:faster-hotkeys

There are three options:
  1. Simulate modifier keys released
  2. Wait until modifier keys are released
  3. Pass through modifier keys (Fastest)
The first one is default. It means that Alfred will simulate you already release modifier keys, but the system still receive the modifier signal. 

The second one means wait until you actually release the modifier. It can avoid potential conflict for my case 1, but it trigger you action very slow.

The third one means that the action will happen when you press the whole hotkey even if you haven't release any key, especially the modifier key. The option is useful for my case 2.

Enjoy! 

2/11/2014

《影响力》总结

最近又读了一下《影响力》的笔记。一共有七章

  1. 心理影响
  2. 互惠
  3. 承诺和一致
  4. 社会认同
  5. 喜好
  6. 权威
  7. 稀缺

感觉能做出如下总结:

  • 大家都喜欢某个权威,而权威说这是稀缺的,这会影响到你。
  • 你为了获得社会认同,就会不断地像朋友表达这个观点。
  • 为了做和你的承诺相一致的事情,你不得不与和你有共同喜好并且能互惠的人合作。

2/07/2014

Reference for Solving Linear Recurrence Relations

Solving Linear Recurrence Relations means that to get a normal formula for a Linear Recurrence Number Sequences.

The famous example is Fibonacci numbers or Fibonacci series or Fibonacci sequence.

But to get a normal formula is not easy.

There are some reference for this problem:

The Notes on Recurrences provide brief and coherent explanation.

The Notes on Linear Recurrence Sequences provides a few methods include matrix.

This book: Discrete Mathematics and Its Applications, 7th Edition, Rosen has detailed proofs. Please read page 515, THEOREM 1-4.

2/05/2014

Install a brand new Mac OS X

1. Download Mavericks from App Store.

2. Prepare your USB with at least 8G capable, format it as Mac OS Extended (Journaled).

3. After download, run this command in shell:
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction

4. Reboot your Mac and hold the option, then select your USB.


5. Format your Mac's disk and install.

And enjoy.

Reference:
http://www.techrepublic.com/blog/apple-in-the-enterprise/how-to-create-a-bootable-usb-to-install-os-x-mavericks/
http://forums.macrumors.com/showpost.php?p=18081307&postcount=3

Mac OS X Keyboard Shortcuts

It's awesome: http://mac.keyboard-shortcuts.eu/en/