Archive for the ‘work’ Category

Spam comments

Posted in work with tags , , , .

Sep 1, 08

No reply

Until now, Akismet has blocked 846 spam comments for me. And until now, I have got only 12 normal comments from human being visitors!

My website gets a high pagerank. It was 4 about 2 months ago. But now drop back to 3. I don’t know but maybe they choose to spam on sites with high pagerank. Thanks for Akismet, there were only about 2 or 3 spam comments wasn’t blocked. So the spam links never get a link to promot there page rank.


May 9, 08

No reply

I installed a wordpress plugin which is written by a friend: Denis. It returns the related posts by tags.

I want to put it in sidebar. So I added a widget function for this plugin. Also the content filters were commented out so that it won’t borther to filter my post contents everytime since I don’t want to display them in post or feeds.

Although it works fine for me now, there are still some things to be improved:

  1. If the number of related posts does not reach to display limit, it should have option to fill with random or most commented posts.
  2. The title section really need to be moved out from the main code generate function.
  3. Take count of category. The posts in the same category are related.
  4. Denis submitted v0.6 to SVN trunk! I wander how he released v0.7 via SVN…

I will send Denis my patch tomorrow. Hopefully he will merge it into next release, and, fix the functions I wanted here.


Apache下配置sandbox

Posted in work with tags , , , .

May 8, 08

No reply

今天google了一下, 把长久以来很想做的一个apache VirtualHost配置搞定了.

基本功能是这样的: 在地址栏输入sandbox能访问我建在原来localhost下的document root/sandbox文件夹.

分开来,包括了两大部分: 将sandbox解析到本机(http request给Apache); 然后Apache根据server name返回内容.

解析sandbox

当你往浏览器地址栏里面输入http://sandbox/的时候, 浏览器会把sandbox作为一个域名, 查询与之相关联的IP. 浏览器首先去查看系统的host文件有没有列出这个域名. 如果有, 将直接返回host文件里的IP. 没有, 则要找网络连接里面配置的DNS服务器查询IP.

我要达到的目的让浏览器查询sandbox时返回本机IP 127.0.0.1, 最简单的办法就是修改host文件啦.

host文件在我的系统(Vista)的C:\Windows\System32\drivers\etc内. 用记事本打开, 在文件末端添加一行:

127.0.0.1    sandbox

这样浏览器就会将sandbox指向127.0.0.1.

配置Apache

浏览器把http请求顺利的转到了本机, 接下来应该是Apache忙活了. 为了让Apache找到sandbox对应的本地目录, 就需要配置一个VirtualHost.  我的配置是这样的:

NameVirtualHost 127.0.0.1:80
<VirtualHost 127.0.0.1:80>
DocumentRoot "F:/web"
ServerName localhost
</VirtualHost>

<VirtualHost 127.0.0.1:80>
DocumentRoot "F:/web/sandbox"
ServerName sandbox
</VirtualHost>

具体配置说明去看文档, 这里就不讲了. 上面配置的意思就是127.0.0.1下域名为localhost的内容在F:/web, 而sandbox内容在F:/web/sandbox.

到这里, 浏览器就能收到Apache的输出, 显示存在F:/web/sandbox下的内容了.

未解决的问题

host文件似乎不能用将域名绑定到一个端口上去. 比如我尝试下面的配置就失败了:

127.0.0.1:8000    jira

http://jira/不会连接到我的Tomcat上, 而是很”智能”地跑到jira.com去了-_-!!!也许这种问题需要其它的解决方案咯.


Apr 13, 08

3 replies

Since the web is waiting for the XHTML2 standard, we can notice that the trend of web page markup is heading to the pure XML direction. Though XHTML2 might need a long time to be published, we should be prepared. What shall we do now? Switching to XHTML1.1 now would be the best practice since:

  1. It’s pure XML, which is similar to XHTML2.
  2. It is supported by current common browsers.

Using XHTML1.1 will let you be familiar with pure XML, and makes it much easier to change to XHTML2 in the future.

I decided to switch to XHTML1.1 (from XHTML1.0 traditional) today. While cleaning up my web pages, I found some tips which might be helpful for web you developers:

Read the rest of this entry »


Many things, no time

Posted in work with tags .

Mar 22, 08

No reply

最近忙到没法抽时间写几篇blog, 的确有点夸张. 留个印记, 以便回头看看叹口气(可能或许maybe炫耀一下也难说).

日程上有一个issue是写一个JIRA的安装教程, 还有一些新鲜的东东, 比如M$和DELL搞的(product)RED, android下的bluetooth, HID, 还有一些新鲜的ideas, 崔健的Rock, 包括刚刚从taobao淘到的黑曜石手链和Diesel jeans… 太多太多

ADC剩下的时间不多了, 能用的idea才刚刚出来, 看来最近也不可能抽时间写blog了. 再过半个月, 又要忙工作的事了… 算来算去, 要熬到哪天才能安心的写篇blog呢? 唉, 50h/d的幻想又一次浮出脑门~~~