<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

 <title>The blog of Yuan He</title>
 <link href="http://blog.lenage.com/atom.xml" rel="self"/>
 <link href="http://blog.lenage.com"/>
 <updated>2024-04-29T07:24:23+00:00</updated>
 <id>http://blog.lenage.com</id>
 <author>
   <name>Yuan He</name>
   <email>me@lenage.com</email>
 </author>

 
 <entry>
   <title>Ruby Mem</title>
   <link href="http://blog.lenage.com/tech/2016/07/21/ruby-mem.html"/>
   <updated>2016-07-21T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2016/07/21/ruby-mem</id>
   <content type="html">&lt;ol&gt;
  &lt;li&gt;https://devcenter.heroku.com/articles/ruby-memory-use&lt;/li&gt;
  &lt;li&gt;bundle exec derailed bundle:mem&lt;/li&gt;
&lt;/ol&gt;
</content>
 </entry>
 
 <entry>
   <title>使用 gpg2 自动给 Ansible Vault 解密密码</title>
   <link href="http://blog.lenage.com/ansible/2016/05/22/using-gpg2-to-open-ansible-vault.html"/>
   <updated>2016-05-22T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/ansible/2016/05/22/using-gpg2-to-open-ansible-vault</id>
   <content type="html">&lt;ol&gt;
  &lt;li&gt;如果遇到 gpg-agent is not available in this session, 用 gpg2&lt;/li&gt;
  &lt;li&gt;如果不能自动记住密码, 用 gpg2&lt;/li&gt;
  &lt;li&gt;如果 Emacs 里面也不能自动记住密码，用 gpg2&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;总之 gpg2 千搬好&lt;/p&gt;

&lt;h2 id=&quot;安全-安全-安全&quot;&gt;安全! 安全! 安全!&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;不要在 git 里面提交任何密码&lt;/li&gt;
  &lt;li&gt;不要明文存储未经加密的密码&lt;/li&gt;
&lt;/ol&gt;
</content>
 </entry>
 
 <entry>
   <title>Github Pages and DNS settings</title>
   <link href="http://blog.lenage.com/tech/2015/05/31/github-pages-and-dns-settings.html"/>
   <updated>2015-05-31T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2015/05/31/github-pages-and-dns-settings</id>
   <content type="html">&lt;p&gt;Github Pages 给所有托管在 Github 上的项目提供静态网站和基于 Jekyll 的博客服务。
如果项目在 Github 上，并且需要一个简单的展示页面的话， Github Pages 是最好的选择，
同时，Github Pages 也提供自定义域名绑定服务, 但是官方的文档说的不是很明白，本文基
于我自己的实践说一下如何绑定主域名 (lenage.com) 和多个子域名到 Github 的不同项目。&lt;/p&gt;

&lt;h2 id=&quot;目的&quot;&gt;目的&lt;/h2&gt;

&lt;p&gt;lenage.com 和 blog.lenage.com 都放在 Github 上，并且分别在不同的 Repository.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href=&quot;http://lenage.com&quot;&gt;lenage.com&lt;/a&gt; =&amp;gt; &lt;a href=&quot;https://github.com/lenage/lenage.github.com&quot;&gt;lenage/lenage.github.com&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;http://blog.lenage.com&quot;&gt;blog.lenage.com&lt;/a&gt; =&amp;gt; &lt;a href=&quot;https://github.com/lenage/blog.lenage.com&quot;&gt;lenage/blog.lenage.com&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;另外，如果其他的项目用 Github Pages, 只是 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/example-project&lt;/code&gt; 的方式访问, 比如 &lt;a href=&quot;https://github.com/lenage/react-talk&quot;&gt;lenage/react-talk&lt;/a&gt;
可以通过 http://lenage.com/react-talk 访问. &lt;img src=&quot;/assets/images/posts/2.png&quot; alt=&quot;react-talk&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;lenagecom-设置&quot;&gt;&lt;a href=&quot;http://lenage.com&quot;&gt;lenage.com&lt;/a&gt; 设置&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;lenage.com 添加 A 记录, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;192.30.252.153&lt;/code&gt; 和 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;192.30.252.154&lt;/code&gt;. &lt;img src=&quot;/assets/images/posts/1.png&quot; alt=&quot;A record&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;修改 lenage.com 要指向的项目名称为 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;yourusername.github.com&lt;/code&gt;, 这不和重要，如果使用其他名字的话，另外项目将不能通过 lenage.com/example-project
的方式访问&lt;/li&gt;
  &lt;li&gt;新建 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CNAME&lt;/code&gt; 文件， 并添加到&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;youusername.github.com&lt;/code&gt;, 这里需要注意的是&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;CNAME&lt;/code&gt; 文件中只能有一个domain.&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git push&lt;/code&gt; 更新项目, 然后在项目的 settings 里面查看 Github Pages 项，如果 ok， 会显示 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Your site is published at http://yourdomain.justadded.com&lt;/code&gt;,
如果显示的是 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Your site is ready to publish at http://a.example.com&lt;/code&gt;, 则需要你 update 项目来触发 Github Pages 绑定，随便加一个 commit, 然后 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git push&lt;/code&gt;。&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;bloglenagecom-设置&quot;&gt;&lt;a href=&quot;http://blog.lenage.com&quot;&gt;blog.lenage.com&lt;/a&gt; 设置&lt;/h2&gt;

&lt;p&gt;Github Pages 支持给任何项目绑定子域名， 只有添加 CNAME 文件和设置 DNS，下面看看 blog.lenage.com 的设置:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;添加 CNAME 文件, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;echo 'blog.lenage.com' &amp;gt; CNAME&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;设置 DNS，添加 CNAME 到 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lenage.github.io&lt;/code&gt;, 注意这里是 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lenage.github.io&lt;/code&gt;, 虽然不是项目的名字，但是 lenage.com 会处理，这就是为什么前面一定要把 lenage.com
的项目命名为 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lenage.github.com&lt;/code&gt; 的原因. &lt;img src=&quot;/assets/images/posts/3.png&quot; alt=&quot;blog&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Push 一个 Commit 到 Github，然后到 Settings 查看结果. &lt;img src=&quot;/assets/images/posts/4.png&quot; alt=&quot;blog&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/lenage&quot;&gt;到 Github 查看具体代码&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PS. Github 最近&lt;a href=&quot;http://githubengineering.com/rearchitecting-github-pages/&quot;&gt;升级了 Pages 的架构&lt;/a&gt;，生成页面比以前又快了很多 :)&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Angularjs debug</title>
   <link href="http://blog.lenage.com/tech/2014/04/23/angularjs-debug.html"/>
   <updated>2014-04-23T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2014/04/23/angularjs-debug</id>
   <content type="html">&lt;p&gt;在Angular js的scope中用watch查看输出和变化:&lt;/p&gt;

&lt;div class=&quot;language-javascript highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  &lt;span class=&quot;nx&quot;&gt;$scope&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;cart&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;nx&quot;&gt;$scope&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;$watch&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;cart&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;==========&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;Date&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;======&lt;/span&gt;&lt;span class=&quot;dl&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;console&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;log&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;$scope&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;cart&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
  &lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
</content>
 </entry>
 
 <entry>
   <title>Rails helper and helper_method in Controller</title>
   <link href="http://blog.lenage.com/tech/2013/09/10/rails-helper_method_and_helper.html"/>
   <updated>2013-09-10T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2013/09/10/rails-helper_method_and_helper</id>
   <content type="html">&lt;h2 id=&quot;helper_method&quot;&gt;helper_method&lt;/h2&gt;
&lt;p&gt;defined in &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rails/actionpack/lib/abstract_controller/helpers.rb&lt;/code&gt;
Declare a controller method as a helper. For example, the following&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-ruby&quot; data-lang=&quot;ruby&quot;&gt;    &lt;span class=&quot;k&quot;&gt;class&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;ApplicationController&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;ActionController&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;::&lt;/span&gt;&lt;span class=&quot;no&quot;&gt;Base&lt;/span&gt;
      &lt;span class=&quot;n&quot;&gt;helper_method&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:current_user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:logged_in?&lt;/span&gt;

      &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;current_user&lt;/span&gt;
        &lt;span class=&quot;vi&quot;&gt;@current_user&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;||=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;User&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nf&quot;&gt;find_by_id&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;session&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:user&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;

      &lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;logged_in?&lt;/span&gt;
        &lt;span class=&quot;n&quot;&gt;current_user&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;!=&lt;/span&gt; &lt;span class=&quot;kp&quot;&gt;nil&lt;/span&gt;
      &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;then in view&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&amp;lt;% if logged_in? -%&amp;gt;Welcome, &amp;lt;%= current_user.name %&amp;gt;&amp;lt;% end -%&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;helper&quot;&gt;helper&lt;/h2&gt;
&lt;p&gt;The &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;helper&lt;/code&gt; class method can take a series of helper module names, a block, or both.&lt;/p&gt;

&lt;p&gt;###Parameters&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;*args&lt;/strong&gt; - Module, Symbol, String, :all&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;block&lt;/strong&gt; - A block defining helper methods&lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>Delighting In the Details</title>
   <link href="http://blog.lenage.com/read/2013/08/18/delighting-in-details.html"/>
   <updated>2013-08-18T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/read/2013/08/18/delighting-in-details</id>
   <content type="html">&lt;blockquote&gt;
  &lt;p&gt;Makers must make. The creative individual yearns to create something of
significance. we don’t do these things so wan be rich and famous, we do
them because great art comes from the heart.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Walt Disney once said:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;Making money is what allows great people to continue doing great work.
like with us for example, we don’t make movies to make money, we make money
to make more movies.&lt;/p&gt;
&lt;/blockquote&gt;
</content>
 </entry>
 
 <entry>
   <title>Arduino按照音乐节亮LED</title>
   <link href="http://blog.lenage.com/tech/2013/04/21/ardunio-make-led-flash-with-music.html"/>
   <updated>2013-04-21T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2013/04/21/ardunio-make-led-flash-with-music</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://www.instructables.com/id/How-to-Make-LEDs-Flash-to-Music-with-an-Arduino/?ALLSTEPS&quot;&gt;instructables 教程&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Kindle Touch User Agent</title>
   <link href="http://blog.lenage.com/tech/2012/12/17/kindle_touch_user_agent.html"/>
   <updated>2012-12-17T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2012/12/17/kindle_touch_user_agent</id>
   <content type="html">&lt;p&gt;Mozilla/5.0 (X11; U; Linux a rmv7l like Android; en-us) AppleWebKit/531.2+ (KHTML, like Gecko) Version/5.0 Safari/533.2+ Kindle/3.0+&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>nginx反向代理自定义error_page</title>
   <link href="http://blog.lenage.com/tech/2012/12/09/nginx-use-error-page-for-proxy-status-code.html"/>
   <updated>2012-12-09T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2012/12/09/nginx-use-error-page-for-proxy-status-code</id>
   <content type="html">&lt;h2 id=&quot;背景&quot;&gt;背景&lt;/h2&gt;
&lt;p&gt;caveman中如果没有找到路由则返回状态码404,但是不任何内容,所以需要nginx提供自定义404页面.
用&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;error_page 404 /404.html;&lt;/code&gt;没有效果.&lt;/p&gt;

&lt;h2 id=&quot;解决&quot;&gt;解决&lt;/h2&gt;
&lt;p&gt;使用&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;proxy_intercept_errors&lt;/code&gt;,详细见这里&lt;a href=&quot;http://wiki.nginx.org/HttpProxyModule#proxy_intercept_errors&quot;&gt;proxy_intercept_errors&lt;/a&gt;,
如果设置为&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;on&lt;/code&gt;, 将捕获&amp;gt;400的状态码，并按照&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;error_page&lt;/code&gt;的配置返回页面，如果没有配置则抛回给被代理服务器.
所以配置看起来是这样的:&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/4241137.js&quot;&gt; &lt;/script&gt;

</content>
 </entry>
 
 <entry>
   <title>部署Caveman到Amazon EC2</title>
   <link href="http://blog.lenage.com/tech/2012/12/08/deploy-caveman-app-to-ec2.html"/>
   <updated>2012-12-08T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2012/12/08/deploy-caveman-app-to-ec2</id>
   <content type="html">&lt;p&gt;上篇&lt;a href=&quot;http://blog.lenage.com/tech/2012/12/07/deploy-common-lisp-app-to-heroku/&quot;&gt;部署Lisp应用到heroku&lt;/a&gt;水分有点大，反正用Caveman框架写的demo没跑起来过。
这篇记录一下部署到Amazon EC2的过程。&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;Caveman是一个Common Lisp的web框架, 基于clack, 更多&lt;a href=&quot;https://github.com/fukamachi/caveman&quot;&gt;戳这里&lt;/a&gt;,作者是个日本人,
&lt;a href=&quot;https://twitter.com/nitro_idiot&quot;&gt;twitter帐号&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;首先是创建EC2 Instance之类的不多说。&lt;/p&gt;

&lt;p&gt;其次, 安装:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo apt-get install tmux&lt;/code&gt; 用于跑REPL然后关掉终端但是执行的命令继续跑，&lt;a href=&quot;http://stackoverflow.com/questions/451329/what-is-the-preferred-way-to-run-lisp-web-application&quot;&gt;StackOverflow&lt;/a&gt;上的讨论。&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo apt-get install sbcl&lt;/code&gt; 详细 http://www.sbcl.org/&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;quicklisp&lt;/code&gt; 安装看&lt;a href=&quot;http://www.quicklisp.org/beta/&quot;&gt;这里&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;设置服务端的git，然后push代码到EC2， 可以参考这篇文章: &lt;a href=&quot;http://tumblr.intranation.com/post/766290565/how-set-up-your-own-private-git-server-linux&quot;&gt;How to set up your own private Git server on Linux&lt;/a&gt;
和&lt;a href=&quot;http://news.ycombinator.com/item?id=1652414&quot;&gt;HN上的讨论&lt;/a&gt;，具体流程看这个&lt;a href=&quot;https://gist.github.com/4239048&quot;&gt;gist&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;然后，启动sbcl, 在tmux中运行&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sbcl --load quicklisp.lisp&lt;/code&gt;, 执行&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(ql:quickload :myapp)&lt;/code&gt;, 如有报错请检查quicklisp是否
安装正确，或者myapp目录是否在&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;quicklisp/local_projects/&lt;/code&gt;目录下面，&lt;/p&gt;

&lt;p&gt;最后, 在sbcl中运行&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(myapp:start)&lt;/code&gt; 启动. 启动后默认端口为5000(参&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;config/dev.lisp&lt;/code&gt;), 如果想直接用80端口的话，&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo sbcl --load quicklisp.lisp&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(ql:quickload :myapp)&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(myapp:start :port 80)&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;demo&quot;&gt;&lt;a href=&quot;http://llbire.com&quot;&gt;Demo&lt;/a&gt;&lt;/h2&gt;

</content>
 </entry>
 
 <entry>
   <title>部署Common Lisp应用到heroku</title>
   <link href="http://blog.lenage.com/tech/2012/12/07/deploy-common-lisp-app-to-heroku.html"/>
   <updated>2012-12-07T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2012/12/07/deploy-common-lisp-app-to-heroku</id>
   <content type="html">&lt;p&gt;Heroku暂时还没有支持cl的stack，不过可以使用&lt;a href=&quot;https://devcenter.heroku.com/articles/third-party-buildpacks&quot;&gt;第三方的build-package&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;1.按照Github上的&lt;a href=&quot;https://github.com/jsmpereira/heroku-cl-example&quot;&gt;exapmle project&lt;/a&gt;创建app:&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;&lt;span class=&quot;nv&quot;&gt;$ &lt;/span&gt;heroku create &lt;span class=&quot;nt&quot;&gt;-s&lt;/span&gt; cedar &lt;span class=&quot;nt&quot;&gt;--buildpack&lt;/span&gt; http://github.com/jsmpereira/heroku-buildpack-cl.git
Creating fierce-ravine-4120... &lt;span class=&quot;k&quot;&gt;done&lt;/span&gt;, stack is cedar
&lt;span class=&quot;nv&quot;&gt;BUILDPACK_URL&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;=&lt;/span&gt;http://github.com/jsmpereira/heroku-buildpack-cl.git
http://fierce-ravine-4120.herokuapp.com/ | git@heroku.com:fierce-ravine-4120.git&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;ol&gt;
  &lt;li&gt;启用&lt;a href=&quot;https://devcenter.heroku.com/articles/labs-user-env-compile&quot;&gt;user-env-compile&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;使用sbcl &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;heroku config:add CL_IMPL=sbcl --app {app_name}&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;使用hunchentoot做web server &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;heroku config:add CL_WEBSERVER=hunchentoot&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;添加heroku到git remote host&lt;/li&gt;
&lt;/ol&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-bash&quot; data-lang=&quot;bash&quot;&gt;   &lt;span class=&quot;nb&quot;&gt;cd &lt;/span&gt;myapp
   git init  &lt;span class=&quot;o&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt; git add &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt;
   git commit &lt;span class=&quot;nt&quot;&gt;-m&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;first commit&quot;&lt;/span&gt;
   git remote add heroku git@heroku.com:fierce-ravine-4120.git
   git push heroku master
   &lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;ol&gt;
  &lt;li&gt;修改&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;heroku-setup.lisp&lt;/code&gt;, 将example修改为自己的app-name, 我这里是&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;myapp&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git push heroku master&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;PS: 另外可以重写 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;heroku-toplevel&lt;/code&gt; 函数来自定义启动app&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>Capistrano 技巧</title>
   <link href="http://blog.lenage.com/tech/2012/12/04/capistrano-tips.html"/>
   <updated>2012-12-04T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2012/12/04/capistrano-tips</id>
   <content type="html">&lt;ol&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;%x{command}&lt;/code&gt; 在本地执行命令&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;stream &quot;cd #{shared_path} &amp;amp;&amp;amp; tail -f log/production.log&quot;&lt;/code&gt; 查看服务器log&lt;/li&gt;
&lt;/ol&gt;
</content>
 </entry>
 
 <entry>
   <title>Jekyll利用pygments高亮lisp代码</title>
   <link href="http://blog.lenage.com/tech/2012/11/30/jeykll-highlight-lisp-with-pygments.html"/>
   <updated>2012-11-30T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2012/11/30/jeykll-highlight-lisp-with-pygments</id>
   <content type="html">&lt;p&gt;主要是找对language关键词，高亮lisp的话用langauge用cl就ok了，比如&lt;/p&gt;

&lt;script src=&quot;https://gist.github.com/4174212.js&quot;&gt; &lt;/script&gt;

&lt;p&gt;另外如果在本地测试的话需要安装Pygments: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sudo pip install Pygments&lt;/code&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Emacs配置yasnippet</title>
   <link href="http://blog.lenage.com/tech/2012/11/30/config-yasnippets-for-emacs.html"/>
   <updated>2012-11-30T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2012/11/30/config-yasnippets-for-emacs</id>
   <content type="html">&lt;p&gt;适用版本: Emacs 24+&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;添加package源，将如下代码加到&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.emacs&lt;/code&gt; 或者 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.emacs.d/init.el&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-cl&quot; data-lang=&quot;cl&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;c1&quot;&gt;;; set packages&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;'package&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;setq&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;package-archives&lt;/span&gt;
      &lt;span class=&quot;o&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;((&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;original&quot;&lt;/span&gt;    &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;http://tromey.com/elpa/&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;gnu&quot;&lt;/span&gt;         &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;http://elpa.gnu.org/packages/&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;marmalade&quot;&lt;/span&gt;   &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;http://marmalade-repo.org/packages/&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&quot;melpa&quot;&lt;/span&gt;       &lt;span class=&quot;o&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;http://melpa.milkbox.net/packages/&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;package-initialize&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;M-x eval-buffer&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;M-x package-list-packages&lt;/code&gt; 按照你的网速快慢，可能需要半分钟左右.&lt;/li&gt;
  &lt;li&gt;在打开的Packages Buffer中，找到&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;yasnippet&lt;/code&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;yasnippet-bundle&lt;/code&gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;yas-jit&lt;/code&gt;, 并按&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;i&lt;/code&gt;(install)
标记安装.最后按&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;x&lt;/code&gt;安装。
PS:
    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;yasnippet-bundle&lt;/code&gt;(可选) – 自动编译snippets&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;yas-jit&lt;/code&gt;(可选) – 按需加载snippets&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;配置yasnippet,这里分两种情况: 安装yas-jit和没有安装yas-jit:&lt;/p&gt;

    &lt;ul&gt;
      &lt;li&gt;如果安装了&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;yas-int&lt;/code&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-cl&quot; data-lang=&quot;cl&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
9
10
11
12
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;'yas-jit&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;'dropdown-list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;setq&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;yas/prompt-functions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
                             &lt;span class=&quot;nv&quot;&gt;yas/ido-prompt&lt;/span&gt;
                             &lt;span class=&quot;nv&quot;&gt;yas/dropdown-prompt&lt;/span&gt;
                             &lt;span class=&quot;nv&quot;&gt;yas/completing-prompt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;setq&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;yas/root-directory&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;
                           &lt;span class=&quot;s&quot;&gt;&quot;~/.emacs.d/snippets&quot;&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;;; 自己的snippets&lt;/span&gt;
                           &lt;span class=&quot;s&quot;&gt;&quot;~/.emacs.d/elpa/yasnippet-20121127.25/snippets&quot;&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;;; yasnippet提供的&lt;/span&gt;
                           &lt;span class=&quot;s&quot;&gt;&quot;~/.emacs.d/vendor/yasnippets-rails/rails-snippets&quot;&lt;/span&gt; &lt;span class=&quot;c1&quot;&gt;;; 其他&lt;/span&gt;
                           &lt;span class=&quot;s&quot;&gt;&quot;~/.emacs.d/vendor/yasnippets-shoulda&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;yas/jit-load&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;ul&gt;
  &lt;li&gt;如果没有安装&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;yas-jit&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-cl&quot; data-lang=&quot;cl&quot;&gt;&lt;table class=&quot;rouge-table&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td class=&quot;gutter gl&quot;&gt;&lt;pre class=&quot;lineno&quot;&gt;1
2
3
4
5
6
7
8
&lt;/pre&gt;&lt;/td&gt;&lt;td class=&quot;code&quot;&gt;&lt;pre&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;'yasnippet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;yas-global-mode&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nb&quot;&gt;require&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;'dropdown-list&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;setq&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;yas/prompt-functions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;'&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt; &lt;span class=&quot;nv&quot;&gt;yas/ido-prompt&lt;/span&gt;
                              &lt;span class=&quot;nv&quot;&gt;yas/dropdown-prompt&lt;/span&gt;
                              &lt;span class=&quot;nv&quot;&gt;yas/completing-prompt&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;yas/load-directory&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;~/.emacs.d/vendor/yasnippets-rails/rails-snippets&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nv&quot;&gt;yas/load-directory&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&quot;~/.emacs.d/vendor/yasnippets-shoulda&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;ol&gt;
  &lt;li&gt;完了.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;欢迎参考我的&lt;a href=&quot;http://github.com/lenage/emacs-config&quot;&gt;emacs-config&lt;/a&gt;&lt;/p&gt;

&lt;h3 id=&quot;known-issue&quot;&gt;Known issue&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;markdown-mode 下由于 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;TAB&lt;/code&gt; 被绑定到了 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;markdown-cycle&lt;/code&gt;上，所以无法展开snippets。
查看键绑定&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C-h k RET TAB&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
  &lt;p&gt;TAB runs the command markdown-cycle, which is an interactive compiled Lisp function in ‘markdown-mode.el’.&lt;/p&gt;
&lt;/blockquote&gt;
</content>
 </entry>
 
 <entry>
   <title>Linux Rename Multiple Files</title>
   <link href="http://blog.lenage.com/tech/2012/11/20/rename-multiple-file.html"/>
   <updated>2012-11-20T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2012/11/20/rename-multiple-file</id>
   <content type="html">&lt;p&gt;不是常用到会容易忘记，在这里记一下:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;rename 用法(Mac下需要先安装&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;brew install rename&lt;/code&gt;)&lt;/li&gt;
&lt;/ol&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;rename s/alice/bob/g &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;.html
rename oldname newname &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;.files&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;ol&gt;
  &lt;li&gt;用&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;find&lt;/code&gt;找出需要rename的文件，然后用&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;-exec&lt;/code&gt; 参数重命名，
比如将当前文件夹下面的说有html.erb文件改为html&lt;/li&gt;
&lt;/ol&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;    find &lt;span class=&quot;nb&quot;&gt;.&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-name&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;*html.erb&quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-exec&lt;/span&gt; rename s/html&lt;span class=&quot;se&quot;&gt;\.&lt;/span&gt;erb/html/ &lt;span class=&quot;o&quot;&gt;{}&lt;/span&gt; &lt;span class=&quot;se&quot;&gt;\;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;ol&gt;
  &lt;li&gt;搞完收工&lt;/li&gt;
&lt;/ol&gt;
</content>
 </entry>
 
 <entry>
   <title>Emacs 编辑远程文件</title>
   <link href="http://blog.lenage.com/tech/2012/08/24/emacs-editing-remote-file.html"/>
   <updated>2012-08-24T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2012/08/24/emacs-editing-remote-file</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://savannah.gnu.org/projects/tramp&quot;&gt;Tramp&lt;/a&gt; 是emacs下用来快速编辑远程文件的package, 用起来真的很方便:)
Emacs 24 内置 Tramp 所以不用配置就可以直接使用
&lt;img src=&quot;/assets/images/2012-08/tramp.png&quot; alt=&quot;build in screenshot&quot; /&gt;&lt;/p&gt;

&lt;p&gt;打开远程文件:
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C-x C-f /myserver:public_html/foo.html&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;或者&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C-x C-f /ssh:username@hostname:file&lt;/code&gt;
ps:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;myserver 是在.ssh/config 里面写好的server name&lt;/li&gt;
  &lt;li&gt;文件默认路径是~, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;:file&lt;/code&gt; 相当于 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;:~/file&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href=&quot;http://www.gnu.org/software/tramp/#Filename-Syntax&quot;&gt;更加全面的User Manual&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>书单</title>
   <link href="http://blog.lenage.com/startup/2012/08/14/what-are-most-read-book-written-by-successfully-enterprenurs.html"/>
   <updated>2012-08-14T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/startup/2012/08/14/what-are-most-read-book-written-by-successfully-enterprenurs</id>
   <content type="html">&lt;p&gt;来自qoura的这个&lt;a href=&quot;http://www.quora.com/Startups/What-are-some-must-read-books-written-by-successful-entrepreneurs&quot;&gt;问题&lt;/a&gt;,
里面列出了&lt;a href=&quot;http://sivers.org/book&quot;&gt;Derek Sivers的书单&lt;/a&gt;。&lt;/p&gt;

&lt;hr /&gt;
&lt;p&gt;Tue Aug 14 13:50:56 2012&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>为emacs 配置auto-complete</title>
   <link href="http://blog.lenage.com/tech/2012/08/13/config-auto-complete-in-emacs.html"/>
   <updated>2012-08-13T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2012/08/13/config-auto-complete-in-emacs</id>
   <content type="html">&lt;p&gt;早上写了一半又删掉了，因为写着写着突然感觉这么简单的问题大家都会懂，
但晚上又觉得还是要写出来， 仅仅作为记录。&lt;/p&gt;

&lt;p&gt;起初是使用smart-tab 这个函数&lt;a href=&quot;https://github.com/lenage/emacs-config/blob/master/lenage/tabs.el&quot;&gt;github连接&lt;/a&gt;来做补全的
一般情况下都是够用的， 直到后来ruby-mode只有indent没有补全(不知道是什么原因，求指点)，一定
是我打开的方式不对。于是安装了auto-complete：&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;install, 如果是&amp;gt;emacs24 的话，直接 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;M-x package-install RET auto-complete&lt;/code&gt;
PS: 没有实测，我自己是苦逼的 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;M-x package-list-packages&lt;/code&gt; 然后搜索 complete 安装的。&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;使用， 在&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;.emacs&lt;/code&gt; 添加&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;(require 'auto-complete)
(require 'auto-complete-config)
(ac-config-default)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;就能出现如下图的效果&lt;img src=&quot;http://cx4a.org/software/auto-complete/ac.png&quot; alt=&quot;效果图不是我的截图&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;然后想关掉popup的话 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;(setq ac-auto-show-menu nil)&lt;/code&gt;, 想在popup(严格的说是menu)上面使用
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C-n, C-p&lt;/code&gt;来选词的话, auto-complete的完整配置&lt;a href=&quot;https://github.com/lenage/emacs-config/blob/master/lenage/auto-complete.el&quot;&gt;在这里&lt;/a&gt;&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;(define-key ac-completing-map (kbd &quot;C-n&quot;) 'ac-next)
(define-key ac-completing-map (kbd &quot;C-p&quot;) 'ac-previous)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;要clone的话，&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git clone https://github.com/lenage/emacs-config.git ~/.emacs.d&lt;/code&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;hr /&gt;
&lt;p&gt;Update1: 在这里贴大段的代码还是很丑的，改用github文件连接
Update2: 更加详细的文档 http://cx4a.org/software/auto-complete/manual.html&lt;/p&gt;

&lt;p&gt;Mon Aug 13 22:49:49 2012&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>设置rails当运行rails g时默认生成sass文件</title>
   <link href="http://blog.lenage.com/tech/2012/08/12/use-sass-when-rails-g.html"/>
   <updated>2012-08-12T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2012/08/12/use-sass-when-rails-g</id>
   <content type="html">&lt;p&gt;sass-rails gem 默认生成scss文件，当运行rails g 命令的时候, 如果喜欢sass的语法的话
则需要每次都去&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;mv xxx.scss xxx.sass&lt;/code&gt;,只要在&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;config/application.rb&lt;/code&gt; 里面加入&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;config.sass.preferred_syntax = :sass
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;这样运行&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rails g&lt;/code&gt; 生成样式文件默认使用sass语法。&lt;/p&gt;

&lt;p&gt;last modify: Sun Aug 12 12:55:15 2012&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>URL schemes</title>
   <link href="http://blog.lenage.com/tech/2012/07/18/url-format.html"/>
   <updated>2012-07-18T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2012/07/18/url-format</id>
   <content type="html">&lt;p&gt;Most URL schemes base their URL syntax on this nine-part general format:
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;scheme&amp;gt;://&amp;lt;user&amp;gt;:&amp;lt;password&amp;gt;@&amp;lt;host&amp;gt;:&amp;lt;port&amp;gt;/&amp;lt;path&amp;gt;;&amp;lt;params&amp;gt;?&amp;lt;qu
ery&amp;gt;#&amp;lt;frag&amp;gt;&lt;/code&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>A route to get Rails info in devleopment</title>
   <link href="http://blog.lenage.com/tech/2012/06/16/get-rails-info.html"/>
   <updated>2012-06-16T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2012/06/16/get-rails-info</id>
   <content type="html">&lt;p&gt;在 development 环境下面， rails 会自动添加一条 ` match ‘/rails/info/properties’ =&amp;gt; “rails/info#properties”`
在路由里面。&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>emcas notes</title>
   <link href="http://blog.lenage.com/tech/2012/04/08/emacs-notes.html"/>
   <updated>2012-04-08T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2012/04/08/emacs-notes</id>
   <content type="html">&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Remove trailing whitespace&lt;/p&gt;

    &lt;ol&gt;
      &lt;li&gt;Enter PictureMide - &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;M-x picture-mode&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;Exit picture mode - &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C-c C-c&lt;/code&gt;&lt;/li&gt;
    &lt;/ol&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The only side effect of this is that all trailing whitespace is removed.
&lt;a href=&quot;http://www.emacswiki.org/emacs/PictureModeTrailingWhitespaceTrick&quot;&gt;Emacs Wiki&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Search and Replacing&lt;/p&gt;

    &lt;ol&gt;
      &lt;li&gt;When doing iseach. &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C-w&lt;/code&gt; adds the word folling point to the search buffer,
Very useful, &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;C-y&lt;/code&gt; adds the reset of current line to the search buffer
   2.&lt;/li&gt;
    &lt;/ol&gt;
  &lt;/li&gt;
&lt;/ul&gt;
</content>
 </entry>
 
 <entry>
   <title>Emacs Key Binding Tips</title>
   <link href="http://blog.lenage.com/2012/04/07/emacs-key-binding-tips.html"/>
   <updated>2012-04-07T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/2012/04/07/emacs-key-binding-tips</id>
   <content type="html">&lt;p&gt;Emacs Key Bindings: C-h C-h and see all Help option or C-h b see this&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;    C-x f           search recent file
    C-h c C-p       display a very brief descrition of the command
    M-g-g           Go to line
    C-o or C-j      Open a new line on the top of current line and move cursor to newline / insert newline above
    C-x C-=         Zoom out / enlarge font
    C-x C--         Zoom in
    C-x C-0         default
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

</content>
 </entry>
 
 <entry>
   <title>Yesod</title>
   <link href="http://blog.lenage.com/tech/2012/04/06/yesod-how-to.html"/>
   <updated>2012-04-06T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2012/04/06/yesod-how-to</id>
   <content type="html">&lt;ol&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;cabal install yesod&lt;/code&gt;&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;yesod init&lt;/code&gt; and type your name (for LICENSE file) and project name&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;That’s it! I’m creating your files now…&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; Generating deploy/Procfile
 Generating config/sqlite.yml
 Generating config/settings.yml
 Generating main.hs
 Generating devel.hs
 Generating yepod.cabal
 Generating yepod.cabal
 Generating .ghci
 Generating LICENSE
 Generating Foundation.hs
 Generating Import.hs
 Generating Application.hs
 Generating Handler/Home.hs
 Generating Model.hs
 Generating Settings.hs
 Generating Settings/StaticFiles.hs
 Generating static/css/bootstrap.css
 Generating templates/default-layout.hamlet
 Generating templates/default-layout-wrapper.hamlet
 Generating templates/homepage.hamlet
 Generating config/routes
 Generating templates/homepage.lucius
 Generating templates/homepage.julius
 Generating config/models
 Generating messages/en.m
 Generating tests/main.hs
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Sun Apr  8 21:19:04 2012&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Generate ruby(ri) docs</title>
   <link href="http://blog.lenage.com/tech/2012/03/14/generate-ri-doc.html"/>
   <updated>2012-03-14T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2012/03/14/generate-ri-doc</id>
   <content type="html">&lt;p&gt;如果&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ri Array&lt;/code&gt;的时候提示&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Nothing known about Array&lt;/code&gt;, 那么&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;rvm docs generate&lt;/code&gt; 之后等10分钟
就能看到了：&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-sh&quot; data-lang=&quot;sh&quot;&gt;~ ➤ rvm docs generate
    Generating ri documentation, be aware that this could take a &lt;span class=&quot;k&quot;&gt;*&lt;/span&gt;long&lt;span class=&quot;k&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nb&quot;&gt;time&lt;/span&gt;, and depends heavily on your system resources...
    &lt;span class=&quot;o&quot;&gt;(&lt;/span&gt; Errors will be logged to /Users/lenage/.rvm/log/ruby-1.9.3-p125/docs.log &lt;span class=&quot;o&quot;&gt;)&lt;/span&gt;

~ ➤ &lt;span class=&quot;nb&quot;&gt;tail&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;-f&lt;/span&gt; /Users/lenage/.rvm/log/ruby-1.9.3-p125/docs.log
    Generating RI format into /Users/lenage/.rvm/rubies/ruby-1.9.3-p125/share/ri/1.9.1/site...
    Generating Darkfish format into /Users/lenage/.rvm/docs/ruby-1.9.3-p125/rdoc..&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

</content>
 </entry>
 
 <entry>
   <title>如何隐藏terminal的TabBar</title>
   <link href="http://blog.lenage.com/tools/2012/03/08/how-to-hide-terminal-tab-bar.html"/>
   <updated>2012-03-08T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tools/2012/03/08/how-to-hide-terminal-tab-bar</id>
   <content type="html">&lt;p&gt;这确实是个技术活,用tmux的时候上面还有tab是非常不爽的，用了iterm，但是iterm实在是不想说什么了，
于是找到了这个： &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;defaults delete com.apple.Terminal ShowTabBar&lt;/code&gt;, 然后重启， done&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>终端下获得图片大小</title>
   <link href="http://blog.lenage.com/tech/2012/02/28/first-blog-in2012.html"/>
   <updated>2012-02-28T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2012/02/28/first-blog-in2012</id>
   <content type="html">&lt;p&gt;以前在mac下想知道图片的大小一般是:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;1. cd 到图片目录或者open /dirname/images
2. 然后选中通过command+i,看大小信息
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;但是这样太不awesome了,离开终端就不爽,于是用&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;file&lt;/code&gt; 命令吧&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[man file](http://man.he.net/?topic=file&amp;amp;section=all)
file amb_quote_bg.png
amb_quote_bg.png: PNG image data, 286 x 173, 8-bit/color RGBA, non-interlaced
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Awesome!
–EOF–&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Thinning Text in webkit</title>
   <link href="http://blog.lenage.com/tech/2011/12/21/thinning-text-in-webkit.html"/>
   <updated>2011-12-21T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2011/12/21/thinning-text-in-webkit</id>
   <content type="html">&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;body { -webkit-font-smoothing: antialiased; }
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;There you go. Simply add that to your css file. Change the selector, if you need, and put your type on a diet.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>lame-input.wav output.mp3</title>
   <link href="http://blog.lenage.com/tech/2011/11/23/lame-input-wav-output-mp3.html"/>
   <updated>2011-11-23T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2011/11/23/lame-input-wav-output-mp3</id>
   <content type="html">&lt;p&gt;LAME 32bits version 3.99.1 (http://lame.sf.net)&lt;/p&gt;

&lt;p&gt;###usage: 
  lame [options] infile [outfile]&lt;/p&gt;

&lt;p&gt;infile and/or outfile can be “-“, which means stdin/stdout.&lt;/p&gt;

&lt;p&gt;RECOMMENDED:&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;lame -V2 input.wav output.mp3&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;OPTIONS:
    “–preset help” gives more info on these
    –help id3      ID3 tagging related options
    –longhelp      full list of options
    –license       print License information&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>找到Mac中的中文字体</title>
   <link href="http://blog.lenage.com/tech/2011/11/20/find-chinese-font-name-on-mac.html"/>
   <updated>2011-11-20T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2011/11/20/find-chinese-font-name-on-mac</id>
   <content type="html">&lt;p&gt;和linux下差不太多，用&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;fc-list :lang=zh&lt;/code&gt; 既可以看到系统所有的中文字体,
另外, 折腾了一个Tex中文简历模版，在moderncv的基础上稍作整理，
&lt;a href=&quot;http://github.com/lenage/resume&quot;&gt;链接&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>git filter-branch</title>
   <link href="http://blog.lenage.com/tech/2011/11/19/git-filter-branch.html"/>
   <updated>2011-11-19T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2011/11/19/git-filter-branch</id>
   <content type="html">&lt;p&gt;需求: 在某次不小心将超大的文件加入了Git，或者deatabase.yml 等不想公开的文件，虽然在后面
的提交中删除了文件，但在git的历史记录中还是存在的。&lt;/p&gt;

&lt;p&gt;要删除它，可以使用&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git filter-branch&lt;/code&gt; 命令
&lt;a href=&quot;http://stackoverflow.com/questions/4444091/git-filter-branch-to-delete-large-file&quot;&gt;link1&lt;/a&gt;
比如要删除以前用来测试的sql文件 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git filter-branch --index-filter 'git rm --cached --ignore-unmatch *.sql' HEAD&lt;/code&gt;
更多内容请看 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git help filter-branch&lt;/code&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>youtube  500 page</title>
   <link href="http://blog.lenage.com/tech/2011/10/04/youtube-500.html"/>
   <updated>2011-10-04T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2011/10/04/youtube-500</id>
   <content type="html">&lt;p&gt;500 Internal Server Error&lt;/p&gt;

&lt;p&gt;Sorry, something went wrong.&lt;/p&gt;

&lt;p&gt;A team of highly trained monkeys has been dispatched to deal with this situation.&lt;/p&gt;

&lt;p&gt;If you see them, show them this information:&lt;/p&gt;

&lt;p&gt;sYWsfefBR4btz7vnFdAfX4Tv7cCAe4qgkuqefoMX6dbjQ8LipcXmrVZ1ZL0x
c4SkmPlghfsep6U4kXRpbCKOHUQoMA6sFswg_7Yi54a1C4&lt;em&gt;5gBGfnU3rsMPv
v_pnY1afq7vm5G5z95bi7J5RLz4TXHc1vM8bt0PaXYDuaI-SnTVR2L7k9bo7
0xS5NiFPElcANf8VYYVOwB5DpgMuUp2X3Dp2KFKC8p2riDDNS4wv60n1qQGi
NB6E9gdj0U-uiComswNqA2dR0gxqRZQ2m2looo_Ot3i4wg_kZdNdWeScysZP
diieJV7dslEZ74KvxeC-unfqCiXDHu37EgoJU7bsOkaZG6G2yRWhrdqy5u7Z
9SdPU6d5xIeSD60AIe7HvJMs84sO5Euveq6j4w8VaoSvcAo5ass0aUoLecXw
SFSb7oIvwtnP8hC4GzpX8e7IgcCbbGlKMad0YgA3JwAQQlQ7ady1i63QSBhm
yqT40mt7yX1Dg9XypjVHT2dvlY8flRHgYhkJloMmzwLC2D_bfFQH7oEM1f2i
Er2wJSr2eWAH8DPdhL0TwkmA2PqzhW6cAXemAov1Q4VTxsVhzFqY8lLTMZRa
mXDB0bHi_j52-Cb6-NH-bGT4baqRrRtxVQzWT74llWYIZKoTvaGSFf0sSiwq
pzsVHeKW3229Mk2h-zIK7dXrg_2Q0BmEBgutpyB6IA7RoTrHF31CGMBZPM9T
3qkPb3TwXA8Tbbi4LzrXfspmJ1THQFgB0RzswpL4Od0A3YUYSuMciBpyBqWd
1Z8RKup8GGG2re4cssTrXjbxOXlQWpf3ZBycDnO7VLpxzrhQQceFTRoHiNz&lt;/em&gt;
CyPsTwtaIJvKin4OvL8ZyMu9ju-IlhfzdKLlQ6JAXXWyGPRa07Kj38QCVGB4
zZ0gZn3jZq3kleXXFy7CQrPyTRbnorcFA_UiFplWOMKzoE0QZYuPQi6SLXRZ
rCgMUyXBHCy8lY–2Wa5x3z6Fhq7h7CzfsKJz8kjtF5NkcPFVbtIFKUkk5Fw
AfvX9zFQJDiKhOZhZFfgWKGS-MdL_-Yqn4tkRkomqaDivBIFkqEImCFh88Xg
5bicDjaRfgkeF8xAWG-3h8iWXyDJ7EpdraAon43wG0anOLmyryDrjHjuOyZm
w_R7aiHWt2UDZVjTZPVPhHvkQr9DmdgWx1AgUciYk3-PVZsq3EolH5S3GGEO
lDLJZEV3WV-V0j6bTD-62yBtIIYrqQsxALbEDBsstRiMaKzM6s6bLa5lAqn_
wcaqnlyJwPJJzps8PiSo2fdj6Tvpbp_53cf3PE6GbmT1bsugLWdE2K-078R6
oUkRYlLmlSxzXRR9a1q0Ow3p8jz1fTOV19w13w41kzrVR07whAmvdcr0YlCO
KbZkExgwTBfBEDqRt3wi-yV2OqGbDLrsiRpn4LLoozUyLnqqOHPIUsVgjl2M
509ANhIJEd8W2v1PzOjMu8jkry8ea0en-Ow3RuwGFVy0EWUQpOrn_0PTyc8y
48t8Of8f-LnR3sQ2jtwSQs1SUncDVzT_VP24s47Caw0qzh6xfs-kP9GIPvjJ
mjfciLfrDTtij_HnHO9ZsDy2L1Yt36TBm-3blrGHtR2maJpHIkR11lYy2ZtV
TZV4NVfeoIZFZye2hquF5S35CBTrZileBvGByhjA8LmCxTfizYEF5nISB5YF
Zil_yWyrQ1NOdtQiJa61L8my6mWhs4wiuxxgIY5WnW4kRGoLeRfcDeyJ9ZAl
xRAjDRwsFWbARSBNwsw3L0NkzzdizbYNY2716r7PPBCSAUyPS–UhOxHfGTn
-Woy7t6bxPTXliQOYJZlreK8kUIqBGq3HXctn1YpGknJC8xaryyg4&lt;em&gt;aYW7Ov
ZEm4GL78AUcFgw4YqQhDJNhqF9qXNSyZNZ2G-NFRcxeJ_0r1gFuRwRX4SRJI
CHveAdSrIDk8dbUKr6xejhZPLj3JYYjeRt5UOxnXvXDgZyHbKkIeQT7mc2en
Gdh9A8q_maCMkBVNzw6fTpSKcl5RyzxyUlZUMZHhuNcbAA0Akb6mQYT7xVLN
wbm3TYs0uOd7lyLjO4lnksJWZfmKhkB3k8HW3OCwX3MZ3SSEzG70A_Lh_C2K
AFnCky7KqZoUxwsC0z3y0CmJeheOtpc68rOG7F6YpECtwxqYF09B_y0kIxGL
BEBrGCtGn4qKCqvWAXwV-5Mdn2ncwYkGRUqyB5i2l5PZQyjQIH-p_DQ5kCUE
jQnOvTSHw5U1ofjJY4FIm9OWlLBFmoVtwy_xefp4XB1R0cMdUqHjoDkkecVM
cxn4tBWh5y3t0KUVQPQuOMNwYJFEsjAB0Rx2SiLQ93nqPVM83YQR_O0-kX6Y
eq24LT7CfXEj8sVzoZGNd-4VzgouLqxb5tHsJeGabHuJlAlLMh8QRHi3x6eV
N7w7aHXRMAx_lOgC0ZzCs4wm1d-M6M6–dw3vLcqpJi72-n4dVebcdmxUSvW
lO9waE3ZAlJi9gL1EIoQQJJcAR4&lt;/em&gt;-hR9vOhqViAQQL2fQW06kfNDHPzSgz2b
eQRvZ4E-OuEjAuSXZtp7S5OLQ6t0sUy6asOMOnTLY2u59zOqhYvii83_7OMr
iiBpmijkJ9A-UDUOMf1U6Clo4bUx3M-KzgIdgmktv-ZoL8fe47TQlPNHIjRD
LTR5mfz14OcRI0vyqzFpzC3NB8teJx0N2xD-DGwfUfK-TEJ7Ct4zrvkTSFs=&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>vim小指南</title>
   <link href="http://blog.lenage.com/tech/2011/09/21/what-is-the-vim-feature-you-use.html"/>
   <updated>2011-09-21T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2011/09/21/what-is-the-vim-feature-you-use</id>
   <content type="html">&lt;p&gt;这篇文章是关于stackoverflow上&lt;a href=&quot;http://stackoverflow.com/questions/80386/what-is-the-vim-feature-that-you-like-the-most&quot;&gt;what is the vim feature that you like the most&lt;/a&gt;
的总结，有很多非常有用的feature:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[ shift + i&lt;/code&gt; 查看当前文件中当前光标下出现的所有词，比如你想知道该单词
是否唯一则不用&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;/xxxxx&lt;/code&gt;搜索，而是直接&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;[ shift+i&lt;/code&gt;就可以搞定。&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dat/dit&lt;/code&gt; tag-block motions,比如在编辑html或xml时，&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dit&lt;/code&gt;可以删除包含在标签
里面的内容，&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dat&lt;/code&gt;可以删除当前光标下的标签。&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;:tabe&lt;/code&gt; 直接在新的tab里面打开文件，比平时先新建tab然后在&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;:e&lt;/code&gt;方便多了。&lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;d[number]d&lt;/code&gt; 删除多行&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Text Object(type :h text-objects)&lt;/code&gt; 可以让你多光标所在位置的整个区块操作，
如:可以使用&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;d&lt;/code&gt;或者&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;c&lt;/code&gt;，后面跟&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;i&lt;/code&gt;或者&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;a&lt;/code&gt;(inside a block or a whole block)加区块
符号如&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;{(&amp;lt;&quot;pw&lt;/code&gt;，其中&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;p&lt;/code&gt;是指整个段落，&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;w&lt;/code&gt;是指一个单词。&lt;/p&gt;

    &lt;ul&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ca{&lt;/code&gt;  :Delete a block of code delimited by curly braces.&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ci(&lt;/code&gt;  :Change the content inside parenthesis.&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;ci&quot;&lt;/code&gt;  :Change the content inside a String&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;da&amp;lt;&lt;/code&gt;  :Delete an html tag&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;dap&lt;/code&gt;  :Delete current paragraph (handy to delete a whole function)&lt;/li&gt;
      &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;daw&lt;/code&gt;  :Delete a word&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;w/])&lt;/code&gt; 移动，&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;w&lt;/code&gt;可以以单词为单位移动，&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;]&lt;/code&gt;是以section为单位移动，&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;)&lt;/code&gt;以句子为单位
移动。&lt;/li&gt;
&lt;/ol&gt;
</content>
 </entry>
 
 <entry>
   <title>这些学理工的</title>
   <link href="http://blog.lenage.com/life/2011/09/20/send-you-a-bullet-notes.html"/>
   <updated>2011-09-20T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/life/2011/09/20/send-you-a-bullet-notes</id>
   <content type="html">&lt;blockquote&gt;
  &lt;p&gt;最近有一个中国人搬了进来，他住在靠门的一个房间，我是路过他的房门口，听见他的中文
  电视声音，判断出来的。&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;有一天,我在走廊里碰见他，高高的个子，但脸庞还是很稚气，大约是刚搬来的，我直视着他，
  脸上准备好了热气腾腾的笑容，但他低着头，旁若无人的从身边走过去了。&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
  &lt;p&gt;这孩子，我有些气恼的想，肯定是学理工的。&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;嗯，这孩子肯定是学理工的……..&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>Note:Cooking up a Cloud with Chef &amp;EC2</title>
   <link href="http://blog.lenage.com/tech/2011/09/19/wirte-this-for-chef-and-ec2.html"/>
   <updated>2011-09-19T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2011/09/19/wirte-this-for-chef-and-ec2</id>
   <content type="html">&lt;p&gt;很久没写了，这篇上来也是充数的，关于chef和EC2教程的笔记，教程可以在SD RUBY
cast 上找到，chef是一个配置管理工具，EC2就是EC2,&lt;a href=&quot;http://wiki.opscode.com/display/chef/Home/&quot;&gt;chef的wiki&lt;/a&gt;
有更详细的资源介绍。&lt;/p&gt;

&lt;p&gt;btw:最近懒的要死，这难道就是传说中的秋乏么？&lt;/p&gt;

&lt;p&gt;2011-09-19&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>床笫之间</title>
   <link href="http://blog.lenage.com/life/2011/08/25/in-between-the-sheets.html"/>
   <updated>2011-08-25T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/life/2011/08/25/in-between-the-sheets</id>
   <content type="html">&lt;p&gt;你难道不想在床笫之间,有自己的一番天地?&lt;/p&gt;

&lt;p&gt;去年在豆瓣图书的首页看到过这本书,想买但是没买,codecamp回来之后和同事逛&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;晓风的书店&lt;/code&gt;,看到这本
在书店读了大概８０％的样子,只有213,后面译者的序中还有对该书的总结性语句,基本上直接读后面的
内容就能知道前面讲的是什么东西.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;色情&amp;gt;&lt;/code&gt;关于一个男人乱搞得病而被护士和护士长绑在床上做手术的故事,男主是一个果敢的汉子,有两个
情人–护士保琳和护士长(姑且就这么叫着吧)露西,一个是萝莉一个是女王,按照情节来讲护士长是女王,
在&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;色情&lt;/code&gt;中也是亦然,露西喜欢玩花样….刚开始就讲男主得了淋病,后来和谐的被情人发现绑在了床上
开始了3P的生活.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;一头宠猿的遐思&amp;gt;&lt;/code&gt;基本上属于人兽恋,当然作者是从猿猴的角度去写,怎样喜欢女主人怎样打算讨好之类的
,要是发在天涯这种地方估计很火爆,大家还记得从前有个女子很寂寞于是就养了一条狗的故事吧.&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;既仙既死&amp;gt;&lt;/code&gt;很爽的名字,却将一个商人和一个模特的故事(是那种摆在橱窗里的模特,不是淘宝模特频道的那些妹子)
说这男的在事业上很成功,在家庭上不怎么样,喜欢做完爱就睡觉不说话的女人,最后还怀疑该模特和司机有染,太差劲了
果然性能力对成功的男人来说很是重要.&lt;/p&gt;

&lt;p&gt;总之,书中基本上将SM,MS,人兽,变态,同性,恋童…全部写了一边
&lt;img src=&quot;http://img3.douban.com/lpic/s4568961.jpg&quot; alt=&quot;床第之间&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://book.douban.com/subject/5043526/&quot;&gt;链接&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;PS:在豆瓣直接搜是搜不到这本书的,至于你有没有搜到,反正我是没搜到,后来还是通过输入ISBN码找到的,阿北,你是要闹
那样啊?&lt;/p&gt;
&lt;/blockquote&gt;
</content>
 </entry>
 
 <entry>
   <title>小清新哦,亲</title>
   <link href="http://blog.lenage.com/life/2011/08/24/samll-smell.html"/>
   <updated>2011-08-24T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/life/2011/08/24/samll-smell</id>
   <content type="html">&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;git reset&lt;/code&gt;的时候乱用　&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;--hard&lt;/code&gt;　参数很蛋疼,是一个非常不好的习惯,昨晚通宵修改的文件,&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;commit&lt;/code&gt; 之后妥妥的
打算睡觉,结果悲剧的误删了一个文件,更加悲剧的是误删之后没有发现,还很happy的提交了,于是接下来的事情才是正
正的悲剧,往事不堪回首,日明中,等我找到恢复方法再更新此文.&lt;/p&gt;

&lt;p&gt;附上乌镇妹子做船头照片一张:
&lt;img src=&quot;https://lh6.googleusercontent.com/-YQr7UTdnRmo/Tk8EJkyIORI/AAAAAAAAA6I/D1shy_LFE5I/s720/C360_2011-08-20%2B08-49-54.jpg&quot; alt=&quot;妹妹坐船头哥哥岸上走&quot; /&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Programming Ruby notes0000</title>
   <link href="http://blog.lenage.com/tech/2011/08/11/ruby-tips000.html"/>
   <updated>2011-08-11T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2011/08/11/ruby-tips000</id>
   <content type="html">&lt;ol&gt;
  &lt;li&gt;Symbols are simple constant names that you don’t have to predeclare and 
  that are guaranteed to be unique.&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Symbols are so frequently used as hash key that Ruby 1.9 introduces
  a new syntax you can use name: value pairs to create a hash if the 
  key are symbols:&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;inst_section = {
  cello: 'sting',
  clarinet: 'woodwind',
  drum:     'Programming'
}
puts &quot;An oboe is a #{inst_section[:cello]}&quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;&lt;em&gt;produces:&lt;/em&gt;&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;An oboe is a sting
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Command-line Arguments:&lt;/p&gt;

    &lt;p&gt;when you run a ruby program from the command line, you can pass in 
 arguments.These are accessible in two different ways.&lt;/p&gt;

    &lt;p&gt;First.the array ARGV contains each if the arguments passed to the running
 program.Create a file called cmd_line.rb that contains the following:&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;   puts &quot;You gave #{ARGV.size} arguments&quot;
   p ARGV  when we run it with arguments,we can see that they get passed in:

   $ ruby cmd_line.rb ant bee cat dog  *produces*

   You gave 4 arguments
   [&quot;ant&quot;,&quot;bee&quot;,&quot;cat&quot;,&quot;dog&quot;]  Often,the agruments to a program are the names of files that you want  to process.In this case, you can use a second technique: the variable   ARGF is a special kind of I/O object that acts like all the contents  of all the files whose names are passed on the Command line.
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ol&gt;
</content>
 </entry>
 
 <entry>
   <title>曾经带给我快乐的人,说的话比冰块还要冷</title>
   <link href="http://blog.lenage.com/life/2011/07/25/lycris.makrdown"/>
   <updated>2011-07-25T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/life/2011/07/25/lycris</id>
   <content type="html">RT.
</content>
 </entry>
 
 <entry>
   <title>到杭州了</title>
   <link href="http://blog.lenage.com/life/2011/06/21/new-job-new-point.html"/>
   <updated>2011-06-21T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/life/2011/06/21/new-job-new-point</id>
   <content type="html">&lt;p&gt;//心想事成法则什么的最灵验了//&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>偶然去了趟金华</title>
   <link href="http://blog.lenage.com/life/2011/05/28/finally-arrived-in-jinhuawest.html"/>
   <updated>2011-05-28T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/life/2011/05/28/finally-arrived-in-jinhuawest</id>
   <content type="html">&lt;h4 id=&quot;01冲动&quot;&gt;01.冲动&lt;/h4&gt;
&lt;p&gt;有些事，现在不做，以后就在也没有机会了，在一个百无聊赖的下午经过火车票代售点的时候突然又了去金华的想法，而且在简单思考之后觉得靠谱，可惜方式没带钱包，于是回家–拿钱–买当天的车票–通知猫控，一气呵成没有含糊，决定来的太突然还没有好好体会。&lt;/p&gt;

&lt;h4 id=&quot;02火车&quot;&gt;02.火车&lt;/h4&gt;
&lt;p&gt;每次坐火车都很无聊，要知道12个小时也好24个小时也罢，纵然只有1个小时，
 对于一个满怀思恋的人来讲都是那么的长。
 这次是在火车的最后一节车厢，透过最后的车门能看到逐渐远去的铁轨，可惜后门的
玻璃上满是污点，根本看不清楚什么。如图 &lt;img src=&quot;http://blog.lenage.com/assets/images/2011-05-28/trian.jpg&quot; alt=&quot;alt 透过最后一节车厢车门看铁轨&quot; /&gt;&lt;/p&gt;

&lt;h4 id=&quot;03鸽子肉真的很好吃&quot;&gt;03.鸽子肉真的很好吃&lt;/h4&gt;
&lt;p&gt;除了见到猫之外，还要提的就是鸽子肉真的很好吃。btw.猫在家的时候最漂亮了。&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Complexity Graphics</title>
   <link href="http://blog.lenage.com/beauty/2011/05/26/complexity-graphics.html"/>
   <updated>2011-05-26T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/beauty/2011/05/26/complexity-graphics</id>
   <content type="html">&lt;p&gt;信息可视化(Information visualization)是一个跨学科领域，旨在研究大规模非数值型信息资源的视觉呈现，如软件系统中众多的文件或者一行行的程序代码，一级利用图形图像方面的技术与方法，帮助人们理解和分析数据，与科学可视化相比，信息可视化则侧重于抽象数据集（via &lt;a href=&quot;http://zh.wikipedia.org/wiki/%E4%BF%A1%E6%81%AF%E5%8F%AF%E8%A7%86%E5%8C%96&quot;&gt;wikipedia&lt;/a&gt;）&lt;/p&gt;

&lt;p&gt;和分形图形一样，可视化的图片美的让人没有抵抗力，如
&lt;a href=&quot;http://www.complexitygraphics.com/&quot;&gt;可视化之美&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>生活中的惊喜</title>
   <link href="http://blog.lenage.com/life/2011/05/25/douban-minsite-suprise.html"/>
   <updated>2011-05-25T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/life/2011/05/25/douban-minsite-suprise</id>
   <content type="html">&lt;p&gt;生活之所以精彩是因为有惊喜的存在，常听豆瓣电台，懒得去下一首，只是不断的播放。&lt;/p&gt;

&lt;p&gt;偶尔有广告，不是很讨厌但也没有很喜欢。&lt;/p&gt;

&lt;p&gt;只到听到&lt;a href=&quot;http://site.douban.com/msr/&quot;&gt;陌生人&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;温暖的声音，轻声细雨。&lt;/p&gt;

&lt;p&gt;听了会上瘾的声音。&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;更新：好吧，我只喜欢朵拉的声音&lt;/p&gt;
&lt;/blockquote&gt;
</content>
 </entry>
 
 <entry>
   <title>使用gnuplot画莫比乌斯带和克莱因瓶</title>
   <link href="http://blog.lenage.com/2011/05/17/use-gnuplot.html"/>
   <updated>2011-05-17T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/2011/05/17/use-gnuplot</id>
   <content type="html">&lt;p&gt;gnuplot是linux下开源的数学绘图软件-&lt;a href=&quot;http://zh.wikipedia.org/wiki/Gnuplot&quot;&gt;详细介绍&lt;/a&gt;–&lt;a href=&quot;http://gnuplot.sourceforge.net/&quot;&gt;项目主页地址&lt;/a&gt;,使用它可以绘制出精美优雅的函数图形，并可以输出成多种格式供其他程序使用。&lt;/p&gt;

&lt;p&gt;1.安装&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Archlinux:sudo pacman -S gnuplot
ubuntu : sudo apt-get install gnuplot
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;2.使用
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;$ gnuplot&lt;/code&gt; 
即可进入gnuplot 命令行界面。这里有一个10min&lt;a href=&quot;http://people.ofset.org/~ckhung/b/ma/3dsurf.php&quot;&gt;教程&lt;/a&gt;，欢迎参考。&lt;/p&gt;

&lt;p&gt;3.绘制莫比乌斯带&lt;a href=&quot;http://zh.wikipedia.org/wiki/%E8%8E%AB%E6%AF%94%E4%B9%8C%E6%96%AF%E5%B8%A6&quot;&gt;维基百科&lt;/a&gt;和克莱因瓶&lt;a href=&quot;http://zh.wikipedia.org/wiki/%E5%85%8B%E8%8E%B1%E5%9B%A0%E7%93%B6&quot;&gt;维基百科&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
  &lt;p&gt;&lt;a href=&quot;http://roman.mainer.de/math/gnuplot/playground/&quot;&gt;代码链接&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
</content>
 </entry>
 
 <entry>
   <title>github上的第一篇博客</title>
   <link href="http://blog.lenage.com/2011/05/12/test.html"/>
   <updated>2011-05-12T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/2011/05/12/test</id>
   <content type="html">&lt;p&gt;每次要到写博客的时候，突然发现一点都写不出来，生活中也没有什么好写的，当然这一篇完全是为了测试而写的。&lt;/p&gt;

&lt;p&gt;test&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>开篇志</title>
   <link href="http://blog.lenage.com/2011/05/12/first-blog.html"/>
   <updated>2011-05-12T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/2011/05/12/first-blog</id>
   <content type="html">&lt;p&gt;灵感这东西不记录就没有了；生活也是，需要认真的记录。&lt;/p&gt;

&lt;p&gt;最近几天：&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;上次archlinux升级中因没插电源中断之后重新安装，比以前好用多了；&lt;/li&gt;
  &lt;li&gt;昨天安装了gnome3，但是今天凌晨又卸载了，还是不喜欢厚重的感觉；&lt;/li&gt;
  &lt;li&gt;现在使用openbox，动画效果用xcompmgr，阴影和淡入淡出效果还能接受；&lt;/li&gt;
  &lt;li&gt;分形图真的很美，在linux可以使用 flam3绘制；&lt;/li&gt;
&lt;/ol&gt;

</content>
 </entry>
 
 <entry>
   <title>不如不见</title>
   <link href="http://blog.lenage.com/life/2011/05/01/bu-ru-bu-jian.markdowm"/>
   <updated>2011-05-01T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/life/2011/05/01/bu-ru-bu-jian</id>
   <content type="html">&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-css&quot; data-lang=&quot;css&quot;&gt;&lt;span class=&quot;nt&quot;&gt;头沾湿无可避免&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;伦敦总依恋雨点&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;乘早机忍耐着呵欠&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;完全为见你一面&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;寻得到尘封小店&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;回不到相恋那天&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;灵气大概早被污染&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;谁为了生活不变&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;越渴望见面然后发现&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;中间隔着那十年&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;我想见的笑脸只有怀念&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;不懂怎去再聊天&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;像我在往日还未抽烟&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;不知你怎么变迁&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;似等了一百年忽已明白&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;即使再见面&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;成熟地表演&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;不如不见&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;
</content>
 </entry>
 
 <entry>
   <title>一些有用的linux命令</title>
   <link href="http://blog.lenage.com/tech,%20blog/2011/04/07/some-usefull-linux-command.html"/>
   <updated>2011-04-07T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech,%20blog/2011/04/07/some-usefull-linux-command</id>
   <content type="html">&lt;p&gt;linux下的一些命令记录：有些命令可能在安装好系统之后再也不会用到，但需
要的时候却经常想不起来，在这里记录一下，以备后用，语言描述不准确指出
还望指正。&lt;/p&gt;

&lt;p&gt;1.xev:运行一个gtk窗口，并在终端输出按键输入时的反馈，可以用来测试笔记
  本上的多媒体按键是否被内核支持；
2.&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;sed -i “s/A/B/g” grep A -rl yourdir&lt;/code&gt; :用sed将youdir目录下所有
  文件中的A字符替换为B字符；
3.tmux ：和screen相当的终端多个screen显示程序，可以在屏幕下端显示窗口
  列表（screen不会），不知道怎么使用？ man一下
4.gmrun :在openbox下提供和gonme-do一样的alt+f2功能。
5.flexget :archlinux下载podcast的工具，使用yaourt安装。&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>archlinux+openbox使用笔记本的多媒体键</title>
   <link href="http://blog.lenage.com/tech/2011/04/07/setting-laptop-mutli-media-botton-on-archlinux.html"/>
   <updated>2011-04-07T00:00:00+00:00</updated>
   <id>http://blog.lenage.com/tech/2011/04/07/setting-laptop-mutli-media-botton-on-archlinux</id>
   <content type="html">&lt;p&gt;需要说明的是：这里指的多媒体键是指，笔记本上除Fn+*之外的独立按键，一般用来静音，加大减小音量，打开DVD光驱等。&lt;/p&gt;

&lt;p&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;PC：cq45-203tx&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;背景：之前用ubuntu+gnome的时候快捷键有效，切换到archlinux+openbox后快捷键失灵，只能用alsamixer调节音量，
安装过volwheel，但还是不好用，后来在#ubuntu-cn频道找到了解决办法，如下：&lt;/p&gt;

&lt;p&gt;1.确定内核是否支持，在终端中运行 xev，然后触摸按键，看输出：
    KeyRelease event, serial 40, synthetic NO, window 0×2600001,
    root 0x15a, subw 0×0, time 20902899, (240,92), root:(387,402),
    state 0×0, keycode 121 (keysym 0x1008ff12, XF86AudioMute), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False&lt;/p&gt;

&lt;p&gt;如果能得到如上的输出，你得到的不一定和我的完全一样，但至少要能在其中找到按键标识，即上面红色指出的部分。&lt;/p&gt;

&lt;p&gt;2.从上面的输出我们可以看出，该按键市静音按钮，用vim或者你喜欢的编辑器打开 &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;~/.config/openbox/rc.xml&lt;/code&gt;文件，
找到keybind部分；然后设置按键&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;XF86AudioMute&lt;/code&gt;运行&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;amixer sset Master,0 toggle：&lt;/code&gt;&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;keybind&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;key=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;”XF86AudioMute”&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;action&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;”Execute”&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;startupnotify&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;enabled&amp;gt;&lt;/span&gt;true&lt;span class=&quot;nt&quot;&gt;&amp;lt;/enabled&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;name&amp;gt;&lt;/span&gt;Audio mute&lt;span class=&quot;nt&quot;&gt;&amp;lt;/name&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/startupnotify&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;command&amp;gt;&lt;/span&gt;amixer sset Master,0 toggle&lt;span class=&quot;nt&quot;&gt;&amp;lt;/command&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/action&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/keybind&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;p&gt;3.用第一步的方法得到增大音量和减小音量的按键标识分别是&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;XF86AudioRaiseVolume&lt;/code&gt;和&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;XF86AudioLowerVolume&lt;/code&gt;；
分别绑定为&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;amixer sset Master 2%+&lt;/code&gt;（增加音量）&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;amixer sset Master 2%-&lt;/code&gt;（减小音量），如下：&lt;/p&gt;

&lt;figure class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;language-xml&quot; data-lang=&quot;xml&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;keybind&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;key=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;”XF86AudioMute”&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;keybind&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;key=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;”XF86AudioRaiseVolume”&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;action&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;”Execute”&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;startupnotify&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;enabled&amp;gt;&lt;/span&gt;true&lt;span class=&quot;nt&quot;&gt;&amp;lt;/enabled&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;name&amp;gt;&lt;/span&gt;Audio raise&lt;span class=&quot;nt&quot;&gt;&amp;lt;/name&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/startupnotify&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;command&amp;gt;&lt;/span&gt;amixer sset Master 2%+&lt;span class=&quot;nt&quot;&gt;&amp;lt;/command&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/action&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/keybind&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;keybind&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;key=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;”XF86AudioLowerVolume”&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;action&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;name=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;”Execute”&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;startupnotify&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;enabled&amp;gt;&lt;/span&gt;true&lt;span class=&quot;nt&quot;&gt;&amp;lt;/enabled&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;name&amp;gt;&lt;/span&gt;Audio lower&lt;span class=&quot;nt&quot;&gt;&amp;lt;/name&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/startupnotify&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;command&amp;gt;&lt;/span&gt;amixer sset Master 2%- &lt;span class=&quot;nt&quot;&gt;&amp;lt;/command&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/action&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/keybind&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/figure&gt;

&lt;ol&gt;
  &lt;li&gt;在终端中运行$-&amp;gt; &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;openbox –reconfigure done&lt;/code&gt;,现在可以享受快捷键带来的快感了。&lt;/li&gt;
&lt;/ol&gt;
</content>
 </entry>
 
</feed>
