<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>diudiutang (ForzaMilan)</title>
    <link>https://ruby-china.org/diudiutang</link>
    <description>a part of life</description>
    <language>en-us</language>
    <item>
      <title>百度知道 9 周年宣传页，似曾相识啊</title>
      <description>&lt;p&gt;百度知道迎来了 9 周年庆，然后就有了这个里程碑&lt;/p&gt;

&lt;p&gt;&lt;a href="http://zhidao.baidu.com/s/9-year/index.html" rel="nofollow" target="_blank"&gt;http://zhidao.baidu.com/s/9-year/index.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="https://l.ruby-china.com/photo/2014/accc25846757af87ab4bf4dbd719c7b7.png" title="" alt=""&gt;&lt;/p&gt;

&lt;p&gt;再次 &lt;code&gt;借鉴&lt;/code&gt; 了 &lt;a href="https://twitter.com/rleonardi" rel="nofollow" target="_blank" title=""&gt;Robby Leonardi&lt;/a&gt; 的简历 &lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.rleonardi.com/interactive-resume/" rel="nofollow" target="_blank"&gt;http://www.rleonardi.com/interactive-resume/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;img src="https://l.ruby-china.com/photo/2014/27c4fac4651da68ba4296b9ea5064af0.png" title="" alt=""&gt;&lt;/p&gt;

&lt;p&gt;他 twitter 上这句话挺逗的&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OMG!!! Baidu use my "face" in their page
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;img src="https://l.ruby-china.com/photo/2014/91e776ba7edaaa16698df897044246d6.png" title="" alt=""&gt;&lt;/p&gt;</description>
      <author>diudiutang</author>
      <pubDate>Thu, 27 Nov 2014 16:16:38 +0800</pubDate>
      <link>https://ruby-china.org/topics/22895</link>
      <guid>https://ruby-china.org/topics/22895</guid>
    </item>
    <item>
      <title>果然是悲剧了</title>
      <description>&lt;p&gt;好在还有备份，不至于全军覆没&lt;/p&gt;

&lt;p&gt;收藏的那几个 &lt;code&gt;难道你还没学xxx&lt;/code&gt; 也没了，非诚勿扰也没了&lt;/p&gt;</description>
      <author>diudiutang</author>
      <pubDate>Sat, 05 Jan 2013 17:07:11 +0800</pubDate>
      <link>https://ruby-china.org/topics/7747</link>
      <guid>https://ruby-china.org/topics/7747</guid>
    </item>
    <item>
      <title>发现个好玩的东东</title>
      <description>&lt;p&gt;昨天看 lolcat 这个 gem 的时候发现了这几个淡腾的东西&lt;/p&gt;

&lt;p&gt;&lt;img src="//l.ruby-china.com/photo/c27dc8c7fbc369f9274d51e2dc0b8664.png" title="" alt=""&gt;&lt;/p&gt;

&lt;p&gt;安装方法也很简单&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install fortune
gem install cowsay
gem install lolcat
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;fortune 随机输出一句话，cowsay 随机生成一个图像，lolcat 彩色打印&lt;/p&gt;

&lt;p&gt;输出看看吧&lt;/p&gt;</description>
      <author>diudiutang</author>
      <pubDate>Tue, 25 Sep 2012 10:14:39 +0800</pubDate>
      <link>https://ruby-china.org/topics/5736</link>
      <guid>https://ruby-china.org/topics/5736</guid>
    </item>
    <item>
      <title>github 改版样式你喜欢吗</title>
      <description>&lt;p&gt;&lt;a href="http://github.com" rel="nofollow" target="_blank"&gt;http://github.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;RT.  刚才上 github 发现改版了，首页 timeline 和个人页面大变样，&lt;/p&gt;

&lt;p&gt;timeline 感觉清爽多了，个人页面有点不喜欢，没有以前的直观&lt;/p&gt;</description>
      <author>diudiutang</author>
      <pubDate>Thu, 20 Sep 2012 13:24:51 +0800</pubDate>
      <link>https://ruby-china.org/topics/5654</link>
      <guid>https://ruby-china.org/topics/5654</guid>
    </item>
    <item>
      <title>第一页好多灰脸人士</title>
      <description>&lt;p&gt;RT.   第一页基本被无头像占领，招聘的，新来的，好歹弄个头像看着稍&lt;/p&gt;

&lt;p&gt;微正式点，不然看起来灰蒙蒙一片&lt;/p&gt;</description>
      <author>diudiutang</author>
      <pubDate>Wed, 05 Sep 2012 17:36:32 +0800</pubDate>
      <link>https://ruby-china.org/topics/5381</link>
      <guid>https://ruby-china.org/topics/5381</guid>
    </item>
    <item>
      <title>Rails 技巧之 tap &amp; try</title>
      <description>&lt;p&gt;&lt;a href="http://dayuan.im/blog/rails-tricks-about-tap-and-try.html/" rel="nofollow" target="_blank" title=""&gt;Rails 技巧之 tap &amp;amp; try&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;最近发现很多时候都要判断 nil , 用了很多三元表达式，写起来总是感觉很重复，想起来以前看过关于 tap 和 try 的相关技巧，论坛里一些高手肯定也经常使用这个技巧，无奈自己经验尚浅，到现在才开始使用，特地仔细学习了下，希望能给新手朋友一点帮助&lt;/p&gt;
&lt;h6 id="tap"&gt;tap&lt;/h6&gt;
&lt;p&gt;tap 和 try 是 Rails 开发过程中两个很常用的方法，在调试和写出简洁代码上有着不错的发挥&lt;/p&gt;

&lt;p&gt;从 tap 的 &lt;a href="http://www.ruby-doc.org/core-1.9.3/Object.html#method-i-tap" rel="nofollow" target="_blank" title=""&gt;Api&lt;/a&gt; 可以看出，tap 是 Object 的 instance_method，传递 self 给一个 block，最后返回 self.&lt;/p&gt;


&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="mf"&gt;1.9&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="n"&gt;p194&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mo"&gt;015&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="no"&gt;Object&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;instance_methods&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;grep&lt;/span&gt; &lt;span class="sr"&gt;/tap/&lt;/span&gt;
 &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:tap&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;tap&lt;/span&gt;     &lt;span class="c1"&gt;#tap 源码实现&lt;/span&gt;
  &lt;span class="k"&gt;yield&lt;/span&gt; &lt;span class="nb"&gt;self&lt;/span&gt;
  &lt;span class="nb"&gt;self&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;用途一：调试&lt;/strong&gt;。当你使用链式方法发生错误时，如果需要测试这个过程中哪出了问题，一般的做法是拆断这个方法，设置中间变量，接着测试中间变量是否正确，如果正确，则把变量换个地方继续测试，方法很长时就没法测了，当然 Ruby 为你想好了，有着优雅又简便的实现&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;%w(x y z).push('a').shift.upcase.next # =&amp;gt; "Y"

%w(x y z).push('a').shift.tap {|x| p x }.upcase.next
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;输出每步的结果看看&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(1..10)                .tap {|x| puts "original: #{x.inspect}"}
  .to_a                .tap {|x| puts "array: #{x.inspect}"}
  .select {|x| x%2==0} .tap {|x| puts "evens: #{x.inspect}"}
  .map { |x| x*x }     .tap {|x| puts "squares: #{x.inspect}"}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;用途二：简化代码&lt;/strong&gt;。我们构建一个方法想返回一个 String / Array / Hash 之类结果，一般的做法是先定义一个变量，结果把运算结果赋值给这个变量，接着返回变量，用 tap 一步搞定，其实就是源码意思的实现&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[].tap {|i| i &amp;lt;&amp;lt; "abc"}
''.tap {|i| i &amp;lt;&amp;lt; do_some_thing }
&lt;/code&gt;&lt;/pre&gt;&lt;h5 id="try"&gt;try&lt;/h5&gt;
&lt;p&gt;try 可以让你调用对象方法时不用担心对象是 nil 并抛出异常，依旧先看源码 (rails 3.2.8)&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def try(*a, &amp;amp;b)
  if a.empty? &amp;amp;&amp;amp; block_given?
    yield self
  else
    public_send(*a, &amp;amp;b) if respond_to?(a.first)
  end
end

def try(*args)
  nil
end
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;上面一个 try 是对 Object 的扩展，下面的是对 NilClass 的扩展，这就是为什么会 nil 不会抛出异常的原因，&lt;a href="https://github.com/rails/rails/blob/master/activesupport/lib/active_support/core_ext/object/try.rb" rel="nofollow" target="_blank" title=""&gt;源码&lt;/a&gt; .&lt;br&gt;
try 如果只接受 block 则传递 self 给 block，返回 block 执行后的结果，否则就执行
&lt;a href="http://www.ruby-doc.org/core-1.9.3/Object.html#method-i-public_send" rel="nofollow" target="_blank" title=""&gt;public_send&lt;/a&gt;，public_send 与 send 的不同之处，public_send 只会 call public_method，看例子&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@person &amp;amp;&amp;amp; @persion.name
@person ? @person.name : nil
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;用 try 改写&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@person.try(:name)
@person.try { |p| "#{p.first_name} #{p.last_name}" }
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;try 同样能接受参数、block，&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Person.try(:find, 1)
@people.try(:collect) {|p| p.name}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;通过源码可以看出 tap 和 try 两个小工具意思都非常明白，用起来也很简单方便，实乃居家简化好帮手&lt;/p&gt;</description>
      <author>diudiutang</author>
      <pubDate>Tue, 04 Sep 2012 12:22:20 +0800</pubDate>
      <link>https://ruby-china.org/topics/5348</link>
      <guid>https://ruby-china.org/topics/5348</guid>
    </item>
    <item>
      <title>[吐血之作] 你可能错过的 Rails 技巧</title>
      <description>&lt;p&gt;前段时间 RailsConf 2012 之后有个介绍关于 Rails 技巧的内容&lt;/p&gt;

&lt;p&gt;&lt;a href="https://speakerdeck.com/u/jeg2/p/10-things-you-didnt-know-rails-could-do" rel="nofollow" target="_blank" title=""&gt;10 things you didn't rails could do&lt;/a&gt; , 论坛也有人发过类似的帖子，但都是&lt;/p&gt;

&lt;p&gt;指引大家去看那个 pdf，pdf 太长了，很难有耐心看完，所以我就淡腾地分&lt;/p&gt;

&lt;p&gt;割成了 4 段顺便加上自己的一点小理解&lt;/p&gt;

&lt;p&gt;&lt;a href="http://dayuan.im/blog/10-things-you-didnt-know-rails-could-do-1.html/" rel="nofollow" target="_blank" title=""&gt;你可能错过的 Rails 技巧 (一)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://dayuan.im/blog/10-things-you-didnt-know-rails-could-do-2.html/" rel="nofollow" target="_blank" title=""&gt;你可能错过的 Rails 技巧 (二)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://dayuan.im/blog/10-things-you-didnt-know-rails-could-do-3.html/" rel="nofollow" target="_blank" title=""&gt;你可能错过的 Rails 技巧 (三)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://dayuan.im/blog/10-things-you-didnt-know-rails-could-do-4.html/" rel="nofollow" target="_blank" title=""&gt;你可能错过的 Rails 技巧 (四)&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;内容有点多，但是感觉有分量的技巧不是很多，特此分享一下，希望&lt;/p&gt;

&lt;p&gt;能从中找到你喜欢的东西 ^.^&lt;/p&gt;</description>
      <author>diudiutang</author>
      <pubDate>Fri, 31 Aug 2012 19:14:06 +0800</pubDate>
      <link>https://ruby-china.org/topics/5289</link>
      <guid>https://ruby-china.org/topics/5289</guid>
    </item>
    <item>
      <title>苹果团现在有现成的 Air 8G 定制版啦</title>
      <description>&lt;p&gt;RT，Md 231 Air-8G 定制版一直都是大家最关注的机型，也是最新出的&lt;/p&gt;

&lt;p&gt;这一批里面最有性价比的一款。今天去 ruby-sunday 北京聚会看很多朋&lt;/p&gt;

&lt;p&gt;友都是用的这款，虽然少了显卡但是对开发应该影响不大，再说又是&lt;/p&gt;

&lt;p&gt;SSD，用起来肯定更爽，8G 内存也暂时免去了升级之虞。&lt;/p&gt;

&lt;p&gt;之前在苹果团上入手了 MD103，同学也买了 975，都是前天下单第二天&lt;/p&gt;

&lt;p&gt;顺风就飞速送到 (当然运费也是有点小贵)，质量当然没啥问题，店主服务&lt;/p&gt;

&lt;p&gt;也是相当热情，电话一个接一个。。(当然是确认啦)&lt;/p&gt;

&lt;p&gt;看论坛很多朋友最近都有购机打算，对这款也比较关心，特此推荐一下&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.appletuan.com/s/macbook-air-md231-8g" rel="nofollow" target="_blank"&gt;http://www.appletuan.com/s/macbook-air-md231-8g&lt;/a&gt;&lt;/p&gt;

&lt;hr&gt;

&lt;p&gt;回答几个大家比较关心的问题：&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;信誉：几个同事去年和今年接连购入 iphone / ipad / air / pro，购机过程只能用相当快来形容，到目前为止都很正常，信誉肯定信得过&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;质量：都是最近新出的几款，质量方面应该没什么问题，虽然是港版，但是在国内是 1 年保修的（从注册日期开始计算）&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;价格：231 原配现在的价格差不多已经很低了，8G 定制版稍微贵点，没办法，内存是焊在主板上，只能定制 (4G 内存真心不够用。。)，国行定制版学生价是 9100，比这个贵了 700，不差钱的爷可以无视 &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;打广告：真心不是。。我只是普通玩家，昨天还去 &lt;a href="http://www.appletuan.com/t/1707" rel="nofollow" target="_blank" title=""&gt;晒了下机&lt;/a&gt;  &lt;img title=":smirk:" alt="😏" src="https://twemoji.ruby-china.com/2/svg/1f60f.svg" class="twemoji"&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;希望能对还在犹豫的朋友有点帮助&lt;/p&gt;</description>
      <author>diudiutang</author>
      <pubDate>Sat, 11 Aug 2012 21:07:20 +0800</pubDate>
      <link>https://ruby-china.org/topics/4876</link>
      <guid>https://ruby-china.org/topics/4876</guid>
    </item>
    <item>
      <title>cygwin 感觉不错</title>
      <description>&lt;p&gt;最近离职没有了 mac os，借同学电脑用了段时间，本来想找个 win7 下类似于 &lt;/p&gt;

&lt;p&gt;Terminal 的终端试试，试了几个之后发现 &lt;a href="http://www.cygwin.com/" rel="nofollow" target="_blank" title=""&gt;cygwin&lt;/a&gt; 还不错&lt;/p&gt;

&lt;p&gt;差不多能完美模拟 *nix 环境下的功能，试着装了下 rvm rails，只要前面安装的时候&lt;/p&gt;

&lt;p&gt;把需要编译需要的工具都选上，安装过程也很顺利，新建了个项目试了下，也能很&lt;/p&gt;

&lt;p&gt;好运行，当然也是有几个小缺点&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;安装过程选择安装哪些包比较繁琐，需要对 linux 用到的包比较熟悉，当然全部选上也是没问题的，只是在线安装小水管太慢了&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;不能用 C-c，C-v，复制粘贴只能用鼠标右键，这个有点不方便&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ruby 解释器速度有点慢，可能因为它只是个模拟层的原因吧&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;我不是折腾 win7 下 Rails 开发环境，只是惊奇 windows 下有这么好的工具，它的&lt;/p&gt;

&lt;p&gt;适用场合在哪呢  &lt;/p&gt;</description>
      <author>diudiutang</author>
      <pubDate>Mon, 16 Jul 2012 18:13:27 +0800</pubDate>
      <link>https://ruby-china.org/topics/4347</link>
      <guid>https://ruby-china.org/topics/4347</guid>
    </item>
    <item>
      <title>补充 wiki 的问题</title>
      <description>&lt;p&gt;&lt;a href="/huacnlee" class="user-mention" title="@huacnlee"&gt;&lt;i&gt;@&lt;/i&gt;huacnlee&lt;/a&gt; 我想在 wiki 下补充几个小知识点，比如说一些算法的 ruby &lt;/p&gt;

&lt;p&gt;实现什么的，但是感觉 wiki 里面都是总结概括性的东西，我这算是&lt;/p&gt;

&lt;p&gt;小 tips，放在那好像有点不合适，想建议一下把 wiki 分成 2 个部分，&lt;/p&gt;

&lt;p&gt;1，一些概括性的内容，比如说环境搭建，风格指引，学习进阶&lt;/p&gt;

&lt;p&gt;2，大家分享一些解决问题中的好的方法，无怪乎难易，只要是觉得对别&lt;/p&gt;

&lt;p&gt;人可能会有所帮助的都可以发帖补充，这样大家每次找答案的时候可以&lt;/p&gt;

&lt;p&gt;优先来 wiki 区搜下是否有符合自己的答案，也就不用每次都得到 topic &lt;/p&gt;

&lt;p&gt;去发帖询问了。  &lt;/p&gt;</description>
      <author>diudiutang</author>
      <pubDate>Wed, 06 Jun 2012 18:30:24 +0800</pubDate>
      <link>https://ruby-china.org/topics/3697</link>
      <guid>https://ruby-china.org/topics/3697</guid>
    </item>
    <item>
      <title>分享一个很方便的快捷键</title>
      <description>&lt;p&gt;昨天看 &lt;a href="http://ruby-china.org/topics/3355" title=""&gt;第一期 Railscasts-china live show 视频 with &lt;/a&gt;&lt;a href="/huacnlee" class="user-mention" title="@huacnlee"&gt;&lt;i&gt;@&lt;/i&gt;huacnlee&lt;/a&gt;  huacnlee 使用 iterm 各个标签之间来回切换总是用鼠标去点，加上自己平时用法，深感没有快捷键之不便。&lt;/p&gt;

&lt;p&gt;用了大半年 mac，感觉 mac 在快捷键自定义上的方便无与伦比，定义快捷键不仅自己按着方便，有时也大大提高了工作效率，所以推荐大家一个很有用，很方便的快捷键。&lt;/p&gt;

&lt;p&gt;iTems2 里面 &lt;code&gt;preferences&lt;/code&gt;-&lt;code&gt;key&lt;/code&gt; 右边有个 &lt;code&gt;Global Shortcut Keys&lt;/code&gt; 点 &lt;code&gt;+&lt;/code&gt; 添加 
&lt;code&gt;⌘1&lt;/code&gt; 选择 Action &lt;code&gt;Previous Tab&lt;/code&gt; 表示 &lt;code&gt;command+1&lt;/code&gt; 切换到上一个 tab,
&lt;code&gt;⌘2&lt;/code&gt; 选择 Action &lt;code&gt;Next Tab&lt;/code&gt; 表示 &lt;code&gt;command+2&lt;/code&gt; 切换到下一个 tab,&lt;/p&gt;

&lt;p&gt;当然也可以在 mac 全局键盘里面添加对应软件的快捷键。
选择 &lt;code&gt;系统偏好设置-键盘-添加应用程序快捷键&lt;/code&gt; 从应用程序里面选择 iTerm 并填入对应快捷键 &lt;code&gt;菜单标题&lt;/code&gt;可以从屏幕最上端 &lt;code&gt;Window&lt;/code&gt; 里面看，
iTerm 上下 tab 对应的分别是 &lt;code&gt;Select Previous Tab&lt;/code&gt; 和 &lt;code&gt;Select Next Tab&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;也可以用此方法设置 Chrome Finder 类似的快捷键，对应的选择都是
&lt;code&gt;选择上一标签&lt;/code&gt; 和 &lt;code&gt;选择下一个标签&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;sublime text2 里面也提供了此快捷键的自定义&lt;/p&gt;

&lt;p&gt;{ "keys": ["super+1"], "command": "prev_view" },
    { "keys": ["super+2"], "command": "next_view" },&lt;/p&gt;

&lt;p&gt;我都是用 &lt;code&gt;⌘1&lt;/code&gt; &lt;code&gt;⌘2&lt;/code&gt; 来进行相邻 tab 切换，用起来相当方便&lt;/p&gt;

&lt;p&gt;还有有时在终端中敲命令时，比如每次用 mysql 查看数据库时还得敲一大堆 &lt;code&gt;mysql -u user -p password&lt;/code&gt; 是多么麻烦的一件事，
假如在.zshrc 或者 .bash_profile 里面定于个快捷键
&lt;code&gt;alias ml='mysql -uroot -ppassword'&lt;/code&gt; 则会方便得多
类似的，像 &lt;code&gt;rails g migration&lt;/code&gt; &lt;code&gt;rake db:migrate&lt;/code&gt; 定义成 ragm radm 这种快捷键，可能开始有点容易不好记，但毕竟是自己定义的，多用几次就习惯了。
我估计很多人 &lt;code&gt;.zshrc&lt;/code&gt; &lt;code&gt;.bash_profile&lt;/code&gt;文件中已经定义了很多 alias，一点小小建议，希望能给大家些许帮助。(渣排版，勿喷。。)&lt;/p&gt;</description>
      <author>diudiutang</author>
      <pubDate>Sat, 19 May 2012 18:05:04 +0800</pubDate>
      <link>https://ruby-china.org/topics/3376</link>
      <guid>https://ruby-china.org/topics/3376</guid>
    </item>
    <item>
      <title>咋都是不到一分钟啦</title>
      <description>&lt;p&gt;&lt;a href="/huacnlee" class="user-mention" title="@huacnlee"&gt;&lt;i&gt;@&lt;/i&gt;huacnlee&lt;/a&gt; 刚才看了几个帖子，咋都成不到一分钟回复  . &lt;/p&gt;</description>
      <author>diudiutang</author>
      <pubDate>Wed, 09 May 2012 15:46:30 +0800</pubDate>
      <link>https://ruby-china.org/topics/3169</link>
      <guid>https://ruby-china.org/topics/3169</guid>
    </item>
    <item>
      <title>coder 球迷归属之问卷调查</title>
      <description>&lt;p&gt;貌似是足球第一帖诶，工作之余放松一下。
好像 coder 里面球迷很少，我身边敲代码的很少喜欢足球的，虽然凑一起踢球人数踢的倒不少。
昨前两天欧冠战罢，淘汰晋级，欢喜忧愁。各位最钟爱的球队是那支，我先报道，米兰。不过感觉欧冠欠切尔西一个冠军，前几年切尔西最鼎盛的时候被裁判给黑了，希望最终切尔西能如愿捧杯，也让德罗巴这些即将被清洗的老臣能留下些许美好回忆  &lt;/p&gt;</description>
      <author>diudiutang</author>
      <pubDate>Fri, 27 Apr 2012 10:29:03 +0800</pubDate>
      <link>https://ruby-china.org/topics/2925</link>
      <guid>https://ruby-china.org/topics/2925</guid>
    </item>
    <item>
      <title>问个冷门点滴,重构那些事</title>
      <description>&lt;p&gt;像这种非常相似的代码怎么重构
大写字母为 model 中的常量
&lt;a href="/basic" class="user-mention" title="@basic"&gt;&lt;i&gt;@&lt;/i&gt;basic&lt;/a&gt; = Ex::User::BASIC
&lt;a href="/trade" class="user-mention" title="@trade"&gt;&lt;i&gt;@&lt;/i&gt;trade&lt;/a&gt; = Ex::User::TRADE
&lt;a href="/latest" class="user-mention" title="@latest"&gt;&lt;i&gt;@&lt;/i&gt;latest&lt;/a&gt; = Ex::User::LATEST
&lt;a href="/like" class="user-mention" title="@like"&gt;&lt;i&gt;@&lt;/i&gt;like&lt;/a&gt; = Ex::User::LIKE
&lt;a href="/gene" class="user-mention" title="@gene"&gt;&lt;i&gt;@&lt;/i&gt;gene&lt;/a&gt; = Ex::User::GENE
大家有没有什么奇葩写法  &lt;/p&gt;</description>
      <author>diudiutang</author>
      <pubDate>Thu, 26 Apr 2012 17:03:43 +0800</pubDate>
      <link>https://ruby-china.org/topics/2913</link>
      <guid>https://ruby-china.org/topics/2913</guid>
    </item>
  </channel>
</rss>
