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

<channel>
	<title>Neo&#039;s notes</title>
	<atom:link href="http://www.neocanable.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.neocanable.com</link>
	<description>记录一些琐碎的技术问题&#124;发泄胸中的各种不满</description>
	<lastBuildDate>Tue, 17 Jan 2012 05:37:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>&#8230;&#8230;</title>
		<link>http://www.neocanable.com/change/</link>
		<comments>http://www.neocanable.com/change/#comments</comments>
		<pubDate>Tue, 17 Jan 2012 05:37:27 +0000</pubDate>
		<dc:creator>Neo</dc:creator>
				<category><![CDATA[其他]]></category>

		<guid isPermaLink="false">http://www.neocanable.com/?p=734</guid>
		<description><![CDATA[所有的非技术blog都变草稿了，upset]]></description>
			<content:encoded><![CDATA[<p>所有的非技术blog都变草稿了，upset</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neocanable.com/change/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>install redis</title>
		<link>http://www.neocanable.com/install-redis/</link>
		<comments>http://www.neocanable.com/install-redis/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 19:51:05 +0000</pubDate>
		<dc:creator>Neo</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[nosql]]></category>

		<guid isPermaLink="false">http://www.neocanable.com/?p=686</guid>
		<description><![CDATA[安装 download redis from : http://redis.io/download 1. tar xzvf redis-version.tar.gz 2. cp redis-version/redis.cnf 到 /etc/下面 cp redis-version/utils/redis_init_script到/etc/init.d/下面 cp src/redis-server 和 src/redis-cli 到/usr/local/bin下面 3.修改/etc/redis.cnf REDISPORT=6379 EXEC=/usr/local/bin/redis-server CLIEXEC=/usr/local/bin/redis-cli PIDFILE=/var/run/redis_${REDISPORT}.pid CONF=&#34;/etc/redis/${REDISPORT}.conf&#34; 4. /etc/init.d/redis start Tips about config file 1.redis默认得log是stdout,并且将bash做为自己得守护进程，如果bash进程挂掉了，那么redis-server就会退出。 修改redis.conf daemonize yes 待续&#8230;&#8230;]]></description>
			<content:encoded><![CDATA[<li>安装</li>
<p>download redis from : http://redis.io/download </p>
<p>1. tar xzvf redis-version.tar.gz</p>
<p>2. cp redis-version/redis.cnf 到 /etc/下面<br />
    cp redis-version/utils/redis_init_script到/etc/init.d/下面<br />
    cp src/redis-server 和 src/redis-cli 到/usr/local/bin下面</p>
<p>3.修改/etc/redis.cnf</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #007800;">REDISPORT</span>=<span style="color: #000000;">6379</span><br />
<span style="color: #007800;">EXEC</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>redis-server<br />
<span style="color: #007800;">CLIEXEC</span>=<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>redis-cli<br />
<br />
<span style="color: #007800;">PIDFILE</span>=<span style="color: #000000; font-weight: bold;">/</span>var<span style="color: #000000; font-weight: bold;">/</span>run<span style="color: #000000; font-weight: bold;">/</span>redis_<span style="color: #800000;">${REDISPORT}</span>.pid<br />
<span style="color: #007800;">CONF</span>=<span style="color: #ff0000;">&quot;/etc/redis/<span style="color: #007800;">${REDISPORT}</span>.conf&quot;</span></div></div>
<p>4. /etc/init.d/redis start</p>
<li>Tips about config file</li>
<p>1.redis默认得log是stdout,并且将bash做为自己得守护进程，如果bash进程挂掉了，那么redis-server就会退出。<br />
修改redis.conf</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">daemonize <span style="color: #c20cb9; font-weight: bold;">yes</span></div></div>
<p>待续&#8230;&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neocanable.com/install-redis/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>about linux free</title>
		<link>http://www.neocanable.com/linux-free-comman/</link>
		<comments>http://www.neocanable.com/linux-free-comman/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 09:28:10 +0000</pubDate>
		<dc:creator>Neo</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.neocanable.com/?p=641</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.neocanable.com/wp-content/uploads/2011/12/linux-top-memery.png" alt="红宝书里面的，解释的详细，赞" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.neocanable.com/linux-free-comman/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>thinking-sphinx的排序</title>
		<link>http://www.neocanable.com/thinking-sphinx-sor/</link>
		<comments>http://www.neocanable.com/thinking-sphinx-sor/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 13:59:20 +0000</pubDate>
		<dc:creator>Neo</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby On Rails]]></category>

		<guid isPermaLink="false">http://www.neocanable.com/?p=635</guid>
		<description><![CDATA[sphinx本身支持datetime、integer、float、string等类型的排序，但是thinking-sphinx在定义索引的时候给人造成的误区简直让人想骂娘！ indexes :accepted_id, :sortable =&#62; true 这行是假象，默认是用字符串排序，即使accepted_id 是整型的！ 正确写法 &#160;has :accepted_id, :type =&#62; :integer 这里声明accepted_id是个属性，支持integer类型的排序和索引！ 唉，看文档是王道啊]]></description>
			<content:encoded><![CDATA[<p>sphinx本身支持datetime、integer、float、string等类型的排序，但是thinking-sphinx在定义索引的时候给人造成的误区简直让人想骂娘！</p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">indexes <span style="color:#ff3333; font-weight:bold;">:accepted_id</span>, <span style="color:#ff3333; font-weight:bold;">:sortable</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span></div></div>
<p>这行是假象，默认是用字符串排序，即使accepted_id 是整型的！</p>
<p>正确写法</p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;has <span style="color:#ff3333; font-weight:bold;">:accepted_id</span>, <span style="color:#ff3333; font-weight:bold;">:type</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> :<span style="color:#CC0066; font-weight:bold;">integer</span></div></div>
<p>这里声明accepted_id是个属性，支持integer类型的排序和索引！</p>
<p>唉，看文档是王道啊</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neocanable.com/thinking-sphinx-sor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>commitments 承诺</title>
		<link>http://www.neocanable.com/commitments-%e6%89%bf%e8%af%ba/</link>
		<comments>http://www.neocanable.com/commitments-%e6%89%bf%e8%af%ba/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 17:18:56 +0000</pubDate>
		<dc:creator>Neo</dc:creator>
				<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://www.neocanable.com/?p=612</guid>
		<description><![CDATA[晚上读了读mysql2这个gem的代码，凌乱！ mysql的ruby client支持autocommit的设置，mysql的gem我没实验过 也不知道commit是通过commitments演化来的，还是 commitments是根据commit演化来的，但是从命名的风格和程序上来说，确实respect 承诺，如机器里面的二进制一般，不崩盘，不改本色]]></description>
			<content:encoded><![CDATA[<p>晚上读了读mysql2这个gem的代码，凌乱！<br />
mysql的ruby client支持autocommit的设置，mysql的gem我没实验过</p>
<p>也不知道commit是通过commitments演化来的，还是<br />
commitments是根据commit演化来的，但是从命名的风格和程序上来说，确实respect</p>
<p>承诺，如机器里面的二进制一般，不崩盘，不改本色</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neocanable.com/commitments-%e6%89%bf%e8%af%ba/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>resque使用</title>
		<link>http://www.neocanable.com/resque-usag/</link>
		<comments>http://www.neocanable.com/resque-usag/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 17:03:38 +0000</pubDate>
		<dc:creator>Neo</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby On Rails]]></category>

		<guid isPermaLink="false">http://www.neocanable.com/?p=607</guid>
		<description><![CDATA[resque 是ruby和redis结合做的一个消息队列，稳定性和成熟性还有待考察，但是，用起来真是很爽 安装 gem install resque --no-ri --no-rdoc 或者rails3直接写到Gemfile里面，然后bundle install 在rails或者ruby 的app里导入项目，然后require到resque和job文件 执行rake resque:work QUEUE=&#8217;*'或者针对个别的job单独启动，用起来太舒服了！！！！！！ 不能忘了配置redis:) 案例 在app目录下建立jobs目录 在RAILS_ROOT/config/initializers/resque.rb中加入 &#160;Dir&#91;&#34;#{Rails.root}/app/jobs/*.rb&#34;&#93;.each &#123; &#124;file&#124; require file &#125; 建立一个可执行的ruby文件job1.rb class Job1 &#160; @queue = :job1 &#160; def self.perform&#40;arg&#41; &#160; &#160; &#160;p &#34;your code here!!!&#34; &#160; end end 执行 rake resque:work QUEUE='*' 可以看到&#8221;your code here!!!&#8221; 类的字符串输出]]></description>
			<content:encoded><![CDATA[<p>resque 是ruby和redis结合做的一个消息队列，稳定性和成熟性还有待考察，但是，用起来真是很爽</p>
<p>安装</p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">gem install resque <span style="color:#006600; font-weight:bold;">--</span>no<span style="color:#006600; font-weight:bold;">-</span>ri <span style="color:#006600; font-weight:bold;">--</span>no<span style="color:#006600; font-weight:bold;">-</span>rdoc</div></div>
<p>或者rails3直接写到Gemfile里面，然后bundle install</p>
<p>在rails或者ruby 的app里导入项目，然后require到resque和job文件</p>
<p>执行rake resque:work QUEUE=&#8217;*'或者针对个别的job单独启动，用起来太舒服了！！！！！！<br />
不能忘了配置redis:)</p>
<p>案例</p>
<p>在app目录下建立jobs目录<br />
在RAILS_ROOT/config/initializers/resque.rb中加入</p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp;<span style="color:#CC00FF; font-weight:bold;">Dir</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;#{Rails.root}/app/jobs/*.rb&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">each</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>file<span style="color:#006600; font-weight:bold;">|</span> <span style="color:#CC0066; font-weight:bold;">require</span> file <span style="color:#006600; font-weight:bold;">&#125;</span></div></div>
<p>建立一个可执行的ruby文件job1.rb</p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color:#9966CC; font-weight:bold;">class</span> Job1<br />
&nbsp; <span style="color:#0066ff; font-weight:bold;">@queue</span> = <span style="color:#ff3333; font-weight:bold;">:job1</span><br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">def</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">perform</span><span style="color:#006600; font-weight:bold;">&#40;</span>arg<span style="color:#006600; font-weight:bold;">&#41;</span><br />
&nbsp; &nbsp; &nbsp;<span style="color:#CC0066; font-weight:bold;">p</span> <span style="color:#996600;">&quot;your code here!!!&quot;</span><br />
&nbsp; <span style="color:#9966CC; font-weight:bold;">end</span><br />
<span style="color:#9966CC; font-weight:bold;">end</span></div></div>
<p>执行</p>
<div class="codecolorer-container ruby vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="ruby codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">rake resque:work QUEUE=<span style="color:#996600;">'*'</span></div></div>
<p>可以看到&#8221;your code here!!!&#8221; 类的字符串输出</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neocanable.com/resque-usag/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql数据库中空名字的用户</title>
		<link>http://www.neocanable.com/mysql-user-name-nul/</link>
		<comments>http://www.neocanable.com/mysql-user-name-nul/#comments</comments>
		<pubDate>Tue, 15 Nov 2011 19:18:03 +0000</pubDate>
		<dc:creator>Neo</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.neocanable.com/?p=593</guid>
		<description><![CDATA[mysql中的mysql.user表里面千万不能有名字为空或者null的用户，修改起来伤不起啊 如何&#8211;skip-grant-tables都没用，当发现有了空的用户名，就会茅厕顿开]]></description>
			<content:encoded><![CDATA[<p>mysql中的mysql.user表里面千万不能有名字为空或者null的用户，修改起来伤不起啊</p>
<p>如何&#8211;skip-grant-tables都没用，当发现有了空的用户名，就会茅厕顿开</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neocanable.com/mysql-user-name-nul/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vim转换行尾恶心的^M</title>
		<link>http://www.neocanable.com/vim-tips-1/</link>
		<comments>http://www.neocanable.com/vim-tips-1/#comments</comments>
		<pubDate>Sun, 13 Nov 2011 16:53:20 +0000</pubDate>
		<dc:creator>Neo</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.neocanable.com/?p=574</guid>
		<description><![CDATA[win下面的文件到linux上后，有的时候会出现一个可恨的^M在行尾，一版用dos2unix就可以将文件转换正常 vim提供了这个支持:e ++ff=dos，切换到dos文件模式 http://vim.wikia.com/wiki/File_format]]></description>
			<content:encoded><![CDATA[<p>win下面的文件到linux上后，有的时候会出现一个可恨的^M在行尾，一版用dos2unix就可以将文件转换正常</p>
<p>vim提供了这个支持:e ++ff=dos，切换到dos文件模式</p>
<p>http://vim.wikia.com/wiki/File_format</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neocanable.com/vim-tips-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>none</title>
		<link>http://www.neocanable.com/none/</link>
		<comments>http://www.neocanable.com/none/#comments</comments>
		<pubDate>Sat, 08 Oct 2011 05:42:48 +0000</pubDate>
		<dc:creator>Neo</dc:creator>
				<category><![CDATA[其他]]></category>

		<guid isPermaLink="false">http://www.neocanable.com/?p=476</guid>
		<description><![CDATA[我已经入戏，别人还在游离状态 -EOS- 我沦陷了:)]]></description>
			<content:encoded><![CDATA[<p>我已经入戏，别人还在游离状态</p>
<p>-EOS-<br />
我沦陷了:)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.neocanable.com/none/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>how to disable user account in linux</title>
		<link>http://www.neocanable.com/how-to-disable-user-in-linu/</link>
		<comments>http://www.neocanable.com/how-to-disable-user-in-linu/#comments</comments>
		<pubDate>Fri, 07 Oct 2011 07:19:03 +0000</pubDate>
		<dc:creator>Neo</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.neocanable.com/?p=471</guid>
		<description><![CDATA[方法1： 将/etc/shadow中的user的密码域加一个*或者! 方法2： passwd &#60;user&#62; l,解开的时候passwd &#60;user&#62; u 方法3： 将/etc/passwd中该用户那行注视掉]]></description>
			<content:encoded><![CDATA[<p>方法1：</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">将<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>shadow中的user的密码域加一个<span style="color: #000000; font-weight: bold;">*</span>或者<span style="color: #000000; font-weight: bold;">!</span></div></div>
<p>方法2：</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">passwd</span> <span style="color: #000000; font-weight: bold;">&lt;</span>user<span style="color: #000000; font-weight: bold;">&gt;</span> l,解开的时候<span style="color: #c20cb9; font-weight: bold;">passwd</span> <span style="color: #000000; font-weight: bold;">&lt;</span>user<span style="color: #000000; font-weight: bold;">&gt;</span> u</div></div>
<p>方法3：</p>
<div class="codecolorer-container bash vibrant" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">将<span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">passwd</span>中该用户那行注视掉</div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.neocanable.com/how-to-disable-user-in-linu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

