<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>clc3123</title>
    <link>https://ruby-china.org/clc3123</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>Nanoc 怎么搞的，删了我一堆东西，杯具</title>
      <description>&lt;p&gt;这下尴尬了，刚才用 nanoc 搞一个文档静态站，开启了 nanoc 的编译&lt;code&gt;auto_prune&lt;/code&gt;选项，结果这逼竟然在 guard console 中给我 rm -rf 了一堆东西，terminal 只限 10000 行，刷满了，之前的日志看不到。。。Applications 下面全空。。。&lt;/p&gt;

&lt;p&gt;环境：&lt;/p&gt;

&lt;p&gt;nanoc 3.6.7
guard-nanoc&lt;/p&gt;

&lt;p&gt;已确认自己的代码里没有任何 rm 相关的命令，肯定是 nanoc 的问题了&lt;/p&gt;</description>
      <author>clc3123</author>
      <pubDate>Fri, 28 Feb 2014 22:42:49 +0800</pubDate>
      <link>https://ruby-china.org/topics/17579</link>
      <guid>https://ruby-china.org/topics/17579</guid>
    </item>
    <item>
      <title>$ rake "rip [Jim Weirich]"</title>
      <description>&lt;p&gt;程序员们注意身体啊&lt;/p&gt;</description>
      <author>clc3123</author>
      <pubDate>Mon, 24 Feb 2014 11:08:07 +0800</pubDate>
      <link>https://ruby-china.org/topics/17445</link>
      <guid>https://ruby-china.org/topics/17445</guid>
    </item>
    <item>
      <title>大家看到 rvm2 的新 logo 了吗？</title>
      <description>&lt;p&gt;&lt;a href="https://docs.google.com/forms/d/1-5y5azz2JWD3pSRc1_9IhhcHHL7JTK5bZDVLEmuhoSY/viewform" rel="nofollow" target="_blank"&gt;https://docs.google.com/forms/d/1-5y5azz2JWD3pSRc1_9IhhcHHL7JTK5bZDVLEmuhoSY/viewform&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;从上面一堆中选了这个。。。&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.bountysource.com/fundraisers/489-rvm-2-0/updates/102" rel="nofollow" target="_blank"&gt;https://www.bountysource.com/fundraisers/489-rvm-2-0/updates/102&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;真难看。。。&lt;/p&gt;</description>
      <author>clc3123</author>
      <pubDate>Sun, 16 Feb 2014 13:52:16 +0800</pubDate>
      <link>https://ruby-china.org/topics/17288</link>
      <guid>https://ruby-china.org/topics/17288</guid>
    </item>
    <item>
      <title>有个 linux 下的工具能画文本 flow chart 的叫什么来着？</title>
      <description>&lt;p&gt;RT&lt;/p&gt;

&lt;p&gt;比如画这样的图：&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;A ---&amp;gt; B
|      |
|      |
C &amp;lt;--- D
&lt;/code&gt;&lt;/pre&gt;</description>
      <author>clc3123</author>
      <pubDate>Mon, 03 Feb 2014 15:10:38 +0800</pubDate>
      <link>https://ruby-china.org/topics/17073</link>
      <guid>https://ruby-china.org/topics/17073</guid>
    </item>
    <item>
      <title>请问能否关闭 tp-link 路由器上面的 nat 功能?</title>
      <description>&lt;p&gt;RT&lt;/p&gt;

&lt;p&gt;我家里路由型号是 WR741N。&lt;/p&gt;

&lt;p&gt;&lt;a href="http://detail.zol.com.cn/wireless_router/index197898.shtml" rel="nofollow" target="_blank"&gt;http://detail.zol.com.cn/wireless_router/index197898.shtml&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;我想把这种路由器作为&lt;code&gt;192.168.X.0/24&lt;/code&gt;这个 subnet 的网关，wan 口接入比如&lt;code&gt;10.10.10.0/24&lt;/code&gt;这个 subnet 的中心网关，而让&lt;code&gt;192.168.1.0/24&lt;/code&gt;的 ip 能够访问&lt;code&gt;192.168.2.0/24&lt;/code&gt;的 ip，这样我就需要把 wr741n 的 nat 关掉，才能把接入它的设备的 ip 直接暴露出去。&lt;/p&gt;

&lt;p&gt;控制面板找了一下，貌似没找到，要如何搞？&lt;/p&gt;

&lt;p&gt;如果不行，要用什么牌子什么型号的路由器？要求尽量便宜，并排除 dd-wrt 这类需要刷机的。&lt;/p&gt;

&lt;p&gt;谢谢。&lt;/p&gt;</description>
      <author>clc3123</author>
      <pubDate>Fri, 31 Jan 2014 18:58:50 +0800</pubDate>
      <link>https://ruby-china.org/topics/17065</link>
      <guid>https://ruby-china.org/topics/17065</guid>
    </item>
    <item>
      <title>求一剂 ember.js 强心针～</title>
      <description>&lt;p&gt;这里有用 ember.js 做过中型以上项目的吗？ &lt;/p&gt;

&lt;p&gt;前段时间花时间看了一下 ember 的文档，目测是个不错的框架，断断续续也把玩了几个 github 上的小项目，先说说自己的感受，顺道提几个问题：&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;rc3 和 rc6 之间在 route 上就有蛮大的变化，用 promise 解决 ajax 异步设置 model 等问题。。。虽说改进很棒，但给我感觉是变化挺快，坑多，据说 rc 之前那更是折腾&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;有无 builtwith.angularjs.com 这种的展示 ember 项目的地方？想看看别人做的项目&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ember 的 object 模型设置很精巧，不明觉厉，但是 get 和 set 方法用得很烦很头疼。另外他的 class 方式也很棒，instance 调用一个方法的_super 很方便，但是文档里也没怎么注明使用方式，硬是 chrome devtools 里面翻查出来有 superwrapper 这么个东西。我想说的是，ember 使用上很特别（get/set），guide 文档由浅入深，但不能算是详尽，那么 angularjs 会不会相对来说好一些，更易于仅凭直觉来使用？&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;生成的 html 文件太泥马恐怖了。。。。btw，那么 htmlbars 是干嘛的？能让生成的模版好看点不？angularjs 的 html 看起来清爽许多。&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;和 jquery 配合。。。呃，这个还没怎么认真看，想问问，比如要加个跑马灯这种，是不是应该在 view 的 didInsertElement 这类的 hook 中来添加定制的 jquery 指令，而$(function(){}) 这种的就几乎用不上了？&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ember 里是不是每当模版中的 binding 有变化（套用文档中的话）a series of templates，也就是整页都要 repaint？还是说只有某个 child view 要 repaint？&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;ie8 support????? ie6/7不用管了&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;其实我只想问第一句的。。。。。。
因为想做一个类似在线聊天实时交易的网页，选中 ember 是觉得体验上应该会很不错，简单把玩 ember 也未碰到特别 x10 头疼的问题。
另外希望用过的同学列一下自己碰到的坑，多谢。有 angularjs 经验的也给下对比。&lt;/p&gt;</description>
      <author>clc3123</author>
      <pubDate>Mon, 29 Jul 2013 23:12:44 +0800</pubDate>
      <link>https://ruby-china.org/topics/12885</link>
      <guid>https://ruby-china.org/topics/12885</guid>
    </item>
    <item>
      <title>俺们 42qu 的 vps 想做个推广，Rubyist 们给点意见吧～</title>
      <description>&lt;p&gt;初步的想法是对技术社区来个买 vps 送书的活动，比如买一个季度，我们送一本你感兴趣的技术书，比如 metaprogramming 什么的。&lt;/p&gt;

&lt;p&gt;主要的目的还是获取关注，获取反馈，帮助我们改进服务。&lt;/p&gt;

&lt;p&gt;其实嘛，还有其它想法，比如利用我们 42 区的 vps 主机提供共用的博客空间，当然对我们 rubyist 来说可以用 jekyll 啦，不知道大家的意见如何？小弟 ruby 学术不精，要是有兴趣的哥们可以考虑开发一个，我们提供服务器。也算是推广我们的 vps 服务的同时为社区做点贡献了吧～&lt;/p&gt;

&lt;p&gt;我们 42qu 的 vps 速度还是很快的，国内极速了。另外我们自己网站也用着呢，算是吃自己的狗粮了。希望大家支持一下哈！&lt;/p&gt;

&lt;p&gt;&lt;a href="http://vps.42qu.com/" rel="nofollow" target="_blank"&gt;http://vps.42qu.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;有什么意见可以在下边提，尽量满足大家的需求。&lt;/p&gt;</description>
      <author>clc3123</author>
      <pubDate>Fri, 08 Jun 2012 23:30:58 +0800</pubDate>
      <link>https://ruby-china.org/topics/3728</link>
      <guid>https://ruby-china.org/topics/3728</guid>
    </item>
    <item>
      <title>看技术书，大家一天能啃多少页？</title>
      <description>&lt;p&gt;我从小阅读速度慢，这样一天最多就看个 15 页，就算整天有空来看，也就最多 30 页。&lt;/p&gt;

&lt;p&gt;于是很在意网上一些 IT 同仁们的数据，经常看到有些人平均一天能看到七八十页的。。。&lt;/p&gt;

&lt;p&gt;好羡慕啊，你们能看多少？&lt;/p&gt;

&lt;p&gt;PS：我都是看鸟文版的。  &lt;/p&gt;</description>
      <author>clc3123</author>
      <pubDate>Thu, 24 May 2012 09:50:25 +0800</pubDate>
      <link>https://ruby-china.org/topics/3463</link>
      <guid>https://ruby-china.org/topics/3463</guid>
    </item>
    <item>
      <title>分享今天一个趣事。。。</title>
      <description>&lt;p&gt;这两天在看 rails 的 session 和 cookie 实现，这是 action dispatch 的两个 middleware。
然后就在源码里面折腾来折腾去，总之在 pry 辅佐下，代码基本能看懂，就是碰到个特郁闷的 bug！！！
我在 middleware 的某些方法里加上 binding.pry，然后浏览器刷一下页面，当 exit 当前的 pry session 的时候，简直没完没了，反正就是一直打 exit，就怎么都退不出来，郁闷了！只能 ctrl + c ...&lt;/p&gt;

&lt;p&gt;刚才突然恍过神来，原来是特么的静态文件请求也要过一遍 rack stack 的缘故，晕倒，导致浏览器刷一次页面，在 rack middleware 里得进 10+ 次 pry session...&lt;/p&gt;

&lt;p&gt;好吧，这其实不是 bug。。。  &lt;/p&gt;</description>
      <author>clc3123</author>
      <pubDate>Tue, 20 Mar 2012 22:53:50 +0800</pubDate>
      <link>https://ruby-china.org/topics/2010</link>
      <guid>https://ruby-china.org/topics/2010</guid>
    </item>
    <item>
      <title>ruby what is #$ ??</title>
      <description>&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1.9.3p125 :006 &amp;gt; puts "#$"
SyntaxError: (irb):6: unterminated string meets end of file
        from /home/clc3123/.rvm/rubies/ruby-1.9.3-p125/bin/irb:16:in `&amp;lt;main&amp;gt;'


&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;also&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1.9.3p125 :007 &amp;gt; reg = /#$/
SyntaxError: (irb):7: unterminated regexp meets end of file
        from /home/clc3123/.rvm/rubies/ruby-1.9.3-p125/bin/irb:16:in `&amp;lt;main&amp;gt;'


&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Weird!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  &lt;/p&gt;</description>
      <author>clc3123</author>
      <pubDate>Tue, 13 Mar 2012 00:40:34 +0800</pubDate>
      <link>https://ruby-china.org/topics/1823</link>
      <guid>https://ruby-china.org/topics/1823</guid>
    </item>
    <item>
      <title>In Rack, what is env ['SCRIPT_NAME'] ???</title>
      <description>&lt;p&gt;和 PATH 有区别吗？  &lt;/p&gt;</description>
      <author>clc3123</author>
      <pubDate>Fri, 02 Mar 2012 22:36:44 +0800</pubDate>
      <link>https://ruby-china.org/topics/1569</link>
      <guid>https://ruby-china.org/topics/1569</guid>
    </item>
    <item>
      <title>RVM Ruby 1.9.3 命令行 ri 使用不了，方法基本查不到</title>
      <description>&lt;p&gt;1.9.2 是可以的，core 和 stdlib 和其它 gem 的方法都能查到。1.9.3 就基本查不到了，gem 都没有文档，很多 ruby core 里的都没有。
RVM 1.9.3.
这是怎么回事？  &lt;/p&gt;</description>
      <author>clc3123</author>
      <pubDate>Wed, 29 Feb 2012 14:15:52 +0800</pubDate>
      <link>https://ruby-china.org/topics/1500</link>
      <guid>https://ruby-china.org/topics/1500</guid>
    </item>
    <item>
      <title>Ruby 对于 Postgresql 中的 Time 类型 field 怎么处理？</title>
      <description>&lt;p&gt;当前 Rails 中，将数据库（我用的 pg）中的 Time（不包括日期信息！）对应到 ruby 的 Time（有 date！），这样无中生有的添加上一个“2000-01-01”的日期。&lt;/p&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;simplified_type&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;field_type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="n"&gt;field_type&lt;/span&gt;
  &lt;span class="k"&gt;when&lt;/span&gt; &lt;span class="sr"&gt;/int/i&lt;/span&gt;
    &lt;span class="ss"&gt;:integer&lt;/span&gt;
  &lt;span class="k"&gt;when&lt;/span&gt; &lt;span class="sr"&gt;/float|double/i&lt;/span&gt;
    &lt;span class="ss"&gt;:float&lt;/span&gt;
  &lt;span class="k"&gt;when&lt;/span&gt; &lt;span class="sr"&gt;/decimal|numeric|number/i&lt;/span&gt;
    &lt;span class="n"&gt;extract_scale&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;field_type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="ss"&gt;:integer&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="ss"&gt;:decimal&lt;/span&gt;
  &lt;span class="k"&gt;when&lt;/span&gt; &lt;span class="sr"&gt;/datetime/i&lt;/span&gt;
    &lt;span class="ss"&gt;:datetime&lt;/span&gt;
  &lt;span class="k"&gt;when&lt;/span&gt; &lt;span class="sr"&gt;/timestamp/i&lt;/span&gt;
    &lt;span class="ss"&gt;:timestamp&lt;/span&gt;
  &lt;span class="k"&gt;when&lt;/span&gt; &lt;span class="sr"&gt;/time/i&lt;/span&gt;
    &lt;span class="ss"&gt;:time&lt;/span&gt;
  &lt;span class="k"&gt;when&lt;/span&gt; &lt;span class="sr"&gt;/date/i&lt;/span&gt;
    &lt;span class="ss"&gt;:date&lt;/span&gt;
  &lt;span class="k"&gt;when&lt;/span&gt; &lt;span class="sr"&gt;/clob/i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sr"&gt;/text/i&lt;/span&gt;
    &lt;span class="ss"&gt;:text&lt;/span&gt;
  &lt;span class="k"&gt;when&lt;/span&gt; &lt;span class="sr"&gt;/blob/i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sr"&gt;/binary/i&lt;/span&gt;
    &lt;span class="ss"&gt;:binary&lt;/span&gt;
  &lt;span class="k"&gt;when&lt;/span&gt; &lt;span class="sr"&gt;/char/i&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sr"&gt;/string/i&lt;/span&gt;
    &lt;span class="ss"&gt;:string&lt;/span&gt;
  &lt;span class="k"&gt;when&lt;/span&gt; &lt;span class="sr"&gt;/boolean/i&lt;/span&gt;
    &lt;span class="ss"&gt;:boolean&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;请问如何处理这样的问题？
我的 workaround 就是用 strftime 在显示的时候做个处理，但有其它方法吗？
在 rails 中有什么方法能在 record load 出来的时候就自动转换或变动数据信息的吗？
最后这问题一直想问的～  &lt;/p&gt;</description>
      <author>clc3123</author>
      <pubDate>Fri, 27 Jan 2012 11:45:59 +0800</pubDate>
      <link>https://ruby-china.org/topics/952</link>
      <guid>https://ruby-china.org/topics/952</guid>
    </item>
    <item>
      <title>发现 include A,B,C 这种写法，method lookup 时就是正向查找。。。</title>
      <description>&lt;p&gt;分三行写成：
include A
include B
include C
method lookup 就是反向从 C 开始找。。。
啊啊啊。。。&lt;/p&gt;</description>
      <author>clc3123</author>
      <pubDate>Tue, 24 Jan 2012 21:19:57 +0800</pubDate>
      <link>https://ruby-china.org/topics/937</link>
      <guid>https://ruby-china.org/topics/937</guid>
    </item>
    <item>
      <title>关于帖子热度排行排序这样的操作</title>
      <description>&lt;p&gt;是数据库读取时实时按照算法计算的吗？或者是其它进程定时对帖子进行热度值计算并且更新帖子的相关 field？&lt;/p&gt;

&lt;p&gt;有关的文章：hacker news 的排序
&lt;a href="http://amix.dk/blog/post/19574" rel="nofollow" target="_blank"&gt;http://amix.dk/blog/post/19574&lt;/a&gt;  &lt;/p&gt;</description>
      <author>clc3123</author>
      <pubDate>Sat, 14 Jan 2012 22:20:12 +0800</pubDate>
      <link>https://ruby-china.org/topics/860</link>
      <guid>https://ruby-china.org/topics/860</guid>
    </item>
    <item>
      <title>看 Ruby 程序源码，很晕，求推荐相关工具！</title>
      <description>&lt;p&gt;有没有类似跟踪代码执行流程的工具，跪求～&lt;/p&gt;

&lt;p&gt;还有，不知道看源码应该怎么看，是按执行流程看呢？还是按模块看？目前一看各种 gem 源码，就无限 FT。。。&lt;/p&gt;

&lt;p&gt;目前还是菜鸟，希望多看代码长长劲，但还是希望找到好的方法和工具辅助下。  &lt;/p&gt;</description>
      <author>clc3123</author>
      <pubDate>Sun, 18 Dec 2011 18:55:12 +0800</pubDate>
      <link>https://ruby-china.org/topics/519</link>
      <guid>https://ruby-china.org/topics/519</guid>
    </item>
    <item>
      <title>怎样在服务器模拟 Oauth2 的用户授权？</title>
      <description>&lt;p&gt;我正在做新浪微博的一个应用，我需要在服务器端，用自己的帐号获取一些信息。&lt;/p&gt;

&lt;p&gt;以前 Oauth1 的时候，新浪发的 access token 不会过期，也就是说，除非我在应用设定中取消授权，否则 access token 可以一直用，那么我人工登录下，把 access token 抄下来，写到程序中，那么服务器就可以用这个 token 通过 api 获取信息。&lt;/p&gt;

&lt;p&gt;可是新浪新应用只让用 Oauth2，但是每次下发的 access token 只让用一天，第二天失效。那么我每天都要通过我手工从浏览器登录授权页面抄下 token，这样也太不专业了。。。&lt;/p&gt;

&lt;p&gt;我想问问有没有一种方案，简单点的，能在程序中模拟登录新浪微博我的 app 的授权页，模拟填入我的帐号密码？我正在用 curl 慢慢试，但还没成功，大家有没有好的方法推荐下吧，多谢！  &lt;/p&gt;</description>
      <author>clc3123</author>
      <pubDate>Fri, 16 Dec 2011 11:24:24 +0800</pubDate>
      <link>https://ruby-china.org/topics/505</link>
      <guid>https://ruby-china.org/topics/505</guid>
    </item>
    <item>
      <title>用 Sinatra 构建网站，你会怀念 Rails 的什么特性？</title>
      <description>&lt;p&gt;比如用 sinatra，重写一个 ruby-china，或者个人 blog，或者 DiscuzX。
你会怀念哪些 Rails 功能？
如果是简单的小站，比如说个人 blog，sinatra 绰绰有余。
ORM，用 sequal，activerecord 都行。
assets pipeline，整合到 sinatra 问题也不大。
view 的话，除了缺少好用的 helpers，用 haml 写相对来说也不会麻烦多少。&lt;/p&gt;

&lt;p&gt;大家有经验吗？交流一下吧，好多东西我还没考虑到。  &lt;/p&gt;</description>
      <author>clc3123</author>
      <pubDate>Thu, 01 Dec 2011 23:40:11 +0800</pubDate>
      <link>https://ruby-china.org/topics/297</link>
      <guid>https://ruby-china.org/topics/297</guid>
    </item>
    <item>
      <title>什么是 File descriptor?</title>
      <description>&lt;p&gt;近期实验 eventmachine，迷迷糊糊试图了解其中的一些实现原理。
反复提及一个 linux 下的 file descriptor 这个概念，听起来像是一个文件的属性？
可是 socket 也有 file descriptor?
哪位能给解释下，通俗点最好，暂时没有时间去啃 linux，多谢  &lt;/p&gt;</description>
      <author>clc3123</author>
      <pubDate>Thu, 24 Nov 2011 19:32:53 +0800</pubDate>
      <link>https://ruby-china.org/topics/161</link>
      <guid>https://ruby-china.org/topics/161</guid>
    </item>
    <item>
      <title>有用过盛大云 or 阿里云的吗？</title>
      <description>&lt;p&gt;简单浏览了他们的网站，产品分类看了觉得很迷糊。
这里直接问下，有哪位在这两个云上部署过 ruby 的 linux 应用？能否介绍下？&lt;/p&gt;

&lt;p&gt;主要关注的是稳定性。谢谢  &lt;/p&gt;</description>
      <author>clc3123</author>
      <pubDate>Wed, 23 Nov 2011 23:22:10 +0800</pubDate>
      <link>https://ruby-china.org/topics/145</link>
      <guid>https://ruby-china.org/topics/145</guid>
    </item>
  </channel>
</rss>
