<?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>Samson&#039;s Weblog &#187; Minds</title>
	<atom:link href="http://blog.samsonis.me/category/minds/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.samsonis.me</link>
	<description>天与弗取，反受其咎；时至不行，反受其殃</description>
	<lastBuildDate>Sun, 29 Jan 2012 13:53:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>XXX != 3X</title>
		<link>http://blog.samsonis.me/2011/10/xxx-3x/</link>
		<comments>http://blog.samsonis.me/2011/10/xxx-3x/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 13:11:00 +0000</pubDate>
		<dc:creator>Samson Wu</dc:creator>
				<category><![CDATA[Minds]]></category>
		<category><![CDATA[Share]]></category>

		<guid isPermaLink="false">http://blog.samsonis.me/?p=3515</guid>
		<description><![CDATA[我记得去年还是前年什么时候广电总局开始禁止媒体使用XXX等外语缩略词，但似乎这几年还是频繁听到CPI，GDP等不得不逃避的敏感词，要不是美职篮停摆，估计NBA还是到处可见。 当然本文不是来讨论这个的…… 本文只是为了列举加收集本人没事断章取义望文生义出来的缩略词另解 i，并且会持续更新。 VPN = Very Poor Network SSD = Super Stupid Disk NBA = National BadAss SSO = Super Stupid Opinion TBD …… [Footnotes]皆原创 Related posts 说谎 (0) 节选两段奥巴马2011国情咨文 (0) 狮子座 (16) 未成年先别優 (1) 推荐一个reader app和一个Greasemonkey脚本 (2)]]></description>
			<content:encoded><![CDATA[<p>我记得去年还是前年什么时候广电总局开始禁止媒体使用XXX等外语缩略词，但似乎这几年还是频繁听到CPI，GDP等不得不逃避的敏感词，要不是美职篮停摆，估计NBA还是到处可见。</p>
<p>当然本文不是来讨论这个的……</p>
<p>本文只是为了列举加收集本人没事断章取义望文生义出来的缩略词另解 <sup><a href="http://blog.samsonis.me/2011/10/xxx-3x/#footnote_0_3515" id="identifier_0_3515" class="footnote-link footnote-identifier-link" title="皆原创">i</a></sup>，并且会持续更新。</p>
<p>VPN = <span style="color: #A0410D;">V</span>ery <span style="color: #A0410D;">P</span>oor <span style="color: #A0410D;">N</span>etwork<br />
SSD = <span style="color: #A0410D;">S</span>uper <span style="color: #A0410D;">S</span>tupid <span style="color: #A0410D;">D</span>isk<br />
NBA = <span style="color: #A0410D;">N</span>ational <span style="color: #A0410D;">B</span>ad<span style="color: #A0410D;">A</span>ss<br />
SSO = <span style="color: #A0410D;">S</span>uper <span style="color: #A0410D;">S</span>tupid <span style="color: #A0410D;">O</span>pinion</p>
<p>TBD ……</p>
[Footnotes]<ol class="footnotes"><li id="footnote_0_3515" class="footnote">皆原创</li></ol>
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.samsonis.me/2010/08/%e8%af%b4%e8%b0%8e/" title="说谎 (August 9, 2010)">说谎</a> (0)</li>
	<li><a href="http://blog.samsonis.me/2011/01/%e8%8a%82%e9%80%89%e4%b8%a4%e6%ae%b5%e5%a5%a5%e5%b7%b4%e9%a9%ac2011%e5%9b%bd%e6%83%85%e5%92%a8%e6%96%87/" title="节选两段奥巴马2011国情咨文 (January 26, 2011)">节选两段奥巴马2011国情咨文</a> (0)</li>
	<li><a href="http://blog.samsonis.me/2010/07/%e7%8b%ae%e5%ad%90%e5%ba%a7/" title="狮子座 (July 31, 2010)">狮子座</a> (16)</li>
	<li><a href="http://blog.samsonis.me/2010/02/%e6%9c%aa%e6%88%90%e5%b9%b4%e5%85%88%e5%88%ab%e5%84%aa/" title="未成年先别優 (February 23, 2010)">未成年先别優</a> (1)</li>
	<li><a href="http://blog.samsonis.me/2011/01/%e6%8e%a8%e8%8d%90%e4%b8%80%e4%b8%aareader-app%e5%92%8c%e4%b8%80%e4%b8%aagreasemonkey%e8%84%9a%e6%9c%ac/" title="推荐一个reader app和一个Greasemonkey脚本 (January 26, 2011)">推荐一个reader app和一个Greasemonkey脚本</a> (2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.samsonis.me/2011/10/xxx-3x/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>微日记计划</title>
		<link>http://blog.samsonis.me/2011/07/%e5%be%ae%e6%97%a5%e8%ae%b0%e8%ae%a1%e5%88%92/</link>
		<comments>http://blog.samsonis.me/2011/07/%e5%be%ae%e6%97%a5%e8%ae%b0%e8%ae%a1%e5%88%92/#comments</comments>
		<pubDate>Mon, 18 Jul 2011 05:21:15 +0000</pubDate>
		<dc:creator>Samson Wu</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Minds]]></category>
		<category><![CDATA[Share]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://blog.samsonis.me/?p=3275</guid>
		<description><![CDATA[凡事预则立，不预则废；这不是阿波罗计划 i，但这并不意味着咱不需要计划; 先引用 idea来源 来定义一下微日记（我只负责回溯一层，btw）： 每天用一个词形容自己当天的生活，就是微日记 现在已经有了 html 和 txt 两种版本，有通过CMS自带的editor编辑的（猜的），有SSH直接上去修改的，这两种solution都doable，但站在巨人的肩膀上面之后，我突然觉得不做任何修改创新的照搬照抄似乎是索然无味的; 于是一个月黑风高的夜晚 (实际上是白天，好吧。。我理屈词穷了。。)，我祭出了一个super super overkill的solution，include了我所能include的所有能有点relevant的buzzword： html5 (so this is not txt at least&#8230;) node.js (instead of ruby on rails, we will use node.js, although there&#8217;s only one page and there&#8217;s almost no logic at all&#8230; or how can we call this overkill?) coffeescript (this comes ...]]></description>
			<content:encoded><![CDATA[<p>凡事预则立，不预则废；这不是阿波罗计划 <sup><a href="http://blog.samsonis.me/2011/07/%e5%be%ae%e6%97%a5%e8%ae%b0%e8%ae%a1%e5%88%92/#footnote_0_3275" id="identifier_0_3275" class="footnote-link footnote-identifier-link" title="Apollo program，当然也还不知道真的假的">i</a></sup>，但这并不意味着咱不需要计划;</p>
<p>先引用 <a href="http://dddspace.com/2011/07/microlog.html" title="微日记" target="_blank">idea来源</a> 来定义一下微日记（我只负责回溯一层，btw）：</p>
<blockquote><p>每天用一个词形容自己当天的生活，就是微日记</p></blockquote>
<p>现在已经有了 <a href="http://www.matrix67.com/keywords.html" target="_blank">html</a> 和 <a href="http://dddspace.com/microlog" target="_blank">txt</a> 两种版本，有通过CMS自带的editor编辑的（猜的），有SSH直接上去修改的，这两种solution都doable，但站在巨人的肩膀上面之后，我突然觉得不做任何修改创新的照搬照抄似乎是索然无味的;</p>
<p>于是一个月黑风高的夜晚 (实际上是白天，好吧。。我理屈词穷了。。)，我祭出了一个super super overkill的solution，include了我所能include的所有能有点relevant的buzzword：</p>
<ul>
<li> html5 (so this is not txt at least&#8230;)</li>
<li> node.js (instead of ruby on rails, we will use node.js, although there&#8217;s only one page and there&#8217;s almost no logic at all&#8230; or how can we call this overkill?)</li>
<li> coffeescript (this comes along with node.js above, we will use js to take care of the editing part instead of CMS editor or SSH)</li>
<li> nosql (MongoDB or Redis for &#8220;persistent&#8221; storage)</li>
<li> cloud foundry (if possible, I will deploy it on <a href="http://www.cloudfoundry.com/" title="Cloud Foundry" target="_blank">cloudfoundry</a>)</li>
</ul>
<p>For the record, this is just a just-for-fun project to demonstrate how I can make simple things complicated&#8230;  The code will later be open sourced on <a href="https://github.com/samsonw/microlog" target="_blank">github</a> and deployed at log.samsonw.info or log.crash4.us, or samsonw.cloudfoundry.com <sup><a href="http://blog.samsonis.me/2011/07/%e5%be%ae%e6%97%a5%e8%ae%b0%e8%ae%a1%e5%88%92/#footnote_1_3275" id="identifier_1_3275" class="footnote-link footnote-identifier-link" title="depends on the deployment difficulty, it will probably be log.crash4.us or samsonw.cloudfoundry.com">ii</a></sup>.</p>
[Footnotes]<ol class="footnotes"><li id="footnote_0_3275" class="footnote"><a href="http://en.wikipedia.org/wiki/Apollo_program" title="Apollo program" target="_blank">Apollo program</a>，当然也还不知道真的假的</li><li id="footnote_1_3275" class="footnote">depends on the deployment difficulty, it will probably be log.crash4.us or samsonw.cloudfoundry.com</li></ol>
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.samsonis.me/2010/05/%e9%80%80%e6%ad%a5%e5%8e%9f%e6%9d%a5%e6%98%af%e5%90%91%e5%89%8d/" title="退步原来是向前 (May 22, 2010)">退步原来是向前</a> (0)</li>
	<li><a href="http://blog.samsonis.me/2010/06/%e6%ac%a2%e8%bf%8e%e6%8a%a5%e8%80%83%e5%9b%b4%e5%9f%8e/" title="欢迎报考围城 (June 7, 2010)">欢迎报考围城</a> (0)</li>
	<li><a href="http://blog.samsonis.me/2010/02/%e6%9c%aa%e6%88%90%e5%b9%b4%e5%85%88%e5%88%ab%e5%84%aa/" title="未成年先别優 (February 23, 2010)">未成年先别優</a> (1)</li>
	<li><a href="http://blog.samsonis.me/2010/01/%e5%a5%b6%e5%a5%b6%ef%bc%8c%e4%b8%80%e8%b7%af%e9%a1%ba%e9%a3%8e/" title="奶奶，一路顺风 (January 28, 2010)">奶奶，一路顺风</a> (3)</li>
	<li><a href="http://blog.samsonis.me/2011/09/%e5%a4%a9%e4%b8%8e%e5%bc%97%e5%8f%96-%e5%8f%8d%e5%8f%97%e5%85%b6%e5%92%8e/" title="天与弗取 反受其咎 (September 26, 2011)">天与弗取 反受其咎</a> (3)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.samsonis.me/2011/07/%e5%be%ae%e6%97%a5%e8%ae%b0%e8%ae%a1%e5%88%92/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Update 59: Unknown Unknowns</title>
		<link>http://blog.samsonis.me/2011/07/update-59-unknown-unknowns/</link>
		<comments>http://blog.samsonis.me/2011/07/update-59-unknown-unknowns/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 04:00:02 +0000</pubDate>
		<dc:creator>Samson Wu</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Minds]]></category>
		<category><![CDATA[Share]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://blog.samsonis.me/?p=3250</guid>
		<description><![CDATA[1. 离 上次update 已经将近两个月了，不是我不想update，只是我不想老是用“this update is intentionally left blank”来搪塞；update本来是件惬意舒心的事情，我从来不想将其搞的异常沉重； 2. 我现在开始相信 everything happens for a reason (当然以前也没有不相信，双重否定表示不是很肯定的肯定)；如果不希望发生的事情发生了那应该叫做destiny，犹如我们把不想做但不得不做的事情称之为responsibility，那destiny也许只不过是上帝给你的responsibility；当把事不遂人愿看成是常态的时候，事遂人愿时便会心存感激，人知足了，才会常乐；老是不乐，生活的意义又何在呢，健康的活着其实本来就是件快乐幸福的事情，只是人们不到自己生病的时候也许永远不会体会得到； 3. 看来如今想做或要做的事情一定得要记下来，前几天（应该有几周了…）有人发邮件告诉我一个OpenExplorer在最新版的eclipse里的一个bug，并附上了修改意见，我当初回邮件说马上fix，如今几周过去了，我竟然今天才又想起，看来以后要做的事情第一时间要note下来，不然早就忘到九霄云外了； 4. “认真”其实不是种态度，而是种能力；只是这种能力一直以来被人认为是态度问题而不是能力问题，至于认真究竟是态度还是能力其实并不重要，重要的是从现在起就应该培养抑或端正起这种能力或态度；上文中关于“能力”的结论i 我拜读后觉得很有道理，正犹如实践是检验真理的唯一标准一般，实践也许也是检验能力的唯一标准； 5. 最后摘录一段wikipedia上关于kown konwns和unknown unknowns的前美国国防部长的一段话最后点下题 ii, known的unknowns并不可怕，unknown的unknowns才是真正可怕的monster： There are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some ...]]></description>
			<content:encoded><![CDATA[<p>1. 离 <a href="http://blog.samsonis.me/2011/05/update-58-%E5%85%B6%E5%AE%9E%E6%88%91%E4%B8%8D%E5%96%9C%E6%AC%A2%E7%9A%B1%E7%9C%89/">上次update</a> 已经将近两个月了，不是我不想update，只是我不想老是用“this update is intentionally left blank”来搪塞；update本来是件惬意舒心的事情，我从来不想将其搞的异常沉重；</p>
<p>2. 我现在开始相信 everything happens for a reason (当然以前也没有不相信，双重否定表示不是很肯定的肯定)；如果不希望发生的事情发生了那应该叫做destiny，犹如我们把不想做但不得不做的事情称之为responsibility，那destiny也许只不过是上帝给你的responsibility；当把事不遂人愿看成是常态的时候，事遂人愿时便会心存感激，人知足了，才会常乐；老是不乐，生活的意义又何在呢，健康的活着其实本来就是件快乐幸福的事情，只是人们不到自己生病的时候也许永远不会体会得到；</p>
<p>3. 看来如今想做或要做的事情一定得要记下来，前几天（应该有几周了…）有人发邮件告诉我一个OpenExplorer在最新版的eclipse里的一个bug，并附上了修改意见，我当初回邮件说马上fix，如今几周过去了，我竟然今天才又想起，看来以后要做的事情第一时间要note下来，不然早就忘到九霄云外了；</p>
<p>4. <a href="http://www.luanxiang.org/blog/archives/1151.html" title="认真是一种能力" target="_blank">“认真”其实不是种态度，而是种能力</a>；只是这种能力一直以来被人认为是态度问题而不是能力问题，至于认真究竟是态度还是能力其实并不重要，重要的是从现在起就应该培养抑或端正起这种能力或态度；上文中关于“能力”的结论<sup><a href="http://blog.samsonis.me/2011/07/update-59-unknown-unknowns/#footnote_0_3250" id="identifier_0_3250" class="footnote-link footnote-identifier-link" title="&ldquo;只有当你能施展出来的时候，才真正具有这种能力，否则其实就是没有&rdquo;">i</a></sup> 我拜读后觉得很有道理，正犹如实践是检验真理的唯一标准一般，实践也许也是检验能力的唯一标准；</p>
<p>5. 最后摘录一段wikipedia上<a href="http://en.wikipedia.org/wiki/There_are_known_knowns" title="There_are_known_knowns" target="_blank">关于kown konwns和unknown unknowns</a>的前美国国防部长的一段话最后点下题 <sup><a href="http://blog.samsonis.me/2011/07/update-59-unknown-unknowns/#footnote_1_3250" id="identifier_1_3250" class="footnote-link footnote-identifier-link" title="不然有人又要说我天马行空了">ii</a></sup>, known的unknowns并不可怕，unknown的unknowns才是真正可怕的monster：</p>
<blockquote><p>There are known knowns; there are things we know we know.<br />
We also know there are known unknowns; that is to say we know there are some things we do not know.<br />
But there are also unknown unknowns – the ones we don&#8217;t know we don&#8217;t know.</p></blockquote>
[Footnotes]<ol class="footnotes"><li id="footnote_0_3250" class="footnote">“只有当你能施展出来的时候，才真正具有这种能力，否则其实就是没有”</li><li id="footnote_1_3250" class="footnote">不然有人又要说我天马行空了</li></ol>
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.samsonis.me/2010/05/%e9%80%80%e6%ad%a5%e5%8e%9f%e6%9d%a5%e6%98%af%e5%90%91%e5%89%8d/" title="退步原来是向前 (May 22, 2010)">退步原来是向前</a> (0)</li>
	<li><a href="http://blog.samsonis.me/2010/06/%e6%ac%a2%e8%bf%8e%e6%8a%a5%e8%80%83%e5%9b%b4%e5%9f%8e/" title="欢迎报考围城 (June 7, 2010)">欢迎报考围城</a> (0)</li>
	<li><a href="http://blog.samsonis.me/2010/02/%e6%9c%aa%e6%88%90%e5%b9%b4%e5%85%88%e5%88%ab%e5%84%aa/" title="未成年先别優 (February 23, 2010)">未成年先别優</a> (1)</li>
	<li><a href="http://blog.samsonis.me/2011/07/%e5%be%ae%e6%97%a5%e8%ae%b0%e8%ae%a1%e5%88%92/" title="微日记计划 (July 18, 2011)">微日记计划</a> (6)</li>
	<li><a href="http://blog.samsonis.me/2010/01/%e5%a5%b6%e5%a5%b6%ef%bc%8c%e4%b8%80%e8%b7%af%e9%a1%ba%e9%a3%8e/" title="奶奶，一路顺风 (January 28, 2010)">奶奶，一路顺风</a> (3)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.samsonis.me/2011/07/update-59-unknown-unknowns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Never hate your enemies</title>
		<link>http://blog.samsonis.me/2011/05/never-hate-your-enemies/</link>
		<comments>http://blog.samsonis.me/2011/05/never-hate-your-enemies/#comments</comments>
		<pubDate>Mon, 30 May 2011 02:37:25 +0000</pubDate>
		<dc:creator>Samson Wu</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Minds]]></category>
		<category><![CDATA[Share]]></category>

		<guid isPermaLink="false">http://blog.samsonis.me/?p=3103</guid>
		<description><![CDATA[godfather told us: Never hate your enemies. It affects your judgment. so instead, kill them by impression :) (via i) [Footnotes]not sure where it originally comes from. All right belong to their respective owner. Related posts 说谎 (0) 节选两段奥巴马2011国情咨文 (0) 狮子座 (16) 未成年先别優 (1) 推荐一个reader app和一个Greasemonkey脚本 (2)]]></description>
			<content:encoded><![CDATA[<p>godfather told us:</p>
<blockquote><p>Never hate your enemies.  It affects your judgment.</p></blockquote>
<p>so instead, kill them by impression :)</p>
<p><a href="http://blog.samsonis.me/wp-content/uploads/2011/05/sheldon.jpeg"><img src="http://blog.samsonis.me/wp-content/uploads/2011/05/sheldon-300x200.jpg" alt="" title="sheldon" width="300" height="200" class="alignnone size-medium wp-image-3104" /></a></p>
<p>(via <sup><a href="http://blog.samsonis.me/2011/05/never-hate-your-enemies/#footnote_0_3103" id="identifier_0_3103" class="footnote-link footnote-identifier-link" title="not sure where it originally comes from.  All right belong to their respective owner.">i</a></sup>)</p>
[Footnotes]<ol class="footnotes"><li id="footnote_0_3103" class="footnote">not sure where it originally comes from.  All right belong to their respective owner.</li></ol>
	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.samsonis.me/2010/08/%e8%af%b4%e8%b0%8e/" title="说谎 (August 9, 2010)">说谎</a> (0)</li>
	<li><a href="http://blog.samsonis.me/2011/01/%e8%8a%82%e9%80%89%e4%b8%a4%e6%ae%b5%e5%a5%a5%e5%b7%b4%e9%a9%ac2011%e5%9b%bd%e6%83%85%e5%92%a8%e6%96%87/" title="节选两段奥巴马2011国情咨文 (January 26, 2011)">节选两段奥巴马2011国情咨文</a> (0)</li>
	<li><a href="http://blog.samsonis.me/2010/07/%e7%8b%ae%e5%ad%90%e5%ba%a7/" title="狮子座 (July 31, 2010)">狮子座</a> (16)</li>
	<li><a href="http://blog.samsonis.me/2010/02/%e6%9c%aa%e6%88%90%e5%b9%b4%e5%85%88%e5%88%ab%e5%84%aa/" title="未成年先别優 (February 23, 2010)">未成年先别優</a> (1)</li>
	<li><a href="http://blog.samsonis.me/2011/01/%e6%8e%a8%e8%8d%90%e4%b8%80%e4%b8%aareader-app%e5%92%8c%e4%b8%80%e4%b8%aagreasemonkey%e8%84%9a%e6%9c%ac/" title="推荐一个reader app和一个Greasemonkey脚本 (January 26, 2011)">推荐一个reader app和一个Greasemonkey脚本</a> (2)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.samsonis.me/2011/05/never-hate-your-enemies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>欢迎报考围城</title>
		<link>http://blog.samsonis.me/2010/06/%e6%ac%a2%e8%bf%8e%e6%8a%a5%e8%80%83%e5%9b%b4%e5%9f%8e/</link>
		<comments>http://blog.samsonis.me/2010/06/%e6%ac%a2%e8%bf%8e%e6%8a%a5%e8%80%83%e5%9b%b4%e5%9f%8e/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 18:33:05 +0000</pubDate>
		<dc:creator>Samson Wu</dc:creator>
				<category><![CDATA[Minds]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://blog.samsonis.me/?p=1906</guid>
		<description><![CDATA[又是一年高考时，推荐阅读CB高考祝福帖。 另祝广大考生能在这个大陆上面为数不多的相对公平的竞争中突围成功，顺利进城。 Related posts 退步原来是向前 (0) 未成年先别優 (1) 微日记计划 (6) 奶奶，一路顺风 (3) 天与弗取 反受其咎 (3)]]></description>
			<content:encoded><![CDATA[<p>又是一年高考时，推荐阅读<a href="http://www.cnbeta.com/articles/113092.htm">CB高考祝福帖</a>。</p>
<p>另祝广大考生能在这个大陆上面为数不多的相对公平的竞争中突围成功，顺利进城。</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.samsonis.me/2010/05/%e9%80%80%e6%ad%a5%e5%8e%9f%e6%9d%a5%e6%98%af%e5%90%91%e5%89%8d/" title="退步原来是向前 (May 22, 2010)">退步原来是向前</a> (0)</li>
	<li><a href="http://blog.samsonis.me/2010/02/%e6%9c%aa%e6%88%90%e5%b9%b4%e5%85%88%e5%88%ab%e5%84%aa/" title="未成年先别優 (February 23, 2010)">未成年先别優</a> (1)</li>
	<li><a href="http://blog.samsonis.me/2011/07/%e5%be%ae%e6%97%a5%e8%ae%b0%e8%ae%a1%e5%88%92/" title="微日记计划 (July 18, 2011)">微日记计划</a> (6)</li>
	<li><a href="http://blog.samsonis.me/2010/01/%e5%a5%b6%e5%a5%b6%ef%bc%8c%e4%b8%80%e8%b7%af%e9%a1%ba%e9%a3%8e/" title="奶奶，一路顺风 (January 28, 2010)">奶奶，一路顺风</a> (3)</li>
	<li><a href="http://blog.samsonis.me/2011/09/%e5%a4%a9%e4%b8%8e%e5%bc%97%e5%8f%96-%e5%8f%8d%e5%8f%97%e5%85%b6%e5%92%8e/" title="天与弗取 反受其咎 (September 26, 2011)">天与弗取 反受其咎</a> (3)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.samsonis.me/2010/06/%e6%ac%a2%e8%bf%8e%e6%8a%a5%e8%80%83%e5%9b%b4%e5%9f%8e/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>退步原来是向前</title>
		<link>http://blog.samsonis.me/2010/05/%e9%80%80%e6%ad%a5%e5%8e%9f%e6%9d%a5%e6%98%af%e5%90%91%e5%89%8d/</link>
		<comments>http://blog.samsonis.me/2010/05/%e9%80%80%e6%ad%a5%e5%8e%9f%e6%9d%a5%e6%98%af%e5%90%91%e5%89%8d/#comments</comments>
		<pubDate>Sat, 22 May 2010 14:26:27 +0000</pubDate>
		<dc:creator>Samson Wu</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Minds]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://blog.samsonis.me/?p=1887</guid>
		<description><![CDATA[《插秧歌》 唐·布袋和尚 春有百花秋有月 夏有凉风冬有雪 若无闲事挂心头 便是人间好时节 善似青松恶似花 看看眼前不如它 有朝一日遭霜打 只见青松不见花 面上无嗔是供养 口里无嗔出妙香 心中无嗔无价宝 不断不灭是真常 佛在灵山莫远求 灵山只在汝心头 人人有个灵山塔 好向灵山塔下修 佛在世时我沉沦 佛灭度后我出生 忏悔此生多业障 不见如来金色身 手把青秧插满田 低头便见水中天 六根清净方为道 退步原来是向前 千锤百炼出深山 烈火焚烧莫等闲 粉身碎骨都无怨 留得青白在人间 三十三天天外天 九霄云外有神仙 神仙本是凡人做 只怕凡人心不坚 南无阿弥陀佛 Related posts 欢迎报考围城 (0) 未成年先别優 (1) 微日记计划 (6) 奶奶，一路顺风 (3) 天与弗取 反受其咎 (3)]]></description>
			<content:encoded><![CDATA[<blockquote><p>
《插秧歌》<br />
唐·布袋和尚</p>
<p>春有百花秋有月 夏有凉风冬有雪 若无闲事挂心头 便是人间好时节</p>
<p>善似青松恶似花 看看眼前不如它 有朝一日遭霜打 只见青松不见花</p>
<p>面上无嗔是供养 口里无嗔出妙香 心中无嗔无价宝 不断不灭是真常</p>
<p>佛在灵山莫远求 灵山只在汝心头 人人有个灵山塔 好向灵山塔下修</p>
<p>佛在世时我沉沦 佛灭度后我出生 忏悔此生多业障 不见如来金色身</p>
<p><span style="text-decoration: underline;">手把青秧插满田 低头便见水中天 六根清净方为道 退步原来是向前</span></p>
<p>千锤百炼出深山 烈火焚烧莫等闲 粉身碎骨都无怨 留得青白在人间</p>
<p>三十三天天外天 九霄云外有神仙 神仙本是凡人做 只怕凡人心不坚</p>
<p>南无阿弥陀佛
</p></blockquote>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.samsonis.me/2010/06/%e6%ac%a2%e8%bf%8e%e6%8a%a5%e8%80%83%e5%9b%b4%e5%9f%8e/" title="欢迎报考围城 (June 7, 2010)">欢迎报考围城</a> (0)</li>
	<li><a href="http://blog.samsonis.me/2010/02/%e6%9c%aa%e6%88%90%e5%b9%b4%e5%85%88%e5%88%ab%e5%84%aa/" title="未成年先别優 (February 23, 2010)">未成年先别優</a> (1)</li>
	<li><a href="http://blog.samsonis.me/2011/07/%e5%be%ae%e6%97%a5%e8%ae%b0%e8%ae%a1%e5%88%92/" title="微日记计划 (July 18, 2011)">微日记计划</a> (6)</li>
	<li><a href="http://blog.samsonis.me/2010/01/%e5%a5%b6%e5%a5%b6%ef%bc%8c%e4%b8%80%e8%b7%af%e9%a1%ba%e9%a3%8e/" title="奶奶，一路顺风 (January 28, 2010)">奶奶，一路顺风</a> (3)</li>
	<li><a href="http://blog.samsonis.me/2011/09/%e5%a4%a9%e4%b8%8e%e5%bc%97%e5%8f%96-%e5%8f%8d%e5%8f%97%e5%85%b6%e5%92%8e/" title="天与弗取 反受其咎 (September 26, 2011)">天与弗取 反受其咎</a> (3)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.samsonis.me/2010/05/%e9%80%80%e6%ad%a5%e5%8e%9f%e6%9d%a5%e6%98%af%e5%90%91%e5%89%8d/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Snow Leopard Headache</title>
		<link>http://blog.samsonis.me/2010/03/snow-leopard-headache/</link>
		<comments>http://blog.samsonis.me/2010/03/snow-leopard-headache/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 14:18:32 +0000</pubDate>
		<dc:creator>Samson Wu</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Minds]]></category>
		<category><![CDATA[Snow Leopard]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://blog.samsonis.me/?p=1812</guid>
		<description><![CDATA[今天终于升级到了snow leopard，因为终于准备好了要折腾了，这一准备还准备了半年，版本都从当时的10.6升到10.6.2了，黄花菜都那啥了都…… 1. zimbra desktop 邮件是第一个发现的问题，因为一升级完就要开，还是迫不及待的…瞧我多那啥…… 这个就是我平时用的邮件客户端，其实用不用都无所谓的，邮件本质上和gmail差不多，都是属于“在云端”，zdesktop本身也属于firefox的wrapper，用它和用firefox本质没啥区别，不过既然平时用的习惯了也就习惯了。 snow leopard后zdesktop就launch不了了，查了log然后google发现解决办法具彻底 —— 重装…… 好吧，not a good start，but anyway…… 2. system upgrade &#038; update 接下来似乎很平静，没有发现啥问题，只是系统提示有具多的update，于是downloading和等着update，和平时的windows update没啥区别。这是顿感轻松，顺便还和同事开了开玩笑，世界真美妙…… 那时的感受是什么呀，和装个windows的新版本差不多嘛，除了windows升级一般是占更多的硬盘更多的系统资源，而mac升级则是给我省出了7G空间（后来升级完xcode后发现没有省那么多，现实是如此残酷）。 3. afloat 系统升级下载完了要安装的时候问题来了，系统频繁的问我要密码，敲了一边过去了转身马上又问，问完继续又问…… 于是继续google，这是晚点升级的好处，该碰到的问题人家应该都已经碰到了… 该解决的也已经解决了…… 解决办法还是重装，一点脑子都不用动，全傻瓜式操作。 4. firefox 好吧，我承认这不是升级搞出来的问题，纯粹属于历史遗留下来的问题，不过既然今天开始折腾了那索性一起搞搞干净。其问题是之前firefox升级失败然后就一直无法升级了，和这里描述的差不多，不过上边的解决办法是windows的，我在mac上面始终无法找到相应的updates目录，于是放弃…… 最后solution：重装…… 本来以为所有add-on也要重装一遍的，后来发现所有add-on全部放在我home目录下，好吧此时不重装更待何时。 5. iphone sdk &#038; xcode 升级snow leopard的根本原因之一就是为了升级这玩意，因为最新的xcode 3.2需要snow leopard，升级没有遇到啥问题，但是就是好大呀，6G多…… 之前好不容易省下7G又还回去了…… 螳螂捕蝉，黄雀在后呀…… 6. 最后大boss之macports 由于snow leopard升级改了arch（i386 -> x86_64），所以之前凡事configure, make, make install的都要小心为妙。 ...]]></description>
			<content:encoded><![CDATA[<p>今天终于升级到了snow leopard，因为终于准备好了要折腾了，这一准备还准备了半年，版本都从当时的10.6升到10.6.2了，黄花菜都那啥了都……</p>
<p>1. zimbra desktop<br />
邮件是第一个发现的问题，因为一升级完就要开，还是迫不及待的…瞧我多那啥…… 这个就是我平时用的邮件客户端，其实用不用都无所谓的，邮件本质上和gmail差不多，都是属于“在云端”，zdesktop本身也属于firefox的wrapper，用它和用firefox本质没啥区别，不过既然平时用的习惯了也就习惯了。<br />
snow leopard后zdesktop就launch不了了，查了log然后google发现解决办法具彻底 —— 重装…… 好吧，not a good start，but anyway……</p>
<p>2. system upgrade &#038; update<br />
接下来似乎很平静，没有发现啥问题，只是系统提示有具多的update，于是downloading和等着update，和平时的windows update没啥区别。这是顿感轻松，顺便还和同事开了开玩笑，世界真美妙……<br />
那时的感受是什么呀，和装个windows的新版本差不多嘛，除了windows升级一般是占更多的硬盘更多的系统资源，而mac升级则是给我省出了7G空间（后来升级完xcode后发现没有省那么多，现实是如此残酷）。</p>
<p>3. afloat<br />
系统升级下载完了要安装的时候问题来了，系统频繁的问我要密码，敲了一边过去了转身马上又问，问完继续又问……<br />
于是继续google，这是晚点升级的好处，该碰到的问题人家应该都已经碰到了… 该解决的也已经解决了……<br />
<a href="http://infinite-labs.net/kb/plugsuit/ps-remove-on-10.6.html">解决办法</a>还是重装，一点脑子都不用动，全傻瓜式操作。<br />
<span id="more-1812"></span><br />
4. firefox<br />
好吧，我承认这不是升级搞出来的问题，纯粹属于历史遗留下来的问题，不过既然今天开始折腾了那索性一起搞搞干净。其问题是之前firefox升级失败然后就一直无法升级了，和<a href="https://support.mozilla.com/en-US/forum/1/628464">这里</a>描述的差不多，不过上边的解决办法是windows的，我在mac上面始终无法找到相应的updates目录，于是放弃……<br />
最后solution：重装…… 本来以为所有add-on也要重装一遍的，后来发现所有add-on全部放在我home目录下，好吧此时不重装更待何时。</p>
<p>5. iphone sdk &#038; xcode<br />
升级snow leopard的根本原因之一就是为了升级这玩意，因为最新的xcode 3.2需要snow leopard，升级没有遇到啥问题，但是就是好大呀，6G多…… 之前好不容易省下7G又还回去了…… 螳螂捕蝉，黄雀在后呀……</p>
<p>6. 最后大boss之macports<br />
由于snow leopard<a href="http://developer.apple.com/technologies/mac/snowleopard/64bit.html">升级改了arch</a>（i386 -> x86_64），所以之前凡事configure, make, make install的都要小心为妙。<br />
担心不是不无道理的，macports就是最大的受害者，这是macports官方的<a href="http://trac.macports.org/wiki/Migration">migration instruction</a>，看完直接晕过去… 又是重装…… 而且是全部删掉全部重新编译……<br />
这个工作量…… 好吧，好身体，抵抗力……</p>
<p>7. TBD<br />
目前还在重装macports编译各种悲剧的过程中（cpu高负荷运转，风扇狂转中…），由于编译实在无聊，所以过来啰嗦几句，也不知道后面还有没有啥隐藏boss…… 不过anyway，so far so “good”……</p>
<p>Conclusion: 今天我整个就是一重装党，重装正在进行，悲剧还在继续……</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.samsonis.me/2010/05/%e9%80%80%e6%ad%a5%e5%8e%9f%e6%9d%a5%e6%98%af%e5%90%91%e5%89%8d/" title="退步原来是向前 (May 22, 2010)">退步原来是向前</a> (0)</li>
	<li><a href="http://blog.samsonis.me/2010/06/%e6%ac%a2%e8%bf%8e%e6%8a%a5%e8%80%83%e5%9b%b4%e5%9f%8e/" title="欢迎报考围城 (June 7, 2010)">欢迎报考围城</a> (0)</li>
	<li><a href="http://blog.samsonis.me/2010/02/%e6%9c%aa%e6%88%90%e5%b9%b4%e5%85%88%e5%88%ab%e5%84%aa/" title="未成年先别優 (February 23, 2010)">未成年先别優</a> (1)</li>
	<li><a href="http://blog.samsonis.me/2011/07/%e5%be%ae%e6%97%a5%e8%ae%b0%e8%ae%a1%e5%88%92/" title="微日记计划 (July 18, 2011)">微日记计划</a> (6)</li>
	<li><a href="http://blog.samsonis.me/2010/01/%e5%a5%b6%e5%a5%b6%ef%bc%8c%e4%b8%80%e8%b7%af%e9%a1%ba%e9%a3%8e/" title="奶奶，一路顺风 (January 28, 2010)">奶奶，一路顺风</a> (3)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.samsonis.me/2010/03/snow-leopard-headache/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>关于Mac的Safe Sleep和Hibernate</title>
		<link>http://blog.samsonis.me/2010/02/%e5%85%b3%e4%ba%8emac%e7%9a%84safe-sleep%e5%92%8chibernate/</link>
		<comments>http://blog.samsonis.me/2010/02/%e5%85%b3%e4%ba%8emac%e7%9a%84safe-sleep%e5%92%8chibernate/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 09:18:23 +0000</pubDate>
		<dc:creator>Samson Wu</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Minds]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Macintosh]]></category>

		<guid isPermaLink="false">http://blog.samsonis.me/?p=1701</guid>
		<description><![CDATA[据说Apple早在2005年10月发布Mac OS X 10.4.3的时候就已经加入了safe sleep这个功能，但是GUI界面上却至今始终对用户透明，用户在不装任何3rd party tools的情况下永远只能看到sleep而没有hiberate之类的选项。 但是此sleep又并非完全等同于我们平时常说的&#8221;suspend to RAM&#8221;（2005.10之前可能相同），它背后其实也做了&#8221;suspend to disk&#8221;，也就是PC上的hibernate的工作，实为明修栈道，暗渡陈仓。 这样做的好处也成了后来Apple命名此技术的offical name —— &#8220;safe sleep&#8221;，因为它解决了单纯&#8221;suspend to RAM&#8221;下电源耗完或故障导致的RAM信息丢失问题：其会在电源不足的情况下自动切换到&#8221;suspend to disk&#8221;，着实&#8221;smart and safe&#8221;。 但有趣的是，苹果似乎从来没有高调宣布过这项当时可能不新不revolutionary但确实对用户而言很实用的功能，for some &#8220;unknown&#8221; reason。 在大多数的情况下，用户可能并不会察觉这背后的不同，事实上我觉得Apple要不是考虑到了切换到&#8221;suspend to disk&#8221;后restore回来用户会等很久的user experience问题，而加入了这个progress bar， 很少真的会有用户察觉。 到了10.5，safe sleep似乎终于有了offcial的解释，但是总感觉好像简单了点，不知道你和我是否感觉一样，低调么也不带这样的… 系统早就有这个capability，但4年多后的今天普通用户却还是要很麻烦的来使用，Apple提供了一个命令行工具pmset来帮助用户进行power management，其中很多选项在&#8221;System Preferences&#8230; -> Energy Saver&#8221;里面都能找到对应，但是却偏偏没有关于hibernate mode的。 相应的信息如果不联网的话需要在命令行下用man pmset查看，可以看到pmset可以设置autorestart等10多个参数，与hibernate有关的有两个参数分别叫hibernatemode和hibernatefile，你会有趣的发现只有这两个参数后面跟了句&#8221;Please use caution.&#8221;，这是不是让你联想到了什么？ ========================== 历史，背景以及浮想联翩的分界线 ========================== 下面我们来看看究竟怎么在Mac上hibernate，底下是man pmset里关于hibernatemode参数设置的描述： hibernatemode takes a bitfield ...]]></description>
			<content:encoded><![CDATA[<p>据说Apple早在2005年10月发布<a href="http://support.apple.com/downloads/Mac_OS_X_Update_10_4_3">Mac OS X 10.4.3</a>的时候就已经加入了safe sleep这个功能，但是GUI界面上却至今始终对用户透明，用户在不装任何3rd party tools的情况下永远只能看到sleep而没有hiberate之类的选项。</p>
<p>但是此sleep又并非完全等同于我们平时常说的&#8221;suspend to RAM&#8221;（2005.10之前可能相同），它背后其实也做了&#8221;suspend to disk&#8221;，也就是PC上的hibernate的工作，实为明修栈道，暗渡陈仓。</p>
<p>这样做的好处也成了后来Apple命名此技术的offical name —— &#8220;safe sleep&#8221;，因为它解决了单纯&#8221;suspend to RAM&#8221;下电源耗完或故障导致的RAM信息丢失问题：其会在电源不足的情况下自动切换到&#8221;suspend to disk&#8221;，着实&#8221;smart and safe&#8221;。</p>
<p>但有趣的是，苹果似乎从来没有高调宣布过这项当时可能不新不revolutionary但确实对用户而言很实用的功能，for some &#8220;unknown&#8221; reason。</p>
<p>在大多数的情况下，用户可能并不会察觉这背后的不同，事实上我觉得Apple要不是考虑到了切换到&#8221;suspend to disk&#8221;后restore回来用户会等很久的user experience问题，而加入了<a href="http://support.apple.com/kb/HT1757?viewlocale=en_US">这个progress bar</a>， 很少真的会有用户察觉。</p>
<p>到了10.5，safe sleep似乎终于有了<a href="http://docs.info.apple.com/article.html?path=Mac/10.5/en/10328.html">offcial的解释</a>，但是总感觉好像简单了点，不知道你和我是否感觉一样，低调么也不带这样的…<br />
<span id="more-1701"></span><br />
系统早就有这个capability，但4年多后的今天普通用户却还是要很麻烦的来使用，Apple提供了一个命令行工具pmset来帮助用户进行power management，其中很多选项在&#8221;System Preferences&#8230; -> Energy Saver&#8221;里面都能找到对应，但是却偏偏没有关于hibernate mode的。</p>
<p>相应的信息如果不联网的话需要在命令行下用man pmset查看，可以看到pmset可以设置autorestart等10多个参数，与hibernate有关的有两个参数分别叫hibernatemode和hibernatefile，你会有趣的发现只有这两个参数后面跟了句&#8221;Please use caution.&#8221;，这是不是让你联想到了什么？</p>
<p>========================== 历史，背景以及浮想联翩的分界线 ==========================</p>
<p>下面我们来看看究竟怎么在Mac上hibernate，底下是man pmset里关于hibernatemode参数设置的描述：</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">hibernatemode takes a bitfield argument defining SafeSleep behavior.<br />
Passing <span style="color: #000000;">0</span> disables SafeSleep altogether, forcing the computer into a reg-<br />
ular sleep.<br />
<br />
0001 <span style="color: #7a0874; font-weight: bold;">&#40;</span>bit <span style="color: #000000;">0</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> enables hibernation; causes OS X to <span style="color: #c20cb9; font-weight: bold;">write</span> memory state to<br />
hibernation image at <span style="color: #c20cb9; font-weight: bold;">sleep</span> time. On wake <span style="color: #7a0874; font-weight: bold;">&#40;</span>without bit <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">set</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> OS X will<br />
resume from the hibernation image. Bit <span style="color: #000000;">0</span> <span style="color: #000000; font-weight: bold;">set</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>without bit <span style="color: #000000;">1</span> <span style="color: #000000; font-weight: bold;">set</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> causes<br />
OS X to <span style="color: #c20cb9; font-weight: bold;">write</span> memory state and immediately hibernate at <span style="color: #c20cb9; font-weight: bold;">sleep</span> time.<br />
<br />
0010 <span style="color: #7a0874; font-weight: bold;">&#40;</span>bit <span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>, <span style="color: #000000; font-weight: bold;">in</span> conjunction with bit <span style="color: #000000;">0</span>, causes OS X to maintain system<br />
state <span style="color: #000000; font-weight: bold;">in</span> memory and leave system power on <span style="color: #000000; font-weight: bold;">until</span> battery level drops below<br />
a near empty threshold <span style="color: #7a0874; font-weight: bold;">&#40;</span>This enables quicker wakeup from memory <span style="color: #000000; font-weight: bold;">while</span><br />
battery power is available<span style="color: #7a0874; font-weight: bold;">&#41;</span>. Upon nearly emptying the battery, OS X shuts<br />
off all system power and hibernates; on wake the system will resume from<br />
hibernation image, not from memory.<br />
<br />
hibernatemode is <span style="color: #000000; font-weight: bold;">set</span> to <span style="color: #000000;">3</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>binary 0011<span style="color: #7a0874; font-weight: bold;">&#41;</span> by default on supported porta-<br />
bles.<br />
<br />
hibernatemode is <span style="color: #000000; font-weight: bold;">set</span> to <span style="color: #000000;">0</span> <span style="color: #7a0874; font-weight: bold;">&#40;</span>binary 0000<span style="color: #7a0874; font-weight: bold;">&#41;</span> by default on supported desktops.<br />
<br />
Please note that hibernatefile may only point to a <span style="color: #c20cb9; font-weight: bold;">file</span> located on the<br />
root volume.</div></div>
<p>可以看到portables默认的模式就是所谓的safe sleep（hibernatemode = 3）。</p>
<p>修改之前先查看一下当前系统使用的hibernate相关参数设置，我没有修改过（事实上之前都不知道怎么修改），应该就是默认的配置：</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ pmset <span style="color: #660033;">-g</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> hibernate<br />
&nbsp;hibernatefile&nbsp; <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>vm<span style="color: #000000; font-weight: bold;">/</span>sleepimage<br />
&nbsp;hibernatemode&nbsp; <span style="color: #000000;">3</span><br />
$ <span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #660033;">-lh</span> <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>vm<span style="color: #000000; font-weight: bold;">/</span>sleepimage <br />
<span style="color: #660033;">-rw------T</span> &nbsp;<span style="color: #000000;">1</span> root &nbsp;wheel &nbsp; 2.0G Feb <span style="color: #000000;">23</span> <span style="color: #000000;">10</span>:09 <span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>vm<span style="color: #000000; font-weight: bold;">/</span>sleepimage</div></div>
<p>设置系统使用hibernate模式（hibernatemode = 0001）进行sleep：</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> pmset <span style="color: #660033;">-a</span> hibernatemode <span style="color: #000000;">1</span></div></div>
<p>这时如果再按普通方式sleep的时候mac就会hibernate了，想要切换回safe sleep只要把hibernatemode修改回来就行了：</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> pmset <span style="color: #660033;">-a</span> hibernatemode <span style="color: #000000;">3</span></div></div>
<p>如果不喜欢命令行操作，可以使用第三方工具，实现机制应该是一样的，我所知道的有<a href="http://www.jinx.de/SmartSleep.html">smartsleep</a>和<a href="http://deepsleep.free.fr/">deep sleep</a>这两个，不过我都还没有测试过。</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.samsonis.me/2009/02/welcome-to-macintosh/" title="Welcome to Macintosh (February 15, 2009)">Welcome to Macintosh</a> (0)</li>
	<li><a href="http://blog.samsonis.me/2011/08/lion-ready/" title="Lion Ready? (August 10, 2011)">Lion Ready?</a> (5)</li>
	<li><a href="http://blog.samsonis.me/2010/09/%e8%90%bd%e8%8a%b1%e6%9c%89%e6%84%8f%e6%b5%81%e6%b0%b4%e6%97%a0%e6%83%85/" title="落花有意流水无情 [转载] (September 7, 2010)">落花有意流水无情 [转载]</a> (12)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.samsonis.me/2010/02/%e5%85%b3%e4%ba%8emac%e7%9a%84safe-sleep%e5%92%8chibernate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ruby&#8217;s &#8220;python -m SimpleHTTPServer&#8221;</title>
		<link>http://blog.samsonis.me/2010/02/rubys-python-simplehttpserver/</link>
		<comments>http://blog.samsonis.me/2010/02/rubys-python-simplehttpserver/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 18:57:43 +0000</pubDate>
		<dc:creator>Samson Wu</dc:creator>
				<category><![CDATA[Minds]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Technique]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Rack]]></category>
		<category><![CDATA[SimpleHTTPServer]]></category>

		<guid isPermaLink="false">http://blog.samsonis.me/?p=1555</guid>
		<description><![CDATA[If I remembered right, the command below used to be the most voted one on commandlinefu.com: $ python -m SimpleHTTPServer the &#8220;SimpleHTTPServer&#8221; module is written in python and it maybe called &#8220;the python way&#8221;, but that&#8217;s not our topic today. what we really want to do here is just making a ruby equivalent for this ...]]></description>
			<content:encoded><![CDATA[<p>If I remembered right, the command below used to be the most voted one on <a href="http://www.commandlinefu.com/">commandlinefu.com</a>:</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ python <span style="color: #660033;">-m</span> SimpleHTTPServer</div></div>
<p>the &#8220;SimpleHTTPServer&#8221; module is written in python and it maybe called &#8220;the python way&#8221;, but that&#8217;s not our topic today.  what we really want to do here is just making a ruby equivalent for this popular command, using <a href="http://rack.rubyforge.org/">rack</a>.</p>
<p>first, make sure you have rack gem installed on your system (if you&#8217;ve installed rails 2.x before, you may already have it):</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> gem <span style="color: #c20cb9; font-weight: bold;">install</span> rack</div></div>
<p>confirm installation (Rack 1.0 should also work for our example):</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ rackup <span style="color: #660033;">--version</span><br />
Rack <span style="color: #000000;">1.1</span></div></div>
<p>alright, preparation is done, let&#8217;s start cooking.  only a rackup file will be sufficient, for consistency, let&#8217;s just call it simple_http_server.ru .</p>
<div class="codecolorer-container ruby railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#008000; font-style:italic;">#!/usr/bin/env rackup</span><br />
<span style="color:#008000; font-style:italic;">#\ -E deployment</span><br />
<br />
use <span style="color:#6666ff; font-weight:bold;">Rack::ContentLength</span><br />
<br />
app = <span style="color:#6666ff; font-weight:bold;">Rack::Directory</span>.<span style="color:#9900CC;">new</span> <span style="color:#CC00FF; font-weight:bold;">Dir</span>.<span style="color:#9900CC;">pwd</span><br />
run app</div></div>
<p><span id="more-1555"></span><br />
Rack::Directory is so awesome that we just simply rely on it&#8230; aren&#8217;t i cheating?  hehe, maybe&#8230;</p>
<p>ok, we&#8217;re done. to test it, simply run:</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ rackup simple_http_server.ru</div></div>
<p>and then point your browser to http://locahost:9292/ .</p>
<p><a href="http://blog.samsonis.me/wp-content/uploads/2010/02/simple-http-server.png"><img src="http://blog.samsonis.me/wp-content/uploads/2010/02/simple-http-server-300x218.png" alt="" title="simple-http-server" width="300" height="218" class="alignnone size-medium wp-image-1594" /></a></p>
<p>to be useful for daily use, you may consider chmod +x it to make it executable and put it in your $PATH.</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #c20cb9; font-weight: bold;">chmod</span> +x simple_http_server.ru<br />
$ <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$PATH</span>:<span style="color: #000000; font-weight: bold;">`</span><span style="color: #7a0874; font-weight: bold;">pwd</span><span style="color: #000000; font-weight: bold;">`</span></div></div>
<p>to share a directory with your coworkers or friends, simply cd to that directory and execute the script:</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #000000; font-weight: bold;">/</span>the<span style="color: #000000; font-weight: bold;">/</span>dir<span style="color: #000000; font-weight: bold;">/</span>i<span style="color: #000000; font-weight: bold;">/</span>want<span style="color: #000000; font-weight: bold;">/</span>to<span style="color: #000000; font-weight: bold;">/</span>share<br />
$ simple_http_server.ru</div></div>
<p>since we&#8217;re actually using rackup to execute, all the rackup options are also available, which is good:</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ simple_http_server.ru <span style="color: #660033;">-h</span></div></div>
<p>finally, let&#8217;s end up with emulating python SimpleHTTPServer&#8217;s default behavior:</p>
<div class="codecolorer-container bash railscasts" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$ simple_http_server.ru <span style="color: #660033;">-p</span> <span style="color: #000000;">8000</span></div></div>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.samsonis.me/2010/02/ruby-gem-geoip-and-rack-geoipcountry/" title="Ruby gem geoip and Rack::GeoIPCountry (February 25, 2010)">Ruby gem geoip and Rack::GeoIPCountry</a> (2)</li>
	<li><a href="http://blog.samsonis.me/2009/02/%e5%87%86%e5%a4%87%e5%ad%a6%e4%b9%a0python%e5%92%8cphp/" title="准备学习Python和PHP (February 15, 2009)">准备学习Python和PHP</a> (14)</li>
	<li><a href="http://blog.samsonis.me/2011/02/rubygems-1-5-2-manual-upgrade/" title="RubyGems 1.5.2 Manual Upgrade (February 16, 2011)">RubyGems 1.5.2 Manual Upgrade</a> (0)</li>
	<li><a href="http://blog.samsonis.me/2011/08/python-nameerror-name-readline-is-not-defined/" title="Python NameError: name &#8216;readline&#8217; is not defined (August 16, 2011)">Python NameError: name &#8216;readline&#8217; is not defined</a> (3)</li>
	<li><a href="http://blog.samsonis.me/2009/02/python-2x-or-30/" title="Python 2.x or 3.0 (February 17, 2009)">Python 2.x or 3.0</a> (4)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.samsonis.me/2010/02/rubys-python-simplehttpserver/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cool Sentences-3</title>
		<link>http://blog.samsonis.me/2009/09/cool-sentences-3/</link>
		<comments>http://blog.samsonis.me/2009/09/cool-sentences-3/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 13:19:32 +0000</pubDate>
		<dc:creator>Samson Wu</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Minds]]></category>
		<category><![CDATA[Cool Sentences]]></category>

		<guid isPermaLink="false">http://blog.samsonis.me/?p=1222</guid>
		<description><![CDATA[Previously on cool sentences: Cool Sentences-2 Cool Sentences-1 1. never judge a book by its cover as you all know, obviously we are not talking about books here…… then what am i talking about? Leave for your imagination. 2. 大学本科生只能转一次系 这个我花了大学四年以血的代价才搞明白的深刻真理，别人竟然是一出生by default就知道的…… 上帝的不公平足见一斑…… 你为啥不让我by default就知道呢？ 3. less is more so let&#8217;s KISS &#8212; keep it ...]]></description>
			<content:encoded><![CDATA[<p>Previously on cool sentences:<br />
<a href="http://blog.samsonis.me/2009/07/cool-sentences-2/">Cool Sentences-2</a><br />
<a href="http://blog.samsonis.me/2009/04/cool-sentences/">Cool Sentences-1 </a></p>
<p><span style="text-decoration: underline;">1. never judge a book by its cover</span><br />
as you all know, obviously we are not talking about books here…… then what am i talking about?  Leave for your imagination.</p>
<p><span style="text-decoration: underline;">2. 大学本科生只能转一次系</span><br />
这个我花了大学四年以血的代价才搞明白的深刻真理，别人竟然是一出生by default就知道的…… 上帝的不公平足见一斑…… 你为啥不让我by default就知道呢？</p>
<p><span style="text-decoration: underline;">3. less is more</span><br />
so let&#8217;s KISS &#8212; keep it simple, stupid.</p>

	<h4>Related posts</h4>
	<ul class="st-related-posts">
	<li><a href="http://blog.samsonis.me/2009/07/cool-sentences-2/" title="Cool Sentences-2 (July 13, 2009)">Cool Sentences-2</a> (1)</li>
	<li><a href="http://blog.samsonis.me/2009/04/cool-sentences/" title="Cool Sentences (April 8, 2009)">Cool Sentences</a> (8)</li>
</ul>

]]></content:encoded>
			<wfw:commentRss>http://blog.samsonis.me/2009/09/cool-sentences-3/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

