Enable Font Smoothing for Mac OS X

OK, Mac OS X looks good enough for me… but wait…

When I change to some kind of external display such as my Dell U2410, the font smoothing of terminal fonts went disappeared! WTF…

I’ve check the font smoothing settings in the ‘perference => general’, it’s been checked. So I googled for a workaround. Here it is.

defaults -currentHost write -globalDomain AppleFontSmoothing 2

The number 2 means always enable font smoothing here. So that’s it!

My terminal’s looking good once again :)

font smoothing comparing before and after enable

trac升级后注册时遇到的报错解决

前阵子公司里的一台办公室server升级,迁移重启后trac启不来了,不停报错。当时电话通知我解决,想也没想直接pip uninstall && pip install trac了一下。没注意老的版本升级成0.12.2了。
在数据库以外的问题,就是注册时总是提示。

AttributeError: 'AccountChangeNotification' object has no attribute 'smtp_server'

在mod_python的httpd下error_log竟然看不到错误。动手把trac.ini配置里错误输出到指定文件后发现traceback大意是acct_mgr下notification.py的146行有报错。没有smtp_server属性。由于该行代码是trac自身记录日志用的,不影响使用。可以直接注释掉。
另外由于安装TracAccountManager时用的是蛇蛋,所以需要把notification.pyc文件删除后重启httpd才能生效哦。

这个故事告诉我们。。在没法debug的情况下(大部分情况),traceback是很重要的。嗯嗯。