<?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>sourcode</title>
	<atom:link href="http://sourcode.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://sourcode.net</link>
	<description>There is something about me.</description>
	<lastBuildDate>Mon, 22 Apr 2013 08:43:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<div id="fb-root"></div>

			<script>(function(d, s, id) {

			  var js, fjs = d.getElementsByTagName(s)[0];

			  if (d.getElementById(id)) return;

			  js = d.createElement(s); js.id = id;

			  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";

			  fjs.parentNode.insertBefore(js, fjs);

			}(document, 'script', 'facebook-jssdk'));</script>	<item>
		<title>flush memcached</title>
		<link>http://sourcode.net/flush-memcached/</link>
		<comments>http://sourcode.net/flush-memcached/#comments</comments>
		<pubDate>Mon, 22 Apr 2013 08:43:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[memcached]]></category>

		<guid isPermaLink="false">http://sourcode.net/?p=1652</guid>
		<description><![CDATA[echo &#8216;flush_all&#8217; &#124; nc 127.0.0.1 11211 or echo &#8216;flush_all&#8217; &#124; netcat 127.0.0.1 11211 or nc 127.0.0.1 11211]]></description>
				<content:encoded><![CDATA[<blockquote><p>echo &#8216;flush_all&#8217; | nc 127.0.0.1 11211</p>
<p>or</p>
<p>echo &#8216;flush_all&#8217; | netcat 127.0.0.1 11211</p>
<p>or</p>
<p>nc 127.0.0.1 11211<<<"flush_all"
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://sourcode.net/flush-memcached/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>default password</title>
		<link>http://sourcode.net/default-password/</link>
		<comments>http://sourcode.net/default-password/#comments</comments>
		<pubDate>Sat, 20 Apr 2013 07:07:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[life]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[hack]]></category>

		<guid isPermaLink="false">http://sourcode.net/?p=1650</guid>
		<description><![CDATA[admin:tot admin:ttt admin:true admin:mi^8viNxvgi=yjo admin:3bb]]></description>
				<content:encoded><![CDATA[<blockquote><p>admin:tot<br />
admin:ttt<br />
admin:true<br />
admin:mi^8viNxvgi=yjo<br />
admin:3bb</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://sourcode.net/default-password/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>an upstream response is buffered to a temporary file</title>
		<link>http://sourcode.net/an-upstream-response-is-buffered-to-a-temporary-file/</link>
		<comments>http://sourcode.net/an-upstream-response-is-buffered-to-a-temporary-file/#comments</comments>
		<pubDate>Fri, 19 Apr 2013 18:23:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://sourcode.net/?p=1648</guid>
		<description><![CDATA[an upstream response is buffered to a temporary file จะเกิด warning แบบนี้ใน nginx error log เพราะ cache ที่เราตั้งไว้มันไม่พอใช้ครับ แก้ไขได้โดย เพิ่ม cache size ครับ fastcgi_buffer_size 4k; fastcgi_buffers 256 4k; ref: http://wiki.nginx.org/HttpFastcgiModule]]></description>
				<content:encoded><![CDATA[<p>an upstream response is buffered to a temporary file </p>
<p>จะเกิด warning แบบนี้ใน nginx error log เพราะ cache ที่เราตั้งไว้มันไม่พอใช้ครับ<br />
แก้ไขได้โดย เพิ่ม cache size ครับ</p>
<p>fastcgi_buffer_size 4k;<br />
fastcgi_buffers 256 4k;</p>
<p>ref:<br />
<a href="http://wiki.nginx.org/HttpFastcgiModule">http://wiki.nginx.org/HttpFastcgiModule</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sourcode.net/an-upstream-response-is-buffered-to-a-temporary-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>elasticsearch on debian squeeze</title>
		<link>http://sourcode.net/elasticsearch-on-debian-squeeze/</link>
		<comments>http://sourcode.net/elasticsearch-on-debian-squeeze/#comments</comments>
		<pubDate>Wed, 10 Apr 2013 06:59:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[elasticsearch]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://sourcode.net/?p=1645</guid>
		<description><![CDATA[เสร็จ!]]></description>
				<content:encoded><![CDATA[<pre class="brush: plain; title: ; notranslate">
aptitude install openjdk-6-jre default-jre openjdk-6-jre-headless default-jre-headless
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.20.6.deb
dpkg -i elasticsearch-0.20.6.deb
</pre>
<p>เสร็จ!</p>
]]></content:encoded>
			<wfw:commentRss>http://sourcode.net/elasticsearch-on-debian-squeeze/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ruby 1.9.3  for Debian Squeeze</title>
		<link>http://sourcode.net/ruby-1-9-3-for-debian-squeeze/</link>
		<comments>http://sourcode.net/ruby-1-9-3-for-debian-squeeze/#comments</comments>
		<pubDate>Fri, 29 Mar 2013 09:41:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[squeeze]]></category>

		<guid isPermaLink="false">http://sourcode.net/?p=1641</guid>
		<description><![CDATA[# From a fresh install of squeeze apt-get install ruby rubygems # Need ruby to use fpm gem1.8 install fpm &#8211;no-ri &#8211;no-rdoc apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev ncurses-dev libyaml-dev wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz tar -zxvf ruby-1.9.3-p125.tar.gz cd ruby-1.9.3-p125 rm -rf /tmp/ruby193 time (./configure &#8211;prefix=/usr &#038;&#038; make &#038;&#038; make install DESTDIR=/tmp/ruby193) /var/lib/gems/1.8/bin/fpm -s dir [...]]]></description>
				<content:encoded><![CDATA[<p># From a fresh install of squeeze<br />
apt-get install ruby rubygems # Need ruby to use fpm<br />
gem1.8 install fpm &#8211;no-ri &#8211;no-rdoc</p>
<p>apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev ncurses-dev libyaml-dev</p>
<p>wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz<br />
tar -zxvf ruby-1.9.3-p125.tar.gz<br />
cd ruby-1.9.3-p125<br />
rm -rf /tmp/ruby193<br />
time (./configure &#8211;prefix=/usr &#038;&#038; make &#038;&#038; make install DESTDIR=/tmp/ruby193)</p>
<p>/var/lib/gems/1.8/bin/fpm -s dir -t deb -n ruby193 -v 1.9.3-p125 &#8211;description &#8220;Self-packaged Ruby 1.9.3 patch 125&#8243; -C /tmp/ruby193 \<br />
  -p ruby193-VERSION_ARCH.deb -d &#8220;libstdc++6 (>= 4.4.3)&#8221; \<br />
  -d &#8220;libc6 (>= 2.6)&#8221; -d &#8220;libffi5 (>= 3.0.4)&#8221; -d &#8220;libgdbm3 (>= 1.8.3)&#8221; \<br />
  -d &#8220;libncurses5 (>= 5.7)&#8221; -d &#8220;libreadline6 (>= 6.1)&#8221; \<br />
  -d &#8220;libssl0.9.8 (>= 0.9.8)&#8221; -d &#8220;zlib1g (>= 1:1.2.2)&#8221; \<br />
  -d &#8220;libyaml-0-2 (>= 0.1.3)&#8221; \<br />
  usr/bin usr/lib usr/share/man usr/include</p>
<p># Post installation test<br />
apt-get remove ruby rubygems<br />
apt-get install libffi5 libyaml-0-2<br />
dpkg -i dpkg -i ruby193-1.9.3-p125_amd64.deb<br />
ruby -ropenssl -rzlib -rreadline -ryaml -e &#8220;puts :success&#8221; </p>
<p>credit:<br />
<a href="https://gist.github.com/futuremill/2318876">https://gist.github.com/futuremill/2318876</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sourcode.net/ruby-1-9-3-for-debian-squeeze/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>no JDK found &#8211; please set JAVA_HOME &#8230; failed!</title>
		<link>http://sourcode.net/no-jdk-found-please-set-java_home-failed/</link>
		<comments>http://sourcode.net/no-jdk-found-please-set-java_home-failed/#comments</comments>
		<pubDate>Fri, 29 Mar 2013 05:57:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[่java]]></category>

		<guid isPermaLink="false">http://sourcode.net/?p=1636</guid>
		<description><![CDATA[แก้ไข /etc/bash.bashrc เพิ่ม ถ้าเป็น JAVA 8]]></description>
				<content:encoded><![CDATA[<p>แก้ไข</p>
<blockquote><p>/etc/bash.bashrc
</p></blockquote>
<p>เพิ่ม</p>
<pre class="brush: plain; title: ; notranslate">
#Java Environment Variable
JAVA_HOME=/usr/lib/jvm/jdk1.7.0/
export JAVA_HOME
JRE_HOME=/usr/lib/jvm/jdk1.7.0/jre
export JRE_HOME
PATH=$PATH:$JAVA_HOME:$JRE_HOME
export PATH
</pre>
<p>ถ้าเป็น JAVA 8 </p>
<pre class="brush: plain; title: ; notranslate">
#Java Environment Variable
JAVA_HOME=/usr/lib/jvm/jdk1.8.0/
export JAVA_HOME
JRE_HOME=/usr/lib/jvm/jdk1.8.0/jre
export JRE_HOME
PATH=$PATH:$JAVA_HOME:$JRE_HOME
export PATH
</pre>
]]></content:encoded>
			<wfw:commentRss>http://sourcode.net/no-jdk-found-please-set-java_home-failed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>favicon.ico with Nginx</title>
		<link>http://sourcode.net/favicon-ico-with-nginx/</link>
		<comments>http://sourcode.net/favicon-ico-with-nginx/#comments</comments>
		<pubDate>Wed, 27 Mar 2013 10:31:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[favicon]]></category>
		<category><![CDATA[nginx]]></category>

		<guid isPermaLink="false">http://sourcode.net/?p=1633</guid>
		<description><![CDATA[ท่าานเจอกับปัญหา nginx error log โชว์แต่ error ว่าไม่พบ favicon.ico ใช่หรือไม่? 2013/03/27 14:48:45 [error] 7924#0: *2436 open() &#8220;/home/nginx/activity.xxx.com/htdocs/favicon.ico&#8221; failed (2: No such file or directory), client: 119.44.16.42, server: activity.xxx.com, request: &#8220;GET /favicon.ico HTTP/1.1&#8243;, host: &#8220;praew.xxx.com&#8221; 2013/03/27 14:48:48 [error] 7924#0: *2436 open() &#8220;/home/nginx/activity.xxx.com/htdocs/favicon.ico&#8221; failed (2: No such file or directory), client: 119.44.16.42, server: activity.xxx.com, request: &#8220;GET /favicon.ico HTTP/1.1&#8243;, [...]]]></description>
				<content:encoded><![CDATA[<p>ท่าานเจอกับปัญหา nginx error log โชว์แต่ error ว่าไม่พบ favicon.ico ใช่หรือไม่?</p>
<blockquote><p>2013/03/27 14:48:45 [error] 7924#0: *2436 open() &#8220;/home/nginx/activity.xxx.com/htdocs/favicon.ico&#8221; failed (2: No such file or directory), client: 119.44.16.42, server: activity.xxx.com, request: &#8220;GET /favicon.ico HTTP/1.1&#8243;, host: &#8220;praew.xxx.com&#8221;<br />
2013/03/27 14:48:48 [error] 7924#0: *2436 open() &#8220;/home/nginx/activity.xxx.com/htdocs/favicon.ico&#8221; failed (2: No such file or directory), client: 119.44.16.42, server: activity.xxx.com, request: &#8220;GET /favicon.ico HTTP/1.1&#8243;, host: &#8220;praew.xxx.com&#8221;<br />
2013/03/27 14:48:50 [error] 7924#0: *2436 open() &#8220;/home/nginx/activity.xxx.com/htdocs/favicon.ico&#8221; failed (2: No such file or directory), client: 119.44.16.42, server: activity.xxx.com, request: &#8220;GET /favicon.ico HTTP/1.1&#8243;, host: &#8220;praew.xxx.com&#8221;</p></blockquote>
<p>ทางแก้คือ.. บอกให้ nginx ส่งค่า 204 ไปยัง browser ครับ</p>
<p>nginx.conf</p>
<pre class="brush: plain; title: ; notranslate">
http {
....
...
..
.
server {
        location = /favicon.ico {
                return 204;
                access_log     off;
                log_not_found  off;
                }
        }
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://sourcode.net/favicon-ico-with-nginx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>epeg VS imagemagick</title>
		<link>http://sourcode.net/epeg-vs-imagemagick/</link>
		<comments>http://sourcode.net/epeg-vs-imagemagick/#comments</comments>
		<pubDate>Mon, 18 Mar 2013 12:44:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[epeg]]></category>
		<category><![CDATA[imagemagick]]></category>

		<guid isPermaLink="false">http://sourcode.net/?p=1626</guid>
		<description><![CDATA[คือแบบว่า imagemagick มันช้าครับ เลยต้องหาวิธีที่จะ convert ได้ไวไว เลยไปเจอกับ epeg ทดสอบการใช้งาน เร็วสุดชีวิต! ref: http://superuser.com/questions/249646/fastest-jpeg-thumbnail-generator-for-linux]]></description>
				<content:encoded><![CDATA[<p>คือแบบว่า imagemagick มันช้าครับ<br />
เลยต้องหาวิธีที่จะ convert ได้ไวไว เลยไปเจอกับ epeg</p>
<pre class="brush: plain; title: ; notranslate">
# git clone git://github.com/mattes/epeg.git
# aptitude install build-essential cdbs debhelper libjpeg62-dev automake 
# ./configure
# make 
# make install
# cp src/lib/.libs/libepeg.so* /usr/lib/
</pre>
<p>ทดสอบการใช้งาน</p>
<pre class="brush: plain; title: ; notranslate">
root@server:# time convert -resize 230 london-hq-sunny.jpg london-hq-sunny_230.jpg 

real	0m0.889s
user	0m0.336s
sys	0m0.032s

root@server:#  time epeg -w 230 -h 144 london-hq-sunny.jpg london-hq-sunny_230.jpg

real	0m0.016s
user	0m0.004s
sys	0m0.012s
</pre>
<p>เร็วสุดชีวิต!</p>
<p>ref:<br />
<a href="http://superuser.com/questions/249646/fastest-jpeg-thumbnail-generator-for-linux">http://superuser.com/questions/249646/fastest-jpeg-thumbnail-generator-for-linux</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sourcode.net/epeg-vs-imagemagick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Argument list too long</title>
		<link>http://sourcode.net/argument-list-too-long/</link>
		<comments>http://sourcode.net/argument-list-too-long/#comments</comments>
		<pubDate>Mon, 18 Mar 2013 08:40:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[command]]></category>

		<guid isPermaLink="false">http://sourcode.net/?p=1622</guid>
		<description><![CDATA[ปัญหาแบบนี้ แก้โดย หรือ หรือแบบยากๆเลย http://www.linuxjournal.com/article/6060]]></description>
				<content:encoded><![CDATA[<p>ปัญหาแบบนี้</p>
<pre class="brush: bash; title: ; notranslate">
$ mv item_display/* ../item_display/
bash: /bin/mv: Argument list too long
</pre>
<p>แก้โดย</p>
<pre class="brush: bash; title: ; notranslate">
find /path/to/file -type f | xargs -i mv “{}” /path/to/move
</pre>
<p>หรือ</p>
<pre class="brush: bash; title: ; notranslate">
find /path/to/file -type f -name '*' -exec mv {} /path/to/move/. \;
</pre>
<p>หรือแบบยากๆเลย</p>
<p><a href="http://www.linuxjournal.com/article/6060">http://www.linuxjournal.com/article/6060</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sourcode.net/argument-list-too-long/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>register_globals in drupal</title>
		<link>http://sourcode.net/register_globals-in-drupal/</link>
		<comments>http://sourcode.net/register_globals-in-drupal/#comments</comments>
		<pubDate>Sat, 16 Mar 2013 19:24:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://sourcode.net/?p=1619</guid>
		<description><![CDATA[เมื่อติดตั้ง drupal แล้วเจอปัญหาว่า Requirements problem The following error must be resolved before you can continue the installation process: register_globals is enabled. Drupal requires this configuration directive to be disabled. Your site may not be secure when register_globals is enabled. The PHP manual has instructions for how to change configuration settings. (Currently using PHP register globals [...]]]></description>
				<content:encoded><![CDATA[<p>เมื่อติดตั้ง drupal แล้วเจอปัญหาว่า</p>
<blockquote><p>Requirements problem<br />
The following error must be resolved before you can continue the installation process:<br />
register_globals is enabled. Drupal requires this configuration directive to be disabled. Your site may not be secure when register_globals is enabled. The PHP manual has instructions for how to change configuration settings. (Currently using PHP register globals Enabled (&#8217;1&#8242;))
</p></blockquote>
<p>แก้ได้ด้วยตัวเองโดยไม่ต้องบอกให้ system admin แก้ไขระบบ ด้วยการ</p>
<p>สร้าง php.ini ไว้ที่ root document โดยมีข้อมูลข้างใน คือ</p>
<pre class="brush: plain; title: ; notranslate"> 
[PHP]
register_globals = Off
</pre>
<p>ref :<br />
<a href="http://drupal.org/node/216882">http://drupal.org/node/216882</a></p>
]]></content:encoded>
			<wfw:commentRss>http://sourcode.net/register_globals-in-drupal/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
