msn-pecan pidgin的msn插件 期待离线消息功能

May 19th, 2008 | Posted in ubuntu   Add Comment

http://code.google.com/p/msn-pecan/

作者是pidgin的msnp主要开发者,说是pidgin忽视msnp的开发,所以独立出来作为一个插件。
目前已经支持了personal-message 离线消息放在了milestone-0.1.0 目前版本为0.0.12

try it!

有了xft后emacs的字体设置,解决新开frame还是老字体的问题

March 17th, 2008 | Posted in Emacs   Add Comment

有了xft以后emacs的字体设置现在已经可以简单到不能简单了,而且很漂亮,真的很养眼。
其实这个设置也没什么特别的,主要是今天在emacs@newsmth上看到有人问新开frame仍然使用的是老字体的问题,想起自己当初因为这个琢磨了很久emacs的font是怎么搞的,所以应该还是有必要发出来共享一下的


(progn
(set-default-font "courier 10 pitch-12")
(set-fontset-font "fontset-default" 'han '("微软雅黑" . "unicode-bmp"))
(add-to-list 'default-frame-alist '(font . "courier 10 pitch-12")))

progn那个可以去掉的,我当初是为了测试方便能够一起eval三句用的
我不会创建fontset,所以先set-default-font来设置默认字体,这个会自动创建一个fontset
然后修改这个fontset来增加中文显示字体
最后把这个fontset加到default-frame-alist,因为新开的frame会从default-frame-alist里继承,也就继承了字体的设置

swiftfox, 让你的firefox不再慢如牛

September 5th, 2007 | Posted in GNU/Linux, ubuntu   Add Comment

其实牛挺好的 呵呵

昨天和委员交流linux使用心得,一致对linux下firefox那个慢是深恶痛绝,回来以后就开始找找看有没有解决办法,因为我们一致认为,linux最大的好处就是没有解决不了的问题。

于是,就找到了swiftfox

http://getswiftfox.com 是官方站 目前是2.0.0.6和2.0.0.7pre 可以上去下载

debian系的可以这样做 在sources.list里添加一条
deb http://getswiftfox.com/builds/debian unstable non-free
然后根据你的cpu类型安装swiftfox-xxx 比如我是pentium-m我就装swiftfox-pentium-m

唯一遗憾就是没有源码 不知道是怎么样优化的

优化后的最直接的效果就是访问msn space不再是100%cpu卡上数秒了~~

GNU screen

July 10th, 2007 | Posted in ubuntu   Add Comment

一直以来都是term term term,N个term,刚看到screen的时候觉得多此一举,反正已经是term*N很容易的,都配成sawfish的快捷键了……
这儿有个how to start screen from .bashrc不过偶不喜欢,因为这样只能启动一个terminal,每次都会接管上一个screen。
于是配成了另一个sawfish的快捷键,目前我的快捷键如下:
Win+e 启动emacs或跳转到已启动的emacs
Win+t 启动thunderbird或跳转到已启动的thunderbird
Win+m 启动mlterm
Win+z 启动一个mlterm,在里头执行screen
Win+p 启动python解释器
Win+x 启动rox
Print 抓屏
Alt+Print 抓窗口

配置文件里这样写:
Read the rest of this entry »

Ubuntu Gutsy

July 6th, 2007 | Posted in ubuntu   Add Comment

呃,升级了之后一直报错,device-manager dm-linear device lookup error.
据说是内核需要patch,ubuntu的bug list里有,所以等等吧,幸亏2.6.20的内核还在,用这个启动就行了,hoho
顺便要说的是,之前的dual head双显不行了,在recovery模式下X -configure重写了下xorg.conf,当然,最好是dpkg-reconfigure xserver-xorg
双显啊双显,啥时候才能用的很爽呢……

好吧,接着写,关于i810的dual head

June 21st, 2007 | Posted in ubuntu   Add Comment

之前写过,但是用的很不方便,在/etc/X11/下放了两个xorg.conf 分别对应dual head和single head用脚本来切换
但是太麻烦了 得重启xwindow
于是把xinerama关了
但是问题就是sawfish只跑在主显示器上了
没法子 写了个脚本
DISPLAY=:0.1 sawfish &
这样就不用每次都切换xorg.conf了

不过 再一个麻烦事又来了……
窗口不能随便拖了~~~~

遭遇thunderbird丢失邮件

June 7th, 2007 | Posted in GNU/Linux   1 Comment

恩,写下来给其他人参考,如果也不幸遇到了的话,呵呵
找到你的邮件,比如Inbox 重命名为Inbox2
然后执行

sed '/^X-Mozilla-Status:/s/[0-9]*$/0000/' <Inbox2 >Inbox

重置了邮件的状态,所以最后一次compact this folder后删除的邮件也回来了……

vmware under feisty

March 25th, 2007 | Posted in ubuntu   1 Comment

vmware-workstation的内核模块在2.6.20下编译不过,可能有解决方案,不过网上有现成的更好的办法,就是改用vmware-server

到vmware下载vmware-server,解压开来装上,问你是否执行vmware-config.pl的时候选no

然后开始cheat。

apt-get install vmware-server-kernel-modules

这个是ubuntu源里面别人编译好的vmware-server的内核模块,能够保持和内核的一致
然后sed -i -e "s/\/sbin\/insmod -s -f \"\/lib\/modules\/\`uname -r\`\/misc\/\$1.o\"/\/sbin\/insmod -s -f \"\/lib\/modules\/\`uname -r\`\/vmware-server\/\$1.ko\"/" /etc/init.d/vmware

这里和原文不一样,改的是vmware启动脚本里面关于加载内核模块的地方,原文是改成了modprobe一下,但是我不知道啥时候insmod,所以我就改成了这个,源里面针对2.6.20编译的内核是以ko结尾,而且是放在vmware-server下

再然后sed -i -e "s/sub configure_module {/sub configure_module {\n return 'yes';/" /usr/bin/vmware-config.pl

这个是hack掉vmware-config.pl里面安装内核模块部分,vmware-server自带是没有2.6.20的,自己编译可能还有什么问题,所以用别人编译好的,这里直接return yes;最好

之后就全ok了, 跑一下vmware-config.pl吧

注:以上步骤都需要root权限

原文在http://www.ubuntuforums.org/showpost.php?p=2143833&postcount=14

Seems scim conflicts with Xorg or sawfish or emacs?

March 9th, 2007 | Posted in Emacs   1 Comment

I first found this problem when using ubuntu dapper & emacs 23.0.0.1.

Sometimes when speedbar is started in emacs, every key press in emacs does not effects unless next time I switched to emacs.

At first, I thought it was a little bug with emacs 23, so I did not take it serious.

But after upgrading to feisty & emacs 23.0.0.9, this happens more often. When created a new frame, either speedbar or C+X 5 2, key press frozen. And everything returns all right when all other frames are closed. And evem more, key press lags when switching windows! So I thought it maybe bug with xorg or sawfish!
So I asked in emacs@newsmth, and someone said it maybe problem between xim & emacs in reply. Then I disabled scim and now seems everything ok.

开始学写shell

January 27th, 2007 | Posted in GNU/Linux   Add Comment

磕磕碰碰的写完了一个预处理的脚本,很简单,用来对代码里面的#ifdef DEBUG … #else … #endif来做处理 如果脚本没带参数 就认为启用DEBUG 带参数就认为不启用DEBUG 弱的很 暴汗……

其实以前也写过shell脚本,简单的比如切换有线和无线,复杂的比如解决rar x的中文问题(不过新版本的rar貌似没这个问题了),但还是好多东东要学@.@ 还得在实践中一点一点的被lisp给侵蚀着 呵呵
Read the rest of this entry »

ubuntu下用vpnc连入cisco vpn

January 6th, 2007 | Posted in ubuntu   3 Comments

之前转载过一个cisco的vpnclient的帖子,是要自己编译安装的,所以一直没空尝试

昨天还是前天来着突然想到ubuntu源里面应该已经有现成的vpnclient了吧,找了找果然有个vpnc。
于是刚刚看着vpnc的long-help试了试就搞定了

首先需要的是windows下有个配好的cisco vpn client,或者你有group的密码
windows下vpn client下profiles里面是相应的配置文件
/etc/vpnc.conf文件里面照着现有相应的pcf文件写就行了

IPSec gateway [ Host in .pcf ]
IPSec ID [ GroupName in .pcf ]
IPSec obfuscated secret [ enc_GroupPwd in .pcf ]
Xauth username [ your user name ]

如果直接有group密码 那么把IPSec obfuscated secret换成IPSec secret然后写上你的密码 或者直接sudo vpnc-connect然后输入ip,group name,group pwd,user name,user pwd连接也就ok了

DualHead ubuntu下实现I810显卡的笔记本双显

December 30th, 2006 | Posted in ubuntu   Add Comment

忍不住想双显,数次的失败之后终于搞定了

xorg.conf里面这样写 Read the rest of this entry »

Ubuntu下的DNS caching

December 13th, 2006 | Posted in ubuntu   3 Comments

我实在受不了了……

每个请求都要到dns server上解析一下,太影响效率了……

今天找了一下 原来非常简单 就是装一个dnsmasq 原文在这儿
然后把/etc/dnsmasq.conf里面把"listen-address=127.0.0.1"写上

再去/etc/dhcp3/dhclient.conf里头把“prepend domain-name-servers 127.0.0.1;”前面的注释去掉

再到/etc/resolv.conf里头在紧接着search后面加一行"nameserver 127.0.0.1

最后sudo /etc/init.d/dnsmasq restart一下 就ok了 Read the rest of this entry »

vpn under linux

December 8th, 2006 | Posted in GNU/Linux   1 Comment

不知道关不管用 先记下来再说

http://kor.cpmc.columbia.edu/vpn/linux-how-to.html

Read the rest of this entry »

xgl

October 9th, 2006 | Posted in GNU/Linux   3 Comments

我承认我土了,到现在才开始用xgl,说实话,真的很酷,不信,点下面连接或者点开comment看看那个flash……

http://www.youtube.com/watch?v=hhNWYtuW0fA

我是在用的xfce+compiz 回头补个安装手记上来顺便抓几张图:)

Thread-safety and POSIX.1

April 13th, 2006 | Posted in GNU/Linux   Add Comment

Thread-safe Versions of POSIX.1 and C-language Functions. From http://www.unix.org/whitepapers/reentrant.html

XML1.0 中文文档(第二版)

April 10th, 2006 | Posted in GNU/Linux   Add Comment

可扩展标记语言(XML)1.0(第二版) To be upgraded to third edition.

SQLite

February 7th, 2006 | Posted in GNU/Linux   Add Comment

SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine. Here are some features of SQLite from sqlite.org.

SQLite is a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine. Features include:
Transactions are atomic, consistent, isolated, and durable (ACID) even after system crashes and power failures.
Zero-configuration - no setup or administration needed.
Implements most of SQL92. (Features not supported)
A complete database is stored in a single disk file.
Database files can be freely shared between machines with different byte orders.
Supports databases up to 2 terabytes (241 bytes) in size.
Sizes of strings and BLOBs limited only by available memory.
Small code footprint: less than 250KiB fully configured or less than 150KiB with optional features omitted.
Faster than popular client/server database engines for most common operations.
Simple, easy to use API.
TCL bindings included. Bindings for many other languages available separately.
Well-commented source code with over 95% test coverage.
Self-contained: no external dependencies.
Sources are in the public domain. Use for any purpose.

正则迷雾,各种工具之正则表达式语法比较

February 7th, 2006 | Posted in GNU/Linux   Add Comment

在网上看到的,虽然是04年的貌似,也么的elisp里面的,不过grep、sed、awk是很有用的说。原文为:
在各种常用的工具中,
正则表达式如此的相似却又不同。
下表列出了一些常用的正则表达式,以及其不同之处。
项目总多,遗漏必有不少,请各位看官不吝指出。
以perl的正则为基准,不同的用法以粉红色标出。
(xhchen8018@yahoo.com.cn)

http://blog.csdn.net/xeroo/archive/2006/02/07/593755.aspx

Ragular expressions.

January 5th, 2006 | Posted in GNU/Linux   Add Comment

Emacs Lisp Reference Manual里面34.2是关于正则表达式的
有兴趣可以去看看,地址如下
http://www.gnu.org/software/emacs/elisp-manual/html_mono/elisp.html#SEC565