2008年10月23日星期四

再设hosts

不知道为什么,以前设的 hosts 不好使了:
72.14.219.190 xxx.blogspot.com
别人的不设也能访问,就是访问不了自己的,难道我人品有问题。

nslookup xxx.blogspot.com

Server: gjjline.bta.net.cn
Address: 202.106.0.20

Non-authoritative answer:
Name: blogspot.l.google.com
Address: 209.85.175.191
Aliases: xxx.blogspot.com


把得到的 IP 再设置到 hosts 里:
209.85.175.191 xxx.blogspot.com
又可以访问了

How To Generate Local RDocs

最近 http://www.ruby-doc.org/core/ 无法访问了,而 ri 用起来始终不习惯。偶然看到了个生成 Local RDocs 的方法。

http://www.mindsifter.com/2008/1/8/generate-local-ruby-core-rdocs
http://weblog.jamisbuck.org/2005/4/8/rdoc-template

Download the template here
To use it, copy it into the “rdoc/generators/template/html” directory of your Ruby installation.
Then:

rdoc --template=jamis --op <some output dir>


可能由于我机器上 rubygem 版本的原因,这个模板用不了,不过可以用自带的模板

rdoc --template=html --op <some output dir>


注:执行这个命令时,要先转到 ruby 源代码的目录,默认是生成该目录下所有文件的 rdoc。
也可以指定文件:

rdoc --template=html --op <some output dir> array.c