<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Lost HIT - Zealot&#039;s Blog &#187; Blog历程</title>
	<atom:link href="http://blog.losthit.com/archives/category/%e6%9d%82%e4%b8%83%e6%9d%82%e5%85%ab/blog%e5%8e%86%e7%a8%8b/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.losthit.com</link>
	<description>关注 linux/c/c++/python/web开发,互联网数据抓取与挖掘</description>
	<lastBuildDate>Tue, 31 Jan 2012 09:27:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Blog大事记</title>
		<link>http://blog.losthit.com/archives/sitelog/</link>
		<comments>http://blog.losthit.com/archives/sitelog/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 17:43:50 +0000</pubDate>
		<dc:creator>Zealot</dc:creator>
				<category><![CDATA[Blog历程]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[sitelog]]></category>

		<guid isPermaLink="false">http://blog.losthit.com/?p=259</guid>
		<description><![CDATA[随手记备忘录是个好习惯，呵呵。 2010年1月，Blog迁移到Linode VPS上，彻底解决了古董机的mysql、apache、ip不稳定的问题：Blog使用美帝VPS：Linode服务介绍。 2009年8月15日，水木上淘到一个p3 CPU的古... ]]></description>
			<content:encoded><![CDATA[<p>随手记备忘录是个好习惯，呵呵。</p>
<ul>
<li>2010年1月，Blog迁移到Linode VPS上，彻底解决了古董机的mysql、apache、ip不稳定的问题：<a href="http://blog.losthit.com/archives/linode-vps/" target="_blank">Blog使用美帝VPS：Linode服务介绍</a>。</li>
<li>2009年8月15日，水木上淘到一个p3 CPU的古董机，100大洋(RMB)，并开始运行Blog</li>
<p>程序，ADSL环境。该古董配置：GenuineIntel Pentium III (Katmai) 501.159MHz/3个内存条共386M/8G硬盘。系统是Debian etch，linux 2.6.28。运行Blog服务使用的是apache2/php5/mysql5/wordpress2.8。</p>
<li>2006年3月，开始写Blog，貌似是在hitidea.org上: zealot.hitidea.org。该博客服务由Berg童鞋提供，并友情支持了域名绑定。</li>
</ul>
<p>&#8211;<br />
此文不间断更新中……</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.losthit.com/archives/sitelog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blog使用美帝VPS：Linode服务介绍</title>
		<link>http://blog.losthit.com/archives/linode-vps/</link>
		<comments>http://blog.losthit.com/archives/linode-vps/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 17:03:55 +0000</pubDate>
		<dc:creator>Zealot</dc:creator>
				<category><![CDATA[Blog历程]]></category>
		<category><![CDATA[杂七杂八]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[linode]]></category>
		<category><![CDATA[sitelog]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://blog.losthit.com/?p=243</guid>
		<description><![CDATA[写在前面：首先强调，这不是话题广告。刚换掉了古董机，算是鸟枪换大炮吧，总结后庆祝一下。 突然购买Linode.com服务，直接原因是一时头脑发热。根本原因是ADSL里放Blog太不靠谱了，ip经常... ]]></description>
			<content:encoded><![CDATA[<p><em>写在前面</em>：首先强调，<strong>这不是话题广告</strong>。刚换掉了古董机，算是鸟枪换大炮吧，总结后庆祝一下。
</p>
<div id="attachment_248" class="wp-caption alignnone" style="width: 298px"><a href="http://blog.losthit.com/wp-content/uploads/2010/01/linode_logo_gray.png"><img class="size-full wp-image-248" title="linode_logo_gray" src="http://blog.losthit.com/wp-content/uploads/2010/01/linode_logo_gray.png" alt="linode.com logo" width="288" height="65" /></a><p class="wp-caption-text">linode.com logo</p></div>
<p>
突然购买<a href="http://www.linode.com/?r=2e236898b83cd7963f1cb6136e7b00cb9f13d1d8" target="_blank">Linode.com</a>服务，直接原因是一时头脑发热。根本原因是ADSL里放Blog太不靠谱了，ip经常更换，因此，需要时不时的更新DNS解析（DNS重新解析不会立即生效，慢则需要好几个小时）。观察了一周，服务、速度、稳定性都非常不错。
</p>
<p>
换用Linode后Google Analytics中的change项终于变绿了：</p>
<div id="attachment_250" class="wp-caption alignnone" style="width: 395px"><a href="http://blog.losthit.com/wp-content/uploads/2010/01/Blog-rate-in-Google-Analytics.png"><img class="size-full wp-image-250" title="Blog rate in Google Analytics" src="http://blog.losthit.com/wp-content/uploads/2010/01/Blog-rate-in-Google-Analytics.png" alt="Blog rate in Google Analytics" width="385" height="79" /></a><p class="wp-caption-text">Blog rate in Google Analytics</p></div>
<p>
<strong>在家里ADSL环境下使用古董机就是这样浪费生命的</strong></p>
<ol>
<li>话说以前Blog是架在这样一台100大洋(RMB)的古董机上：GenuineIntel Pentium III (Katmai) 501.159MHz/3个内存条共386M/8G硬盘/Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+/VGA compatible controller: Matrox Graphics, Inc. MGA G400/G450。系统是Debian etch，linux 2.6.28。</li>
<li>运行Blog服务使用的是apache2/php5/mysql5/wordpress2.8，瓶颈在CPU上，一次请求apache占用CPU就超过60%。试探性使用nginx，这才发现需要配置factcgi，可耻地失败鸟。</li>
<li>Mysql平均每个月挂掉2次，好在每次mysql check/repair都顺利的修复了。即使没有mysql crash，备份也还是很必要的。第一次crash后我就加了简单的自动备份脚本，每天凌晨自动备份，最多保留9份拷贝。</li>
<li>由于家里上网时ADSL，ip时常被更换，所以得记录ip，方便随时随地远程访问。在Google App Engine上起个服务记录访问ip，过滤掉公司的ip。家里的台式机上每隔一分钟访问一下这个ip。每次ip变换后就手动修改blog域名的dns解析。Dns解析开放api访问就好了。</li>
</ol>
<p>
鉴于上述种种不可饶恕的浪费时间行为，忍痛买了国外的vps。而且以后配置wordpress上twitter插件也很容易了。选Linode很偶然，上网看见<a href="http://twitter.com/Fenng" target="_blank">@Fenng</a>的Blog<a href="http://www.dbanotes.net/sitelog/linode_vps.html" target="_blank">使用这个</a>，应该不会太烂，价格也可以接受。这里也有一个推荐，介绍也很详细：<a href="http://www.blogkid.net/linode" target="_blank">http://www.blogkid.net/linode</a>。
</p>
<p>
注册Linode非常简单，特别注意的是<strong>亚洲访问速度较快的data center是旧金山的Fremont </strong>，不要选错了。不过即使错了，也不用担心，我就选错了。在support页面咨询了一下客服，一顿饭功夫人家就帮忙换了个data center，自己只需要按照说明点三个按钮：关机、迁移、重启。
</p>
<p>
Blog迁移异常顺利，不到1小时完成了所有工作。系统选用Debian 5.0，候选系统也超多。LAMP安装工具使用apt，参考这里：“<a href="http://www.howtoforge.com/ubuntu_debian_lamp_server" target="_blank">How To Set Up A Ubuntu/Debian LAMP Server</a>”。
</p>
<p>
使用国外vps，最大好处是配置twiter插件，搭建某推的api都非常容易。以前用自己的台式机时，每次都想方设法修改代码，强制使用tor代理，而且速度贼慢。
</p>
<p>
现在空间、带宽冗余很多，有空整点好玩的东西，呵呵。<br />
<strong> AD</strong>：需要注册的话，可以点这个推广的refer链接：<a href="http://www.linode.com/?r=2e236898b83cd7963f1cb6136e7b00cb9f13d1d8" target="_blank">http://www.linode.com/?r=2e236898b83cd7963f1cb6136e7b00cb9f13d1d8</a>，按照说明应该会给我返利。
</p>
<p>
Btw：最后跑题说另一个使用虚拟化服务的case，twitter架构中考虑突发事件带来的访问洪峰问题时，购买了云计算服务。好处是避免了自行购买的设备长期闲置，导致浪费。Linode同样可以按需购买相应服务，升降级都很方便。
</p>
<p>
补充：使用的Linode 360配置如下</p>
<ul>
<li>RAM: 360MB</li>
<li>Storage: 16GB</li>
<li>Transfer: 220GB</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.losthit.com/archives/linode-vps/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Blog改用微软雅黑字体</title>
		<link>http://blog.losthit.com/archives/ms-yahei-blog-font/</link>
		<comments>http://blog.losthit.com/archives/ms-yahei-blog-font/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 11:59:29 +0000</pubDate>
		<dc:creator>Zealot</dc:creator>
				<category><![CDATA[Blog历程]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[字体]]></category>
		<category><![CDATA[雅黑]]></category>

		<guid isPermaLink="false">http://blog.losthit.com/?p=204</guid>
		<description><![CDATA[一般网站都不会特意设置花哨的字体，但是个人Blog使用自己喜欢的字体还是没问题的。微软雅黑确实比较好看，最近也看到不少Blog使用了该字体，跟风一下，修改了style.css。顺便把字体稍微调... ]]></description>
			<content:encoded><![CDATA[<p>一般网站都不会特意设置花哨的字体，但是个人Blog使用自己喜欢的字体还是没问题的。微软雅黑确实比较好看，最近也看到不少Blog使用了该字体，跟风一下，修改了style.css。顺便把字体稍微调大了一点，一直觉得字有点小，总算是改过来了：<br />
<code><br />
23     font-size:14px;<br />
24     font-family: 'Microsoft Yahei', Verdana, Arial,"BitStream vera Sans",Tahoma,Helvetica, Sans-Serif;<br />
</code><code><br />
27     line-height: 160%;<br />
</code><br />
修改后的效果</p>
<div id="attachment_207" class="wp-caption alignnone" style="width: 466px"><a href="http://blog.losthit.com/wp-content/uploads/2009/11/ms-yahei.jpg"><img class="size-full wp-image-207" title="Blog使用微软雅黑字体的效果" src="http://blog.losthit.com/wp-content/uploads/2009/11/ms-yahei.jpg" alt="Blog使用微软雅黑字体的效果" width="456" height="288" /></a><p class="wp-caption-text">Blog使用微软雅黑字体的效果</p></div>
]]></content:encoded>
			<wfw:commentRss>http://blog.losthit.com/archives/ms-yahei-blog-font/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>wordpress不显示分类列表title的bug</title>
		<link>http://blog.losthit.com/archives/wp_list_categories-bug/</link>
		<comments>http://blog.losthit.com/archives/wp_list_categories-bug/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 14:41:09 +0000</pubDate>
		<dc:creator>Zealot</dc:creator>
				<category><![CDATA[Blog历程]]></category>
		<category><![CDATA[杂七杂八]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp_list_categories]]></category>

		<guid isPermaLink="false">http://blog.losthit.com/?p=176</guid>
		<description><![CDATA[刚才把菜单栏清理了一下，就剩下about页面。于是把inove的分类列表提到menu栏，右边的sidebar也缩短了不少。 但是立马出现了一个新问题，菜单中鼠标移过去会有title信息遮住二级菜单，按照文... ]]></description>
			<content:encoded><![CDATA[<p>刚才把菜单栏清理了一下，就剩下about页面。于是把inove的分类列表提到menu栏，右边的sidebar也缩短了不少。<br />
但是立马出现了一个新问题，菜单中鼠标移过去会有title信息遮住二级菜单，按照文档说明修改后却没有生效，如图：<br />
<div id="attachment_175" class="wp-caption alignnone" style="width: 521px"><a href="http://blog.losthit.com/wp-content/uploads/2009/10/has-category-title.jpg"><img src="http://blog.losthit.com/wp-content/uploads/2009/10/has-category-title.jpg" alt="has category title" title="has category  title" width="511" height="221" class="size-full wp-image-175" /></a><p class="wp-caption-text">has category title</p></div><br />
首先，查了一下wp_list_categories函数的用法：<a href="http://codex.wordpress.org/Template_Tags/wp_list_categories">http://codex.wordpress.org/Template_Tags/wp_list_categories</a>，按照文档里描述的，把use_desc_for_title参数设置为0就行：<br />
<code>wp_list_categories('title_li=0&#038;orderby=name&#038;show_count=0&#038;use_desc_for_title=1');</code></p>
<blockquote><p>use_desc_for_title<br />
(boolean) Sets whether a category&#8217;s description is inserted into the title attribute of the links created (i.e. &lt;a title=”&lt;em&gt;Category Description&lt;/em&gt;” href=”&#8230;). The default is true (category descriptions will be inserted). Valid values:<br />
1 (True) &#8211; Default<br />
0 (False)
</p></blockquote>
<p>查看wp-includes/classes.php中wp_list_categories函数定义才发现有bug：<br />
<code><br />
  1331                  if ( $use_desc_for_title == 0 || empty($category->description) )<br />
  1332                          $link .= 'title="' . sprintf(__( 'View all posts filed under %s' ), $cat_name) . '"';<br />
  1333                  else<br />
  1334                          $link .= 'title="' . esc_attr( strip_tags( apply_filters( 'category_description',<br />
$category->description, $category ) ) ) . '"';<br />
</code><br />
很显然，不管use_desc_for_title参数是0还是1都会显示title信息，无语了，稍微改动一下：<br />
<code><br />
  1331                  if ( $use_desc_for_title == 1 &#038;&#038; empty($category->description) )<br />
  1332                          $link .= 'title="' . sprintf(__( 'View all posts filed under %s' ), $cat_name) . '"';<br />
  1333                  else if($use_desc_for_title == 1 &#038;&#038; !empty($category->description))<br />
  1334                          $link .= 'title="' . esc_attr( strip_tags( apply_filters( 'category_description', $category->description, $category ) ) ) . '"';<br />
</code><br />
总算隐藏掉了分类列表的title信息了，如图<br />
<div id="attachment_181" class="wp-caption alignnone" style="width: 531px"><a href="http://blog.losthit.com/wp-content/uploads/2009/10/no-category-title.jpg"><img src="http://blog.losthit.com/wp-content/uploads/2009/10/no-category-title.jpg" alt="no category title" title="no category title" width="521" height="217" class="size-full wp-image-181" /></a><p class="wp-caption-text">no category title</p></div></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.losthit.com/archives/wp_list_categories-bug/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>百度搜索结果页UTF-8字符显示乱码的Bug</title>
		<link>http://blog.losthit.com/archives/baidu-encoding-bug/</link>
		<comments>http://blog.losthit.com/archives/baidu-encoding-bug/#comments</comments>
		<pubDate>Wed, 07 Oct 2009 09:54:19 +0000</pubDate>
		<dc:creator>Zealot</dc:creator>
				<category><![CDATA[Blog历程]]></category>
		<category><![CDATA[杂七杂八]]></category>
		<category><![CDATA[baidu]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[encoding]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[hitidea]]></category>
		<category><![CDATA[losthit]]></category>
		<category><![CDATA[zealot]]></category>

		<guid isPermaLink="false">http://blog.losthit.com/?p=107</guid>
		<description><![CDATA[搜索”site:zealot.hitidea.org”时出现的。（http://blog.losthit.com还没被收录，不然就直接搜“site:losthit.com”了-_-&#124;&#124;&#124;） 而Google正确处理了这个UTF8编码，如图所示 对比图 不过上述对比不严... ]]></description>
			<content:encoded><![CDATA[<p>搜索”site:zealot.hitidea.org”时出现的。（<a title="Lost HIT - Zealot's Blog" href="http://blog.losthit.com" target="_self">http://blog.losthit.com</a>还没被收录，不然就直接搜“site:<a title="Lost HIT - Zealot's Blog" href="http://www.losthit.com" target="_self">losthit.com</a>”了-_-|||）</p>
<div id="attachment_109" class="wp-caption aligncenter" style="width: 585px"><a href="http://blog.losthit.com/wp-content/uploads/2009/10/baidu.jpg"><img class="size-full wp-image-109" title="baidu搜索结果也url乱码" src="http://blog.losthit.com/wp-content/uploads/2009/10/baidu.jpg" alt="baidu搜索结果也url乱码，UTF8没处理" width="575" height="571" /></a><p class="wp-caption-text">baidu搜索结果也url乱码，UTF8没处理</p></div>
<p>而Google正确处理了这个UTF8编码，如图所示</p>
<div id="attachment_110" class="wp-caption aligncenter" style="width: 734px"><a href="http://blog.losthit.com/wp-content/uploads/2009/10/sitezealot.hitidea.org-Google-.jpg"><img class="size-full wp-image-110" title="Google的URL没有问题" src="http://blog.losthit.com/wp-content/uploads/2009/10/sitezealot.hitidea.org-Google-.jpg" alt="Google的URL没有问题" width="724" height="583" /></a><p class="wp-caption-text">Google的URL没有问题</p></div>
<p>对比图</p>
<div id="attachment_111" class="wp-caption aligncenter" style="width: 310px"><a href="http://blog.losthit.com/wp-content/uploads/2009/10/bg1.png"><img class="size-medium wp-image-111" title="对比图" src="http://blog.losthit.com/wp-content/uploads/2009/10/bg1-300x148.png" alt="对比图" width="300" height="148" /></a><p class="wp-caption-text">对比图</p></div>
<p>不过上述对比不严谨，<a title="Lost in HIT - Zealot's Blog" href="http://zealot.hitidea.org" target="_blank">http://zealot.hitidea.org</a>是UTF-8编码，Baidu页面是gb2312编码，而Google页面恰好是UTF-8编码的。一时找不着gbk编码的网站url，只好这样了。不过无论如何，显示乱码是难以容忍的。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.losthit.com/archives/baidu-encoding-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>第一篇日志</title>
		<link>http://blog.losthit.com/archives/first_log_losthit/</link>
		<comments>http://blog.losthit.com/archives/first_log_losthit/#comments</comments>
		<pubDate>Sun, 22 May 2005 06:33:52 +0000</pubDate>
		<dc:creator>Zealot</dc:creator>
				<category><![CDATA[Blog历程]]></category>
		<category><![CDATA[first]]></category>
		<category><![CDATA[四川]]></category>
		<category><![CDATA[地震]]></category>
		<category><![CDATA[第一篇]]></category>

		<guid isPermaLink="false">http://losthit.com/?p=4</guid>
		<description><![CDATA[不知道写啥：（ bless一下四川地震受灾同胞吧。。... ]]></description>
			<content:encoded><![CDATA[<p>不知道写啥：（</p>
<p>bless一下四川地震受灾同胞吧。。。</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.losthit.com/archives/first_log_losthit/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

