<?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>Chakkrit Tantithamthavorn&#039;s Official Personal Website &#187; Ubuntu</title>
	<atom:link href="http://www.klainfo.com/category/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.klainfo.com</link>
	<description></description>
	<lastBuildDate>Wed, 01 Feb 2012 13:12:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>SVN Add Recursively</title>
		<link>http://www.klainfo.com/2010/12/20/svn-add-recursively/</link>
		<comments>http://www.klainfo.com/2010/12/20/svn-add-recursively/#comments</comments>
		<pubDate>Sun, 19 Dec 2010 17:03:29 +0000</pubDate>
		<dc:creator>klainfo</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.klainfo.com/?p=902</guid>
		<description><![CDATA[svn status &#124; grep &#8220;^\?&#8221; &#124; awk &#8216;{print $2}&#8217; &#124; xargs svn add]]></description>
			<content:encoded><![CDATA[<p>svn status | grep &#8220;^\?&#8221; | awk &#8216;{print $2}&#8217; | xargs svn add</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klainfo.com/2010/12/20/svn-add-recursively/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>นับถอยหลัง Ubuntu 10.04</title>
		<link>http://www.klainfo.com/2010/04/10/%e0%b8%99%e0%b8%b1%e0%b8%9a%e0%b8%96%e0%b8%ad%e0%b8%a2%e0%b8%ab%e0%b8%a5%e0%b8%b1%e0%b8%87-ubuntu-10-04/</link>
		<comments>http://www.klainfo.com/2010/04/10/%e0%b8%99%e0%b8%b1%e0%b8%9a%e0%b8%96%e0%b8%ad%e0%b8%a2%e0%b8%ab%e0%b8%a5%e0%b8%b1%e0%b8%87-ubuntu-10-04/#comments</comments>
		<pubDate>Sat, 10 Apr 2010 10:05:17 +0000</pubDate>
		<dc:creator>klainfo</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[countdown]]></category>
		<category><![CDATA[lucid]]></category>

		<guid isPermaLink="false">http://www.klainfo.com/?p=697</guid>
		<description><![CDATA[กิจกรรม Ubuntu Release party งานต้อนรับวันเกิดของ Ubuntu 10.04 Lucid Lynx เวลา/สถานที่ เสาร์ที่ 1 พ.ค. เวลา 14.00 &#8211; 18.30 โดยประมาณ สถานที่ S&#38;P สาขา สยามสแควร์ (ซอยศูนย์หนังสือจุฬา) ชั้น 2 เดินขึ้นไปเลย ประชาสัมพันธ์ให้กับ ชาว UbuntuClub นะครับ http://ubuntuclub.com/node/1907]]></description>
			<content:encoded><![CDATA[<p>กิจกรรม Ubuntu Release party งานต้อนรับวันเกิดของ Ubuntu 10.04 Lucid Lynx</p>
<p><strong>เวลา/สถานที่</strong></p>
<p>เสาร์ที่ 1 พ.ค. เวลา 14.00 &#8211; 18.30 โดยประมาณ<br />
สถานที่ S&amp;P สาขา สยามสแควร์ (ซอยศูนย์หนังสือจุฬา) ชั้น 2 เดินขึ้นไปเลย</p>
<p>ประชาสัมพันธ์ให้กับ ชาว UbuntuClub นะครับ  <a href="http://ubuntuclub.com/node/1907">http://ubuntuclub.com/node/1907</a></p>
<p style="text-align: center;"><a href="http://www.ubuntu.com/"><img class="aligncenter" src="http://www.ubuntu.com/files/countdown/static.png" border="0" alt="Ubuntu: For Desktops, Servers, Netbooks and in the cloud" width="180" height="150" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.klainfo.com/2010/04/10/%e0%b8%99%e0%b8%b1%e0%b8%9a%e0%b8%96%e0%b8%ad%e0%b8%a2%e0%b8%ab%e0%b8%a5%e0%b8%b1%e0%b8%87-ubuntu-10-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Apache] Create subdomain on localhost</title>
		<link>http://www.klainfo.com/2010/01/31/apache-create-subdomain-on-localhost/</link>
		<comments>http://www.klainfo.com/2010/01/31/apache-create-subdomain-on-localhost/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 18:15:53 +0000</pubDate>
		<dc:creator>klainfo</dc:creator>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[subdomain]]></category>

		<guid isPermaLink="false">http://blog.klainfo.com/?p=602</guid>
		<description><![CDATA[ปกติแล้ว คนที่ทำเวบ ก็สร้าง subdomain ผ่าน direct admin ง่ายมาก แต่ถ้าอยากลองบน localhost จะทำยังไงดีหละ นั่งหาๆเหมือนกัน เลยจดไว้ดีกว่า กันลืม ลองดูวิธีนี้ละกันนะ ง่ายดี สำหรับตัวอย่างนี้ สมมติว่าสร้าง subdomain ชื่อว่า sub โดยมีไดเรคทอรี่อยู่ที่ /var/www/sub เริ่มจาก $ sudo vi /etc/apache2/sites-enabled/000-default เติมข้อความนี้ลงไป ServerAdmin admin@localhost DocumentRoot /var/www/sub ServerName sub.localhost ตามด้วยคำสั่ง $ sudo vi /etc/hosts เติมข้อความนี้ลงไป 127.0.0.1 localhost 127.0.0.1 sub.localhost ลองทดสอบดู ถ้าไม่ได้ให้ restart apache service ก่อนครับ $ sudo /etc/init.d/apache2 restart [...]]]></description>
			<content:encoded><![CDATA[<p>ปกติแล้ว คนที่ทำเวบ ก็สร้าง subdomain ผ่าน direct admin ง่ายมาก แต่ถ้าอยากลองบน localhost จะทำยังไงดีหละ นั่งหาๆเหมือนกัน เลยจดไว้ดีกว่า กันลืม ลองดูวิธีนี้ละกันนะ ง่ายดี<br />
สำหรับตัวอย่างนี้ สมมติว่าสร้าง subdomain ชื่อว่า sub โดยมีไดเรคทอรี่อยู่ที่ /var/www/sub<br />
เริ่มจาก</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apache2<span style="color: #000000; font-weight: bold;">/</span>sites-enabled<span style="color: #000000; font-weight: bold;">/</span>000-default</pre>
</div>
</div>
<p>เติมข้อความนี้ลงไป</p>
<pre>
ServerAdmin admin@localhost
DocumentRoot /var/www/sub
ServerName sub.localhost
</pre>
<p>ตามด้วยคำสั่ง</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">vi</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>hosts</pre>
</div>
</div>
<p>เติมข้อความนี้ลงไป</p>
<pre>
127.0.0.1    localhost
127.0.0.1    sub.localhost
</pre>
<p>ลองทดสอบดู ถ้าไม่ได้ให้ restart apache service ก่อนครับ</p>
<div class="wp_syntax">
<div class="code">
<pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>apache2 restart</pre>
</div>
</div>
<p>เสร็จแล้วๆๆๆ อิอิ</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klainfo.com/2010/01/31/apache-create-subdomain-on-localhost/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[PHP] Delete Apache owned files and folders</title>
		<link>http://www.klainfo.com/2010/01/24/php-delete-apache-owned-files-and-folders/</link>
		<comments>http://www.klainfo.com/2010/01/24/php-delete-apache-owned-files-and-folders/#comments</comments>
		<pubDate>Sun, 24 Jan 2010 05:22:55 +0000</pubDate>
		<dc:creator>klainfo</dc:creator>
				<category><![CDATA[php]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[permission]]></category>

		<guid isPermaLink="false">http://blog.klainfo.com/?p=586</guid>
		<description><![CDATA[เนื่องจากผมใช้ Doku wiki แล้ว Apache มันสร้าง cache ขึ้นมาเอง แล้วผมอยากจะลบมัน ปรากฏว่าผมลบไฟล์ไม่ได้ เนื่องจากผมไม่ใช่ Root แล้วเป็นไฟล์ที่ Apache สร้างขึ้นด้วย นั่งขุดคุ้ยหา script php มาลบให้มันละกัน ทำตามนี้โลด 1 2 3 4 5 6 7 8 9 10 11 12 13 14 &#60;?php function SureRemoveDir&#40;$dir&#41; &#123; if&#40;!$dh = @opendir&#40;$dir&#41;&#41; return; while &#40;&#40;$obj = readdir&#40;$dh&#41;&#41;&#41; &#123; if&#40;$obj==‘.’ &#124;&#124; $obj==‘..’&#41; continue; if &#40;!@unlink&#40;$dir.‘/’.$obj&#41;&#41; &#123; SureRemoveDir&#40;$dir.‘/’.$obj&#41;; [...]]]></description>
			<content:encoded><![CDATA[<p>เนื่องจากผมใช้ Doku wiki แล้ว Apache มันสร้าง cache ขึ้นมาเอง แล้วผมอยากจะลบมัน ปรากฏว่าผมลบไฟล์ไม่ได้ เนื่องจากผมไม่ใช่ Root แล้วเป็นไฟล์ที่ Apache สร้างขึ้นด้วย</p>
<p>นั่งขุดคุ้ยหา script php มาลบให้มันละกัน ทำตามนี้โลด</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre>
</td>
<td class="code">
<pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000000; font-weight: bold;">function</span> SureRemoveDir<span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$dh</span> <span style="color: #339933;">=</span> <span style="color: #339933;">@</span><span style="color: #990000;">opendir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$obj</span> <span style="color: #339933;">=</span> <span style="color: #990000;">readdir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dh</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$obj</span><span style="color: #339933;">==</span>‘<span style="color: #339933;">.</span>’ <span style="color: #339933;">||</span> <span style="color: #000088;">$obj</span><span style="color: #339933;">==</span>‘<span style="color: #339933;">..</span>’<span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">continue</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!@</span><span style="color: #990000;">unlink</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span><span style="color: #339933;">.</span>‘<span style="color: #339933;">/</span>’<span style="color: #339933;">.</span><span style="color: #000088;">$obj</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
SureRemoveDir<span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span><span style="color: #339933;">.</span>‘<span style="color: #339933;">/</span>’<span style="color: #339933;">.</span><span style="color: #000088;">$obj</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
                   <span style="color: #000088;">$file_deleted</span><span style="color: #339933;">++;</span>
            <span style="color: #009900;">&#125;</span>
      <span style="color: #009900;">&#125;</span>
      <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">@</span><span style="color: #990000;">rmdir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$dir_deleted</span><span style="color: #339933;">++;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre>
</td>
</tr>
</table>
</div>
<p>วิธีเรียกใช้ก็ง่ายๆ ตามนี้เลยครับ โดยใส่ชื่อ Directory ลงไปแทนคำว่า Test</p>
<p>เสร็จแล้ว เย่ๆ ^^</p>
]]></content:encoded>
			<wfw:commentRss>http://www.klainfo.com/2010/01/24/php-delete-apache-owned-files-and-folders/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>เนื้อหาวิชา Computer Architecture</title>
		<link>http://www.klainfo.com/2010/01/23/%e0%b9%80%e0%b8%99%e0%b8%b7%e0%b9%89%e0%b8%ad%e0%b8%ab%e0%b8%b2%e0%b8%a7%e0%b8%b4%e0%b8%8a%e0%b8%b2-computer-architecture/</link>
		<comments>http://www.klainfo.com/2010/01/23/%e0%b9%80%e0%b8%99%e0%b8%b7%e0%b9%89%e0%b8%ad%e0%b8%ab%e0%b8%b2%e0%b8%a7%e0%b8%b4%e0%b8%8a%e0%b8%b2-computer-architecture/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 05:25:39 +0000</pubDate>
		<dc:creator>klainfo</dc:creator>
				<category><![CDATA[CPE]]></category>
		<category><![CDATA[klainfo]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[comor]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blog.klainfo.com/?p=577</guid>
		<description><![CDATA[เนื่องจาก รศ.วรา วราวิทย์ ได้สรุปเนื้อหาวิชา Computer Architecture ได้ดีมาก คลิก และได้เผยแพร่เนื้อหาสู่อินเตอร์เนต แต่พบว่า ระบบการเข้ารหัสภาษาที่ใช้(TIS-620) ยังไม่แพร่หลาย และ Browser ส่วนใหญ่ ไม่สามารถ Auto-Detect ได้ ผมเลย ดูดมาทั้งเวบ แล้ว Convert Encoding จาก TIS-620 ให้เป็น UTF-8 ให้หมดครับ สามารถคลิกเปิดอ่านได้ที่ http://www.klainfo.com/comor ผมเลือกใช้คำสั่ง iconv ในระบบ Unix ครับ 1 2 3 4 5 for file in `ls *.html` do echo $file iconv -f TIS-620 -t UTF-8 $file &#62; [...]]]></description>
			<content:encoded><![CDATA[<p>เนื่องจาก รศ.วรา วราวิทย์ ได้สรุปเนื้อหาวิชา Computer Architecture ได้ดีมาก <a href="http://hpc.ee.kmutnb.ac.th/~vara/comor/">คลิก</a> และได้เผยแพร่เนื้อหาสู่อินเตอร์เนต แต่พบว่า ระบบการเข้ารหัสภาษาที่ใช้(TIS-620) ยังไม่แพร่หลาย และ Browser ส่วนใหญ่ ไม่สามารถ Auto-Detect ได้</p>
<p>ผมเลย ดูดมาทั้งเวบ แล้ว Convert Encoding จาก TIS-620 ให้เป็น UTF-8 ให้หมดครับ สามารถคลิกเปิดอ่านได้ที่ <a href="http://www.klainfo.com/comor">http://www.klainfo.com/comor</a></p>
<p>ผมเลือกใช้คำสั่ง iconv ในระบบ Unix ครับ</p>
<div class="wp_syntax">
<table>
<tr>
<td class="line_numbers">
<pre>1
2
3
4
5
</pre>
</td>
<td class="code">
<pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">in</span> <span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">ls</span> <span style="color: #000000; font-weight: bold;">*</span>.html<span style="color: #000000; font-weight: bold;">`</span>
<span style="color: #000000; font-weight: bold;">do</span>
    <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #007800;">$file</span>
    iconv <span style="color: #660033;">-f</span> TIS-<span style="color: #000000;">620</span> <span style="color: #660033;">-t</span> UTF-<span style="color: #000000;">8</span> <span style="color: #007800;">$file</span> <span style="color: #000000; font-weight: bold;">&gt;</span> ..<span style="color: #000000; font-weight: bold;">/</span>tmp<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$file</span>
<span style="color: #000000; font-weight: bold;">done</span></pre>
</td>
</tr>
</table>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.klainfo.com/2010/01/23/%e0%b9%80%e0%b8%99%e0%b8%b7%e0%b9%89%e0%b8%ad%e0%b8%ab%e0%b8%b2%e0%b8%a7%e0%b8%b4%e0%b8%8a%e0%b8%b2-computer-architecture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: www.klainfo.com @ 2012-02-08 07:39:27 -->
