<?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>MEMOBALL.info &#187; Linux</title>
	<atom:link href="http://www.memoball.info/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.memoball.info</link>
	<description>All of my Memories</description>
	<lastBuildDate>Sun, 17 Jul 2011 10:31:01 +0000</lastBuildDate>
	<language>TH</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2</generator>
		<item>
		<title>ใส่สีให้ trac (Syntax Coloring) ด้วย pygments และ svn MIME Types properties</title>
		<link>http://www.memoball.info/2010/09/05/%e0%b9%83%e0%b8%aa%e0%b9%88%e0%b8%aa%e0%b8%b5%e0%b9%83%e0%b8%ab%e0%b9%89-trac-syntax-coloring-%e0%b8%94%e0%b9%89%e0%b8%a7%e0%b8%a2-pygments-%e0%b9%81%e0%b8%a5%e0%b8%b0-svn-mime-types-properties/</link>
		<comments>http://www.memoball.info/2010/09/05/%e0%b9%83%e0%b8%aa%e0%b9%88%e0%b8%aa%e0%b8%b5%e0%b9%83%e0%b8%ab%e0%b9%89-trac-syntax-coloring-%e0%b8%94%e0%b9%89%e0%b8%a7%e0%b8%a2-pygments-%e0%b9%81%e0%b8%a5%e0%b8%b0-svn-mime-types-properties/#comments</comments>
		<pubDate>Sun, 05 Sep 2010 04:14:08 +0000</pubDate>
		<dc:creator>memoball</dc:creator>
				<category><![CDATA[Application]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Trac & SVN]]></category>
		<category><![CDATA[trac]]></category>

		<guid isPermaLink="false">http://memoball.memoball.com/?p=494</guid>
		<description><![CDATA[วิธีการติดตั้ง เวลาที่ต้องการดู source code ถ้าจะให้อ่านง่าย จำเป็นต้องแสดงผลโดยใช้สีสันเข้ามาช่วย (highlight &#38; Syntax Coloring) ซึ่งใน Trac นั้น ก็มีเหมือนกัน โดยใน trac 0.11 เป็นต้นมา จะใช้ pygments ซึ่งมีมาให้อยู่แล้ว แต่เราจำเป็นต้องลง library นี้ในเครื่องก่อน $ svn propset svn:mime-type text/x-c++src example.cpp property 'svn:mime-type' set on 'example.cpp ' ถ้าลงแล้ว syntax coloring ยังไม่ปรากฎ แสดงว่า Trac ยังอ่าน file ของเราไม่รู้เรื่อง จำเป็นต้องกำหนด MIME type ในกับไฟล์ที่เราต้องการใน svn ก่อน easy_install Pygments MIME Type [...]]]></description>
			<content:encoded><![CDATA[<h2>วิธีการติดตั้ง</h2>
<p>เวลาที่ต้องการดู source code ถ้าจะให้อ่านง่าย จำเป็นต้องแสดงผลโดยใช้สีสันเข้ามาช่วย (highlight &amp; Syntax Coloring) ซึ่งใน Trac นั้น ก็มีเหมือนกัน โดยใน trac 0.11 เป็นต้นมา จะใช้ <a href="http://pygments.org">pygments</a> ซึ่งมีมาให้อยู่แล้ว แต่เราจำเป็นต้องลง library นี้ในเครื่องก่อน<br />
<span id="more-494"></span></p>
<pre>
$ svn propset svn:mime-type text/x-c++src example.cpp
property 'svn:mime-type' set on 'example.cpp '
</pre>
<p>ถ้าลงแล้ว syntax coloring ยังไม่ปรากฎ แสดงว่า Trac ยังอ่าน file ของเราไม่รู้เรื่อง จำเป็นต้องกำหนด MIME type ในกับไฟล์ที่เราต้องการใน svn ก่อน</p>
<pre>easy_install Pygments</pre>
<h2>MIME Type</h2>
<table>
<thead>
<tr>
<th>MIME Types</th>
<th>Programing Language &amp; File type</th>
</tr>
</thead>
<tbody>
<tr>
<th><tt>application/javascript</tt></th>
<td><code>js</code></td>
</tr>
<tr>
<th><tt>application/pdf</tt></th>
<td><code>pdf</code></td>
</tr>
<tr>
<th><tt>application/postscript</tt></th>
<td><code>ps</code></td>
</tr>
<tr>
<th><tt>application/rss+xml</tt></th>
<td><code>rss</code></td>
</tr>
<tr>
<th><tt>application/rtf</tt></th>
<td><code>rtf</code></td>
</tr>
<tr>
<th><tt>application/x-csh</tt></th>
<td><code>csh</code></td>
</tr>
<tr>
<th><tt>application/x-genshi</tt></th>
<td><code>genshi</code></td>
</tr>
<tr>
<th><tt>application/x-genshi-text</tt></th>
<td><code>genshitext</code></td>
</tr>
<tr>
<th><tt>application/x-sh</tt></th>
<td><code>sh</code></td>
</tr>
<tr>
<th><tt>application/x-troff</tt></th>
<td><code>nroff roff troff</code></td>
</tr>
<tr>
<th><tt>application/x-yaml</tt></th>
<td><code>yaml yml</code></td>
</tr>
<tr>
<th><tt>application/xsl+xml</tt></th>
<td><code>xsl</code></td>
</tr>
<tr>
<th><tt>application/xslt+xml</tt></th>
<td><code>xslt</code></td>
</tr>
<tr>
<th><tt>image/svg+xml</tt></th>
<td><code>svg</code></td>
</tr>
<tr>
<th><tt>image/x-icon</tt></th>
<td><code>ico</code></td>
</tr>
<tr>
<th><tt>model/vrml</tt></th>
<td><code>vrml wrl</code></td>
</tr>
<tr>
<th><tt>text/css</tt></th>
<td><code>css</code></td>
</tr>
<tr>
<th><tt>text/html</tt></th>
<td><code>htm html</code></td>
</tr>
<tr>
<th><tt>text/plain</tt></th>
<td><code>AUTHORS COPYING ChangeLog INSTALL README RELEASE TXT text txt</code></td>
</tr>
<tr>
<th><tt>text/x-ada</tt></th>
<td><code>ada</code></td>
</tr>
<tr>
<th><tt>text/x-asm</tt></th>
<td><code>asm</code></td>
</tr>
<tr>
<th><tt>text/x-asp</tt></th>
<td><code>asp</code></td>
</tr>
<tr>
<th><tt>text/x-awk</tt></th>
<td><code>awk</code></td>
</tr>
<tr>
<th><tt>text/x-c++hdr</tt></th>
<td><code>H HH c++hdr hh hpp</code></td>
</tr>
<tr>
<th><tt>text/x-c++src</tt></th>
<td><code>C C++ CC c++ c++src cc cpp</code></td>
</tr>
<tr>
<th><tt>text/x-chdr</tt></th>
<td><code>chdr h</code></td>
</tr>
<tr>
<th><tt>text/x-csharp</tt></th>
<td><code>C# c# cs csharp</code></td>
</tr>
<tr>
<th><tt>text/x-csrc</tt></th>
<td><code>c csrc xs</code></td>
</tr>
<tr>
<th><tt>text/x-diff</tt></th>
<td><code>diff patch</code></td>
</tr>
<tr>
<th><tt>text/x-eiffel</tt></th>
<td><code>e eiffel</code></td>
</tr>
<tr>
<th><tt>text/x-elisp</tt></th>
<td><code>el elisp</code></td>
</tr>
<tr>
<th><tt>text/x-fortran</tt></th>
<td><code>f fortran</code></td>
</tr>
<tr>
<th><tt>text/x-haskell</tt></th>
<td><code>haskell hs</code></td>
</tr>
<tr>
<th><tt>text/x-idl</tt></th>
<td><code>idl</code></td>
</tr>
<tr>
<th><tt>text/x-inf</tt></th>
<td><code>inf</code></td>
</tr>
<tr>
<th><tt>text/x-ini</tt></th>
<td><code>cfg ini</code></td>
</tr>
<tr>
<th><tt>text/x-java</tt></th>
<td><code>java</code></td>
</tr>
<tr>
<th><tt>text/x-ksh</tt></th>
<td><code>ksh</code></td>
</tr>
<tr>
<th><tt>text/x-lua</tt></th>
<td><code>lua</code></td>
</tr>
<tr>
<th><tt>text/x-m4</tt></th>
<td><code>m4</code></td>
</tr>
<tr>
<th><tt>text/x-mail</tt></th>
<td><code>mail</code></td>
</tr>
<tr>
<th><tt>text/x-makefile</tt></th>
<td><code>GNUMakefile Makefile make makefile mk</code></td>
</tr>
<tr>
<th><tt>text/x-objc</tt></th>
<td><code>m mm objc</code></td>
</tr>
<tr>
<th><tt>text/x-ocaml</tt></th>
<td><code>ml mli ocaml</code></td>
</tr>
<tr>
<th><tt>text/x-pascal</tt></th>
<td><code>pas pascal</code></td>
</tr>
<tr>
<th><tt>text/x-perl</tt></th>
<td><code>PL perl pl pm</code></td>
</tr>
<tr>
<th><tt>text/x-php</tt></th>
<td><code>php php3 php4</code></td>
</tr>
<tr>
<th><tt>text/x-psp</tt></th>
<td><code>psp</code></td>
</tr>
<tr>
<th><tt>text/x-pyrex</tt></th>
<td><code>pyrex pyx</code></td>
</tr>
<tr>
<th><tt>text/x-python</tt></th>
<td><code>py python</code></td>
</tr>
<tr>
<th><tt>text/x-python-doctest</tt></th>
<td><code>pycon</code></td>
</tr>
<tr>
<th><tt>text/x-rfc</tt></th>
<td><code>rfc</code></td>
</tr>
<tr>
<th><tt>text/x-rst</tt></th>
<td><code>rst</code></td>
</tr>
<tr>
<th><tt>text/x-ruby</tt></th>
<td><code>rb ruby</code></td>
</tr>
<tr>
<th><tt>text/x-scheme</tt></th>
<td><code>scheme scm</code></td>
</tr>
<tr>
<th><tt>text/x-sql</tt></th>
<td><code>sql</code></td>
</tr>
<tr>
<th><tt>text/x-tcl</tt></th>
<td><code>tcl</code></td>
</tr>
<tr>
<th><tt>text/x-tex</tt></th>
<td><code>tex</code></td>
</tr>
<tr>
<th><tt>text/x-textile</tt></th>
<td><code>textile txtl</code></td>
</tr>
<tr>
<th><tt>text/x-vba</tt></th>
<td><code>bas vb vba</code></td>
</tr>
<tr>
<th><tt>text/x-verilog</tt></th>
<td><code>v verilog</code></td>
</tr>
<tr>
<th><tt>text/x-vhdl</tt></th>
<td><code>vhd vhdl</code></td>
</tr>
<tr>
<th><tt>text/x-zsh</tt></th>
<td><code>zsh</code></td>
</tr>
<tr>
<th><tt>text/xml</tt></th>
<td><code>xml</code></td>
</tr>
</tbody>
</table>
<h2>Reference</h2>
<p>svn propset : <a href="http://svnbook.red-bean.com/en/1.1/re23.html">http://svnbook.red-bean.com/en/1.1/re23.html</a><br />
Trac : <a href="http://trac.edgewall.org/wiki/TracSyntaxColoring">http://trac.edgewall.org/wiki/TracSyntaxColoring</a><br />
Pygments : <a href="http://pygments.org/">http://pygments.org/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/2010/09/05/%e0%b9%83%e0%b8%aa%e0%b9%88%e0%b8%aa%e0%b8%b5%e0%b9%83%e0%b8%ab%e0%b9%89-trac-syntax-coloring-%e0%b8%94%e0%b9%89%e0%b8%a7%e0%b8%a2-pygments-%e0%b9%81%e0%b8%a5%e0%b8%b0-svn-mime-types-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>http proxy สำหรับ apt-get</title>
		<link>http://www.memoball.info/2010/07/22/http-proxy-%e0%b8%aa%e0%b8%b3%e0%b8%ab%e0%b8%a3%e0%b8%b1%e0%b8%9a-apt-get/</link>
		<comments>http://www.memoball.info/2010/07/22/http-proxy-%e0%b8%aa%e0%b8%b3%e0%b8%ab%e0%b8%a3%e0%b8%b1%e0%b8%9a-apt-get/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 03:27:20 +0000</pubDate>
		<dc:creator>memoball</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=474</guid>
		<description><![CDATA[ในกรณีที่เครื่องของเราอยู่หลังเครื่อง proxy เช่น เครื่องใน office ทั่วไป จะไม่สามารถใช้งาน apt-get ได้เนื่องจาก apt-get ต้องไปดึง file ผ่าน http ซึ่งไม่สามารวิ่งทะลุผ่าน gateway ได้โดยตรง apt-get จึงต้องวิ่งผ่าน proxy โดยสามารถทำได้โดยเติม ใน file .bashrc ใน home directory # apt-get proxy export http_proxy=http://[proxy ID or domain]:[port]/ export ftp_proxy=ftp://[proxy ID or domain]:[port]/ อย่าลืม log in ใหม่ แต่ในกรณีจากการทดสอบ จะไม่สามารถใช้ sudo ได้ เพราะมันจะไม่โหลด environment ของ user ของเราไปด้วย ดังนั้นจึงต้องเข้าด้วย sudo [...]]]></description>
			<content:encoded><![CDATA[<p>ในกรณีที่เครื่องของเราอยู่หลังเครื่อง proxy เช่น เครื่องใน office ทั่วไป จะไม่สามารถใช้งาน apt-get ได้เนื่องจาก apt-get ต้องไปดึง file ผ่าน http ซึ่งไม่สามารวิ่งทะลุผ่าน gateway ได้โดยตรง<br />
apt-get จึงต้องวิ่งผ่าน proxy โดยสามารถทำได้โดยเติม ใน file <strong>.bashrc </strong>ใน home directory</p>
<pre>
# apt-get proxy
export http_proxy=http://[proxy ID or domain]:[port]/
export ftp_proxy=ftp://[proxy ID or domain]:[port]/
</pre>
<p>อย่าลืม log in ใหม่<br />
แต่ในกรณีจากการทดสอบ จะไม่สามารถใช้ sudo ได้ เพราะมันจะไม่โหลด environment ของ user ของเราไปด้วย ดังนั้นจึงต้องเข้าด้วย sudo -s เพื่อไปเป็น root ก่อน<br />
เมื่อเข้าไปแล้วลอง export environment ออกมาดู จะเป็น http_proxy เป็นค่าที่เราใส่เข้าไป</p>
<pre>
user# export
</pre>
<p>จะสังเกตว่าปลายทางที่เราไปดึงข้อมูลจะเป็น ip หรือ domain ของ proxy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/2010/07/22/http-proxy-%e0%b8%aa%e0%b8%b3%e0%b8%ab%e0%b8%a3%e0%b8%b1%e0%b8%9a-apt-get/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Memcache &amp; MySQL PHP Session Handler</title>
		<link>http://www.memoball.info/2010/03/25/memcache-mysql-php-session-handler/</link>
		<comments>http://www.memoball.info/2010/03/25/memcache-mysql-php-session-handler/#comments</comments>
		<pubDate>Thu, 25 Mar 2010 04:19:56 +0000</pubDate>
		<dc:creator>memoball</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=457</guid>
		<description><![CDATA[ช่วงนี้กำลังหาโซลูชั้นเพื่อที่จะทำ centralized session ตรงกลาง เพราะเนื่องจากเริ่มมี web application หลายตัว และในบางส่วนจำเป็นต้องมีการใช้ session ร่วมกัน จึงหาการแก้ปัญหาที่ตอบโจทย์ดังกล่าวว่าจะมีการรวม session มาไว้ที่เดียวกันและมีประสิทธิภาพสูงสุดได้อย่างไร ซึ่งในโซลูชั่นสุดท้ายผมคงต้องขอไม่พูดถึง เพี่อเป็นความปลอดภัยของระบบ แต่จะกล่าวแค่เฉพาะแนวคิดเฉยๆ ครับ การทำ centralized session หรือ เซสชั่นกลางนั้น เราสามารถทำได้ง่ายๆ โดยการหาตัวมารับหน้าที่เป็น data pool หรือที่เก็บรวบรวมข้อมูลตรงกลาง ซึ่งที่ผมจะนำไปใช้คือ MySQL สำหรับ บรรจุข้อมูลตรงกลาง ทุกเครื่องสามารถนำไปใช้งานได้ โดยเป็นข้อมูลเดียวกัน แต่เนื่องจาก MySQL จะทำการ update cache ทุกครั้งที่กำการอัพเดตข้อมูล http://pureform.wordpress.com/2009/04/08/memcache-mysql-php-session-handler/ This is protected content. Please Login or Register for access.ช่วงนี้กำลังหาโซลูชั้นเพื่อที่จะทำ centralized session ตรงกลาง เพราะเนื่องจากเริ่มมี [...]]]></description>
			<content:encoded><![CDATA[<p>ช่วงนี้กำลังหาโซลูชั้นเพื่อที่จะทำ centralized session ตรงกลาง เพราะเนื่องจากเริ่มมี web application หลายตัว และในบางส่วนจำเป็นต้องมีการใช้ session ร่วมกัน จึงหาการแก้ปัญหาที่ตอบโจทย์ดังกล่าวว่าจะมีการรวม session มาไว้ที่เดียวกันและมีประสิทธิภาพสูงสุดได้อย่างไร ซึ่งในโซลูชั่นสุดท้ายผมคงต้องขอไม่พูดถึง เพี่อเป็นความปลอดภัยของระบบ แต่จะกล่าวแค่เฉพาะแนวคิดเฉยๆ ครับ</p>
<p>การทำ centralized session หรือ เซสชั่นกลางนั้น เราสามารถทำได้ง่ายๆ โดยการหาตัวมารับหน้าที่เป็น data pool หรือที่เก็บรวบรวมข้อมูลตรงกลาง ซึ่งที่ผมจะนำไปใช้คือ MySQL สำหรับ บรรจุข้อมูลตรงกลาง ทุกเครื่องสามารถนำไปใช้งานได้ โดยเป็นข้อมูลเดียวกัน แต่เนื่องจาก MySQL จะทำการ update cache ทุกครั้งที่กำการอัพเดตข้อมูล</p>
<p><a href="http://pureform.wordpress.com/2009/04/08/memcache-mysql-php-session-handler/">http://pureform.wordpress.com/2009/04/08/memcache-mysql-php-session-handler/</a><br />
<br/><div id="wp-private-box"><b>This is protected content. Please <a href="http://www.memoball.info/wp-login.php">Login</a> or <a href="http://www.memoball.info/wp-register.php">Register</a> for access.</b></div><br/><p>ช่วงนี้กำลังหาโซลูชั้นเพื่อที่จะทำ centralized session ตรงกลาง เพราะเนื่องจากเริ่มมี web application หลายตัว และในบางส่วนจำเป็นต้องมีการใช้ session ร่วมกัน จึงหาการแก้ปัญหาที่ตอบโจทย์ดังกล่าวว่าจะมีการรวม session มาไว้ที่เดียวกันและมีประสิทธิภาพสูงสุดได้อย่างไร ซึ่งในโซลูชั่นสุดท้ายผมคงต้องขอไม่พูดถึง เพี่อเป็นความปลอดภัยของระบบ แต่จะกล่าวแค่เฉพาะแนวคิดเฉยๆ ครับ</p>
<p>การทำ centralized session หรือ เซสชั่นกลางนั้น เราสามารถทำได้ง่ายๆ โดยการหาตัวมารับหน้าที่เป็น data pool หรือที่เก็บรวบรวมข้อมูลตรงกลาง ซึ่งที่ผมจะนำไปใช้คือ MySQL สำหรับ บรรจุข้อมูลตรงกลาง ทุกเครื่องสามารถนำไปใช้งานได้ โดยเป็นข้อมูลเดียวกัน แต่เนื่องจาก MySQL จะทำการ update cache ทุกครั้งที่กำการอัพเดตข้อมูล</p>
<p><a href="http://pureform.wordpress.com/2009/04/08/memcache-mysql-php-session-handler/">http://pureform.wordpress.com/2009/04/08/memcache-mysql-php-session-handler/</a><br />
<!--protected--></p>
<pre>
memcache = new Memcache;
            $this-&gt;lifeTime = intval(ini_get("session.gc_maxlifetime"));
            $this-&gt;initSessionData = null;
            $this-&gt;memcache-&gt;connect("127.0.0.1",11211);

            return true;
        }

        function open($savePath,$sessionName) {
            $sessionID = session_id();
            if ($sessionID !== "") {
                $this-&gt;initSessionData = $this-&gt;read($sessionID);
            }

            return true;
        }

        function close() {
            $this-&gt;lifeTime = null;
            $this-&gt;memcache = null;
            $this-&gt;initSessionData = null;

            return true;
        }

        function read($sessionID) {
            $data = $this-&gt;memcache-&gt;get($sessionID);
            if ($data === false) {
                # Couldn't find it in MC, ask the DB for it

                $sessionIDEscaped = mysql_real_escape_string($sessionID);
                $r = mysql_query("SELECT `sessionData` FROM `tblsessions` WHERE `sessionID`='$sessionIDEscaped'");
                if (is_resource($r) &amp;&amp; (mysql_num_rows($r) !== 0)) {
                    $data = mysql_result($r,0,"sessionData");
                }

                # Refresh MC key: [Thanks Cal <img src='http://www.memoball.info/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> ]
                $this-&gt;memcache-&gt;set($sessionID,$data,false,$this-&gt;lifeTime);
            }

            # The default miss for MC is (bool) false, so return it
            return $data;
        }

        function write($sessionID,$data) {
            # This is called upon script termination or when session_write_close() is called, which ever is first.
            $result = $this-&gt;memcache-&gt;set($sessionID,$data,false,$this-&gt;lifeTime);

            if ($this-&gt;initSessionData !== $data) {
                $sessionID = mysql_real_escape_string($sessionID);
                $sessionExpirationTS = ($this-&gt;lifeTime + time());
                $sessionData = mysql_real_escape_string($data);

                $r = mysql_query("REPLACE INTO `tblsessions` (`sessionID`,`sessionExpirationTS`,`sessionData`) VALUES('$sessionID',$sessionExpirationTS,'$sessionData')");
                $result = is_resource($r);
            }

            return $result;
        }

        function destroy($sessionID) {
            # Called when a user logs out...
            $this-&gt;memcache-&gt;delete($sessionID);
            $sessionID = mysql_real_escape_string($sessionID);
            mysql_query("DELETE FROM `tblsessions` WHERE `sessionID`='$sessionID'");

            return true;
        }

        function gc($maxlifetime) {
            # We need this atomic so it can clear MC keys as well...
            $r = mysql_query("SELECT `sessionID` FROM `tblsessions` WHERE `sessionExpirationTS`lifeTime));
            if (is_resource($r) &amp;&amp; (($rows = mysql_num_rows($r)) !== 0)) {
                for ($i=0;$idestroy(mysql_result($r,$i,"sessionID"));
                }
            }

            return true;
        }
    }

    ini_set("session.gc_maxlifetime",60 * 30); # 30 minutes
    session_set_cookie_params(0,"/",".myapp.com",false,true);
    session_name("MYAPPSESSION");
    $sessionHandler = new SessionHandler();
    session_set_save_handler(array (&amp;$sessionHandler,"open"),array (&amp;$sessionHandler,"close"),array (&amp;$sessionHandler,"read"),array (&amp;$sessionHandler,"write"),array (&amp;$sessionHandler,"destroy"),array (&amp;$sessionHandler,"gc"));
    session_start();
?&gt;
</pre>
<p><!--protected--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/2010/03/25/memcache-mysql-php-session-handler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Thinkpad mouse x200si trackpoint</title>
		<link>http://www.memoball.info/2010/02/18/thinkpad-mouse-x200si-trackpoint/</link>
		<comments>http://www.memoball.info/2010/02/18/thinkpad-mouse-x200si-trackpoint/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 07:48:17 +0000</pubDate>
		<dc:creator>memoball</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=444</guid>
		<description><![CDATA[setup การใช้ thinkpad ครับ http://www.thinkwiki.org/wiki/How_to_configure_the_TrackPoint This is protected content. Please Login or Register for access.]]></description>
			<content:encoded><![CDATA[<p>setup การใช้ thinkpad ครับ <a href="http://www.thinkwiki.org/wiki/How_to_configure_the_TrackPoint">http://www.thinkwiki.org/wiki/How_to_configure_the_TrackPoint</a></p>
<p><br/><div id="wp-private-box"><b>This is protected content. Please <a href="http://www.memoball.info/wp-login.php">Login</a> or <a href="http://www.memoball.info/wp-register.php">Register</a> for access.</b></div><br/><!--/protected--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/2010/02/18/thinkpad-mouse-x200si-trackpoint/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ติดตั้ง (Install) Samba Server บน Ubuntu</title>
		<link>http://www.memoball.info/2009/10/10/%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-install-samba-server-%e0%b8%9a%e0%b8%99-ubuntu/</link>
		<comments>http://www.memoball.info/2009/10/10/%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-install-samba-server-%e0%b8%9a%e0%b8%99-ubuntu/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 17:46:45 +0000</pubDate>
		<dc:creator>memoball</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=416</guid>
		<description><![CDATA[นำความรู้เก่าที่การเปิดใช้งานระบบ file sharing บนวินโดว์ หรือ samba บนเครื่อง Ubuntu วิธีทำ ก็ง่ายแสนง่าย ดังนี้]]></description>
			<content:encoded><![CDATA[<p>นำความรู้เก่าที่การเปิดใช้งานระบบ file sharing บนวินโดว์ หรือ samba บนเครื่อง Ubuntu<br />
วิธีทำ ก็ง่ายแสนง่าย  ดังนี้</p>
<p><!--WIKI "#Install Samba Server บน Ubuntu#"--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/2009/10/10/%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-install-samba-server-%e0%b8%9a%e0%b8%99-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>การติดตั้ง SVN &amp; Trac ร่วมกับ Apache ใน Ubuntu</title>
		<link>http://www.memoball.info/2009/10/02/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-svn-trac-%e0%b8%a3%e0%b9%88%e0%b8%a7%e0%b8%a1%e0%b8%81%e0%b8%b1%e0%b8%9a-apache-%e0%b9%83%e0%b8%99-ubun/</link>
		<comments>http://www.memoball.info/2009/10/02/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-svn-trac-%e0%b8%a3%e0%b9%88%e0%b8%a7%e0%b8%a1%e0%b8%81%e0%b8%b1%e0%b8%9a-apache-%e0%b9%83%e0%b8%99-ubun/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 09:11:46 +0000</pubDate>
		<dc:creator>memoball</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[trac]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=411</guid>
		<description><![CDATA[ช่วงนี้กำลังปรับปรุงระบบ SVN ใหม่อยู่ โดยจะให้การทำ authen ผ่าน .htaccess เดียวกันทั้ง SVN &#38; Trac จึงได้นำ SVN และ Trac มาผูกรวมกับ Apache ซึ่งเป็นวิธีการติดตั้งที่ง่ายกว่า และสะดวกกว่าการติดตั้งแบบที่นำเสนอครั้งก่อน โดยอาศัย dav_svn กับ mods_python เข้ามาช่วย เพิ่มเติม Syntax Coloring]]></description>
			<content:encoded><![CDATA[<p>ช่วงนี้กำลังปรับปรุงระบบ SVN ใหม่อยู่ โดยจะให้การทำ authen ผ่าน .htaccess เดียวกันทั้ง SVN &amp; Trac<br />
จึงได้นำ SVN และ Trac มาผูกรวมกับ Apache ซึ่งเป็นวิธีการติดตั้งที่ง่ายกว่า และสะดวกกว่า<a href="http://www.memoball.info/01/%E0%B8%9B%E0%B8%B1%E0%B8%8D%E0%B8%AB%E0%B8%B2%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89-web-interface-%E0%B8%82%E0%B8%AD%E0%B8%87-trac/">การติดตั้งแบบที่นำเสนอครั้งก่อน</a> โดยอาศัย dav_svn กับ mods_python เข้ามาช่วย<br />
<span id="more-411"></span><br />
<!--WIKI "#SVN+Trac+apache2#" --></p>
<h2>เพิ่มเติม</h2>
<ul>
<li><a href="http://www.memoball.info/2010/09/05/%E0%B9%83%E0%B8%AA%E0%B9%88%E0%B8%AA%E0%B8%B5%E0%B9%83%E0%B8%AB%E0%B9%89-trac-syntax-coloring-%E0%B8%94%E0%B9%89%E0%B8%A7%E0%B8%A2-pygments-%E0%B9%81%E0%B8%A5%E0%B8%B0-svn-mime-types-properties/">Syntax Coloring</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/2009/10/02/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%95%e0%b8%b4%e0%b8%94%e0%b8%95%e0%b8%b1%e0%b9%89%e0%b8%87-svn-trac-%e0%b8%a3%e0%b9%88%e0%b8%a7%e0%b8%a1%e0%b8%81%e0%b8%b1%e0%b8%9a-apache-%e0%b9%83%e0%b8%99-ubun/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>VMWare Error : Failed to lock the file.</title>
		<link>http://www.memoball.info/2009/09/07/vmware-error-failed-to-lock-the-file/</link>
		<comments>http://www.memoball.info/2009/09/07/vmware-error-failed-to-lock-the-file/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 17:42:01 +0000</pubDate>
		<dc:creator>memoball</dc:creator>
				<category><![CDATA[Application]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[vmware]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=390</guid>
		<description><![CDATA[เมื่อเปิด vmware แล้วไม่สามารถ run vm ได้ แล้วขึ้น error ดังต่อไปนี้ Error: Cannot open the disk '/xxx/xxx/Virtual Machine/Virtual Machine.vmdk' or one of the snapshot disks it depends on. Reason: Failed to lock the file. วิธีแก้ไข ลบ directory ที่ชื่อว่า Virtual Machine.vmdk.lck ออกเสีย แล้ว start ถ้าไม่แน่ใจให้ move ไปไว้ในชื่ออื่นหรือทำ back up ไดเรคทรอรี่นี้เสียก่อนก็ได้]]></description>
			<content:encoded><![CDATA[<p>เมื่อเปิด vmware แล้วไม่สามารถ run vm ได้ แล้วขึ้น error ดังต่อไปนี้</p>
<pre>
Error:
Cannot open the disk '/xxx/xxx/Virtual Machine/Virtual Machine.vmdk'
or one of the snapshot disks it depends on.
Reason: Failed to lock the file.
</pre>
<h3>วิธีแก้ไข</h3>
<p>ลบ directory ที่ชื่อว่า Virtual Machine.vmdk.lck ออกเสีย แล้ว start<br />
ถ้าไม่แน่ใจให้ move ไปไว้ในชื่ออื่นหรือทำ back up ไดเรคทรอรี่นี้เสียก่อนก็ได้</p>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/2009/09/07/vmware-error-failed-to-lock-the-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>การทำ proxy tunnel โดยผ่าน ssh ใน ubuntu</title>
		<link>http://www.memoball.info/2009/08/16/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3-proxy-tunnel-%e0%b9%82%e0%b8%94%e0%b8%a2%e0%b8%9c%e0%b9%88%e0%b8%b2%e0%b8%99-ssh-%e0%b9%83%e0%b8%99-ubuntu/</link>
		<comments>http://www.memoball.info/2009/08/16/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3-proxy-tunnel-%e0%b9%82%e0%b8%94%e0%b8%a2%e0%b8%9c%e0%b9%88%e0%b8%b2%e0%b8%99-ssh-%e0%b9%83%e0%b8%99-ubuntu/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 14:34:27 +0000</pubDate>
		<dc:creator>memoball</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[proxy]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=360</guid>
		<description><![CDATA[อันนี้เขียนไว้ตั้งนานแล้ว แต่ยังไม่มีโอกาสให้เอาขึ้นมาบน memoball ซักที อยู่ใน wiki มานานมากแล้ว อันนี้เป็นของบน window โดยใช้ putty ครับ http://www.memoball.info/08/ssh-tunnels-proxy-ใน-puttyssh-tunnels-proxy-ใน-putty/]]></description>
			<content:encoded><![CDATA[<p>อันนี้เขียนไว้ตั้งนานแล้ว แต่ยังไม่มีโอกาสให้เอาขึ้นมาบน memoball ซักที อยู่ใน wiki มานานมากแล้ว</p>
<p><!--WIKI "#การทำ proxy โดยผ่าน ssh ใน ubuntu#" --><br />
อันนี้เป็นของบน window โดยใช้ putty ครับ<br />
<a href="http://www.memoball.info/08/ssh-tunnels-proxy-%e0%b9%83%e0%b8%99-putty/">http://www.memoball.info/08/ssh-tunnels-proxy-ใน-puttyssh-tunnels-proxy-ใน-putty/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/2009/08/16/%e0%b8%81%e0%b8%b2%e0%b8%a3%e0%b8%97%e0%b8%b3-proxy-tunnel-%e0%b9%82%e0%b8%94%e0%b8%a2%e0%b8%9c%e0%b9%88%e0%b8%b2%e0%b8%99-ssh-%e0%b9%83%e0%b8%99-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SSH โดยใช้ finger-print (ใส่ password อัตโนมัติ)</title>
		<link>http://www.memoball.info/2009/08/10/ssh-%e0%b9%82%e0%b8%94%e0%b8%a2%e0%b9%83%e0%b8%8a%e0%b9%89-finger-print-%e0%b9%83%e0%b8%aa%e0%b9%88-password-%e0%b8%ad%e0%b8%b1%e0%b8%95%e0%b9%82%e0%b8%99%e0%b8%a1%e0%b8%b1%e0%b8%95%e0%b8%b4/</link>
		<comments>http://www.memoball.info/2009/08/10/ssh-%e0%b9%82%e0%b8%94%e0%b8%a2%e0%b9%83%e0%b8%8a%e0%b9%89-finger-print-%e0%b9%83%e0%b8%aa%e0%b9%88-password-%e0%b8%ad%e0%b8%b1%e0%b8%95%e0%b9%82%e0%b8%99%e0%b8%a1%e0%b8%b1%e0%b8%95%e0%b8%b4/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 14:51:57 +0000</pubDate>
		<dc:creator>memoball</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.memoball.info/?p=347</guid>
		<description><![CDATA[พอจะทำ rsync เลยต้องมาหาวิธีการใช้ ssh โดยไม่ต้องใส่ password จึงได้วิธีการใช้งานดังนี้]]></description>
			<content:encoded><![CDATA[<p>พอจะทำ rsync เลยต้องมาหาวิธีการใช้ ssh โดยไม่ต้องใส่ password จึงได้วิธีการใช้งานดังนี้</p>
<p><!--WIKI "#Ssh fingerprint#" --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/2009/08/10/ssh-%e0%b9%82%e0%b8%94%e0%b8%a2%e0%b9%83%e0%b8%8a%e0%b9%89-finger-print-%e0%b9%83%e0%b8%aa%e0%b9%88-password-%e0%b8%ad%e0%b8%b1%e0%b8%95%e0%b9%82%e0%b8%99%e0%b8%a1%e0%b8%b1%e0%b8%95%e0%b8%b4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>มาเปลี่ยน Theme ใน Ubuntu 9.04 กันเถอะ</title>
		<link>http://www.memoball.info/2009/07/09/%e0%b8%a1%e0%b8%b2%e0%b9%80%e0%b8%9b%e0%b8%a5%e0%b8%b5%e0%b9%88%e0%b8%a2%e0%b8%99-theme-%e0%b9%83%e0%b8%99-ubuntu-904-%e0%b8%81%e0%b8%b1%e0%b8%99%e0%b9%80%e0%b8%96%e0%b8%ad%e0%b8%b0/</link>
		<comments>http://www.memoball.info/2009/07/09/%e0%b8%a1%e0%b8%b2%e0%b9%80%e0%b8%9b%e0%b8%a5%e0%b8%b5%e0%b9%88%e0%b8%a2%e0%b8%99-theme-%e0%b9%83%e0%b8%99-ubuntu-904-%e0%b8%81%e0%b8%b1%e0%b8%99%e0%b9%80%e0%b8%96%e0%b8%ad%e0%b8%b0/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 03:25:09 +0000</pubDate>
		<dc:creator>memoball</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://memoball.memoball.com/?p=309</guid>
		<description><![CDATA[ใครเบือ Ubuntu ในรูปแบบ เดิมๆ เชิญทางนี้ แก้ไข source list (แนะนำว่าควรเก็บของเก่าเป็น backup ไว้ด้วย) sudo gedit /etc/apt/sources.list โดยการเพิ่ม deb http://ppa.launchpad.net/bisigi/ppa/ubuntu jaunty main deb-src http://ppa.launchpad.net/bisigi/ppa/ubuntu jaunty main ใส่ verification key sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0x1781bd45c4c3275a34bb6aec6e871c4a881574de Update cache sudo apt-get update Install theme sudo apt-get install &#60;Theme&#62; โดยการแทนที่ &#60;Theme&#62; เป็น ธีมที่ต้องการ ดังนี้ showtime-theme balanzan-theme infinity-theme wild-shine-theme tropical-theme bamboo-zen-theme [...]]]></description>
			<content:encoded><![CDATA[<p>ใครเบือ Ubuntu ในรูปแบบ เดิมๆ เชิญทางนี้</p>
<div class="wp-caption alignnone" style="width: 500px"><a href="http://francois.vogelweith.com/?p=1&amp;lang=en"><img src="http://francois.vogelweith.com/images/stories/themes_screens/infinity/infinity.jpg" alt="Infinity" width="490" height="140" /></a><p class="wp-caption-text">Infinity</p></div>
<ol>
<li>แก้ไข source list (แนะนำว่าควรเก็บของเก่าเป็น backup ไว้ด้วย)
<pre>sudo gedit /etc/apt/sources.list</pre>
</li>
<li>โดยการเพิ่ม
<pre>deb http://ppa.launchpad.net/bisigi/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/bisigi/ppa/ubuntu jaunty main</pre>
</li>
<li>ใส่ verification key
<pre>sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0x1781bd45c4c3275a34bb6aec6e871c4a881574de</pre>
</li>
<li>Update cache
<pre>sudo apt-get update</pre>
</li>
<li>Install theme
<pre>sudo apt-get install &lt;Theme&gt;</pre>
</li>
<li>โดยการแทนที่ &lt;Theme&gt; เป็น ธีมที่ต้องการ ดังนี้
<ul>
<li>showtime-theme</li>
<li>balanzan-theme</li>
<li>infinity-theme</li>
<li>wild-shine-theme</li>
<li>tropical-theme</li>
<li>bamboo-zen-theme</li>
<li>ubuntu-sunrise-theme</li>
<li>aquadreams-theme</li>
<li>exotic-theme</li>
</ul>
</li>
<li>Remove theme
<pre>sudo apt-get remove &lt;Theme&gt;</pre>
</li>
<p>และ theme อื่นๆ<a href="http://francois.vogelweith.com/?page_id=16&amp;lang=en"> http://francois.vogelweith.com/?page_id=16〈=en</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.memoball.info/2009/07/09/%e0%b8%a1%e0%b8%b2%e0%b9%80%e0%b8%9b%e0%b8%a5%e0%b8%b5%e0%b9%88%e0%b8%a2%e0%b8%99-theme-%e0%b9%83%e0%b8%99-ubuntu-904-%e0%b8%81%e0%b8%b1%e0%b8%99%e0%b9%80%e0%b8%96%e0%b8%ad%e0%b8%b0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

