<?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>phill84.org &#187; linux</title>
	<atom:link href="http://phill84.org/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://phill84.org</link>
	<description>System.out.print</description>
	<lastBuildDate>Sat, 26 Mar 2011 10:21:26 +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>KDE 4.3.1</title>
		<link>http://phill84.org/2009/09/kde-4-3-1/</link>
		<comments>http://phill84.org/2009/09/kde-4-3-1/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 05:47:42 +0000</pubDate>
		<dc:creator>phill84</dc:creator>
				<category><![CDATA[blah]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[kde4]]></category>
		<category><![CDATA[kubuntu]]></category>

		<guid isPermaLink="false">http://phill84.org/2009/09/kde-4-3-1/</guid>
		<description><![CDATA[好吧 終於我也投奔到kde了]]></description>
			<content:encoded><![CDATA[<p>好吧 終於我也投奔到kde了</p>
<p><a href="http://phill84.org/wp-content/uploads/2009/09/snapshot1.png"><img class="alignnone size-medium wp-image-607 colorbox-609" title="snapshot1" src="http://phill84.org/wp-content/uploads/2009/09/snapshot1-450x270.png" alt="snapshot1 450x270 KDE 4.3.1" width="450" height="270" /></a></p>
<p><a href="http://phill84.org/wp-content/uploads/2009/09/snapshot2.png"><img class="alignnone size-medium wp-image-608 colorbox-609" title="snapshot2" src="http://phill84.org/wp-content/uploads/2009/09/snapshot2-450x270.png" alt="snapshot2 450x270 KDE 4.3.1" width="450" height="270" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://phill84.org/2009/09/kde-4-3-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sysinfo plugin for xchat2 on linux</title>
		<link>http://phill84.org/2009/08/sysinfo-plugin-for-xchat2-on-linux/</link>
		<comments>http://phill84.org/2009/08/sysinfo-plugin-for-xchat2-on-linux/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 19:23:59 +0000</pubDate>
		<dc:creator>phill84</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[sysinfo]]></category>
		<category><![CDATA[xchat]]></category>

		<guid isPermaLink="false">http://phill84.org/2009/08/sysinfo-plugin-for-xchat2-on-linux/</guid>
		<description><![CDATA[It&#8217;s my first time writing something in perl, the code is not very efficient and for now it can only display info of cpu, memory, bandwidth and uptime.]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s my first time writing something in perl, the code is not very efficient and for now it can only display info of cpu, memory, bandwidth and uptime.</p>
<pre class="brush: perl; title: ; notranslate"># Configuration
$eth = &quot;eth0&quot;;

# Script
Xchat::register(&quot;Sysinfo&quot;, &quot;0.1&quot;, &quot;System Information Displayer&quot;);
Xchat::print(&quot;Sysinfo 0.1 Loaded.&quot;);
Xchat::hook_command(&quot;uptime&quot;, &quot;uptime&quot;);
Xchat::hook_command(&quot;os&quot;, &quot;os&quot;);
Xchat::hook_command(&quot;bw&quot;, &quot;bw&quot;);
Xchat::hook_command(&quot;cpu&quot;, &quot;cpu&quot;);
Xchat::hook_command(&quot;mem&quot;, &quot;mem&quot;);

sub uptime {
	$uptime = `cat /proc/uptime | awk '{printf \$1}'`;
	$_day = 60 * 60 * 24;
	$_hour = 60 * 60;
	$_minute = 60;
	$day = int($uptime/$_day);
	$uptime %= $_day;
	$hour = int($uptime/$_hour);
	$uptime %= $_hour;
	$minute = int($uptime/$_minute);
	$uptime %= $_minute;
	$second = int($uptime);
	$uptime = &quot;&quot;;
	if($day != 0) {
		$uptime .= $day;
		if($day == 1) {
			$uptime .= &quot; day &quot;;
		} else {
			$uptime .= &quot; days &quot;;
		}
	}
	if($hour != 0) {
		$uptime .= $hour;
		if($hour == 1) {
			$uptime .= &quot; hour &quot;;
		} else {
			$uptime .= &quot; hours &quot;;
		}
	}
	if($minute != 0) {
		$uptime .= $minute;
		if($minute == 1) {
			$uptime .= &quot; minute &quot;;
		} else {
			$uptime .= &quot; minutes &quot;;
		}
	}
	$uptime .= $second;
	if($second == 1) {
		$uptime .= &quot; second&quot;;
	} else {
		$uptime .= &quot; seconds&quot;;
	}
	Xchat::command(&quot;SAY &#92;&#48;02[UPTIME]&#92;&#48;02 $uptime&quot;);
	Xchat::EAT_ALL;
}

sub os {
	$_kernel_release = `uname -r`;
	$_operating_system = `uname -o`;
	chomp($_kernel_release);
	chomp($_operating_system);
	$os = $_operating_system . &quot; &quot; . $_kernel_release;
	Xchat::command(&quot;SAY &#92;&#48;02[OS]&#92;&#48;02 $os&quot;);
	Xchat::EAT_ALL;
}

sub bw {
	$old = `cat /proc/net/dev | grep $eth | cut -d &quot;:&quot; -f 2 | tr -s &quot; &quot;| cut -d &quot; &quot; -f 1,9`;
	sleep(1);
	$new = `cat /proc/net/dev | grep $eth | cut -d &quot;:&quot; -f 2 | tr -s &quot; &quot;| cut -d &quot; &quot; -f 1,9`;
	@ary_old = split(/\s/, $old);
	@ary_new = split(/\s/, $new);
	$down = $ary_new[0] - $ary_old[0];
	$up = $ary_new[1] - $ary_old[1];
	$bw = &quot;&quot;;
	if($down &lt; 1000) {
		$bw .= $down . &quot; B/s Down &quot;;
	} else {
		$bw .= sprintf(&quot;%.02f&quot;, $down / 1000) . &quot; KB/s Down &quot;;
	}
	if($up &lt; 1000) {
		$bw .= $up . &quot; B/s Up&quot;;
	} else {
		$bw .= sprintf(&quot;%.02f&quot;, $up / 1000) . &quot; KB/s Up&quot;;
	}
	Xchat::command(&quot;SAY &#92;&#48;02[BW]&#92;&#48;02 $bw&quot;);
	Xchat::EAT_ALL;
}

sub cpu {
	$model_name = `cat /proc/cpuinfo | grep &quot;model name&quot; | tail -1 | cut -d &quot;:&quot; -f 2 | tr -s &quot; &quot;`;
	$number_cores = `cat /proc/cpuinfo | grep &quot;model name&quot; -c`;
	$freq = `cat /proc/cpuinfo | grep &quot;cpu MHz&quot; | tail -1 | cut -d &quot;:&quot; -f 2 | tr -s &quot; &quot;`;
	$idle = `vmstat | tail -1 | awk '{printf \$15}'`;
	$load = 100 - $idle;
	chomp($model_name);
	chomp($number_cores);
	chomp($freq);
	$cpuinfo = $number_cores . &quot; CPU&quot;;
	if($number_cores &gt; 1) {
		$cpuinfo .= &quot;'s&quot;;
	}
	$cpuinfo .= &quot; -&quot; . $model_name;
	$cpuinfo .= &quot; @ &quot; . int($freq) . &quot; MHz&quot; . &quot; (&quot; . $load . &quot;% Load)&quot;;
	Xchat::command(&quot;SAY &#92;&#48;02[CPU]&#92;&#48;02 $cpuinfo&quot;);
	Xchat:EAT_ALL;
}

sub mem {
	$mem_total = `free -m | grep Mem | awk '{printf \$2}'`;
	$mem_used = `free -m | grep - | awk '{printf \$3}'`;
	$swap_total = `free -m| grep Swap | awk '{printf \$2}'`;
	$swap_used = `free -m| grep Swap | awk '{printf \$3}'`;
	$meminfo = &quot;&#92;&#48;02[MEM]&#92;&#48;02 &quot; . $mem_used . &quot;/&quot; . $mem_total . &quot; MB &#92;&#48;02[SWAP]&#92;&#48;02 &quot; . $swap_used . &quot;/&quot; . $swap_total . &quot; MB&quot;;
	Xchat::command(&quot;SAY $meminfo&quot;);
	Xchat::EAT_ALL;
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://phill84.org/2009/08/sysinfo-plugin-for-xchat2-on-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Get rid of unwanted output from bash command</title>
		<link>http://phill84.org/2009/08/get-rid-of-unwanted-output-from-bash-command/</link>
		<comments>http://phill84.org/2009/08/get-rid-of-unwanted-output-from-bash-command/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 08:32:45 +0000</pubDate>
		<dc:creator>phill84</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[null]]></category>
		<category><![CDATA[output]]></category>
		<category><![CDATA[redirect]]></category>

		<guid isPermaLink="false">http://phill84.org/2009/08/get-rid-of-unwanted-output-from-bash-command/</guid>
		<description><![CDATA[I used to redirect the output to /dev/null, but sometimes it&#8217;s not good enough. It&#8217;s much better to just turn off stdout and stderr.]]></description>
			<content:encoded><![CDATA[<p>I used to redirect the output to /dev/null, but sometimes it&#8217;s not good enough. It&#8217;s much better to just turn off stdout and stderr.</p>
<pre class="brush: bash; title: ; notranslate">$ command 1&gt;&amp;- 2&gt;&amp;- &amp;</pre>
]]></content:encoded>
			<wfw:commentRss>http://phill84.org/2009/08/get-rid-of-unwanted-output-from-bash-command/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>msn-pecan 0.0.17</title>
		<link>http://phill84.org/2009/02/msn-pecan-0017/</link>
		<comments>http://phill84.org/2009/02/msn-pecan-0017/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 19:52:36 +0000</pubDate>
		<dc:creator>phill84</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[0.0.17]]></category>
		<category><![CDATA[amd64]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[msn]]></category>
		<category><![CDATA[pecan]]></category>
		<category><![CDATA[pidgin]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://phill84.org/2009/02/msn-pecan-0017/</guid>
		<description><![CDATA[I am so sick of the msn plugin that comes with pidgin, it takes years to login every time with msn-pecan the login process took me less than 1sec, which IMO is much better. you can grab the debian installer &#8230; <a href="http://phill84.org/2009/02/msn-pecan-0017/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I am so sick of the msn plugin that comes with pidgin, it takes years to login every time</p>
<p>with msn-pecan the login process took me less than 1sec, which IMO is much better.</p>
<p>you can grab the debian installer package here if you are using 64bits linux and don&#8217;t feel like to compile it yourself</p>
Note: There is a file embedded within this post, please visit this post to download the file.
]]></content:encoded>
			<wfw:commentRss>http://phill84.org/2009/02/msn-pecan-0017/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yasm 0.7.2</title>
		<link>http://phill84.org/2008/10/yasm-072/</link>
		<comments>http://phill84.org/2008/10/yasm-072/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 19:16:57 +0000</pubDate>
		<dc:creator>phill84</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[0.7.2]]></category>
		<category><![CDATA[deb]]></category>
		<category><![CDATA[yasm]]></category>

		<guid isPermaLink="false">http://phill84.org/?p=397</guid>
		<description><![CDATA[compiled from official stable tarball]]></description>
			<content:encoded><![CDATA[<p>compiled from official stable tarball</p>
Note: There is a file embedded within this post, please visit this post to download the file.
]]></content:encoded>
			<wfw:commentRss>http://phill84.org/2008/10/yasm-072/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>x264 svn20081031</title>
		<link>http://phill84.org/2008/10/x264-svn20081031/</link>
		<comments>http://phill84.org/2008/10/x264-svn20081031/#comments</comments>
		<pubDate>Fri, 31 Oct 2008 12:24:22 +0000</pubDate>
		<dc:creator>phill84</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[20081031]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[x264]]></category>

		<guid isPermaLink="false">http://phill84.org/?p=392</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[Note: There is a file embedded within this post, please visit this post to download the file.
]]></content:encoded>
			<wfw:commentRss>http://phill84.org/2008/10/x264-svn20081031/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>KMess 2.0alpha svn3689</title>
		<link>http://phill84.org/2008/09/kmess-20alpha-svn3689/</link>
		<comments>http://phill84.org/2008/09/kmess-20alpha-svn3689/#comments</comments>
		<pubDate>Sat, 06 Sep 2008 20:30:11 +0000</pubDate>
		<dc:creator>phill84</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[2.0]]></category>
		<category><![CDATA[3689]]></category>
		<category><![CDATA[alpha]]></category>
		<category><![CDATA[deb]]></category>
		<category><![CDATA[kmess]]></category>

		<guid isPermaLink="false">http://phill84.org/?p=359</guid>
		<description><![CDATA[It&#8217;s been a while since the last build, coz I was pretty occupied by a lot of things lately Last Changed Rev: 3689 Last Changed Date: 2008-09-05 02:03:39 +0200 (Fri, 05 Sep 2008)]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a while since the last build, coz I was pretty occupied by a lot of things lately</p>
<p>Last Changed Rev: 3689<br />
Last Changed Date: 2008-09-05 02:03:39 +0200 (Fri, 05 Sep 2008)</p>
Note: There is a file embedded within this post, please visit this post to download the file.
]]></content:encoded>
			<wfw:commentRss>http://phill84.org/2008/09/kmess-20alpha-svn3689/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>stunnel 4.25 deb package</title>
		<link>http://phill84.org/2008/07/stunnel-425-deb-package/</link>
		<comments>http://phill84.org/2008/07/stunnel-425-deb-package/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 19:56:16 +0000</pubDate>
		<dc:creator>phill84</dc:creator>
				<category><![CDATA[blah]]></category>
		<category><![CDATA[4.25]]></category>
		<category><![CDATA[deb]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[stunnel]]></category>

		<guid isPermaLink="false">http://phill84.org/?p=104</guid>
		<description><![CDATA[I just don&#8217;t understand why nobody is updating the debian repository :/]]></description>
			<content:encoded><![CDATA[Note: There is a file embedded within this post, please visit this post to download the file.
<p>I just don&#8217;t understand why nobody is updating the debian repository :/</p>
]]></content:encoded>
			<wfw:commentRss>http://phill84.org/2008/07/stunnel-425-deb-package/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>nylon 1.21 deb package</title>
		<link>http://phill84.org/2008/07/nylon-121-deb-package/</link>
		<comments>http://phill84.org/2008/07/nylon-121-deb-package/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 19:53:23 +0000</pubDate>
		<dc:creator>phill84</dc:creator>
				<category><![CDATA[blah]]></category>
		<category><![CDATA[1.21]]></category>
		<category><![CDATA[deb]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[nylon]]></category>
		<category><![CDATA[socks]]></category>

		<guid isPermaLink="false">http://phill84.org/?p=103</guid>
		<description><![CDATA[a lightweight but powerful enough to use socks proxy]]></description>
			<content:encoded><![CDATA[Note: There is a file embedded within this post, please visit this post to download the file.
<p>a lightweight but powerful enough to use socks proxy</p>
]]></content:encoded>
			<wfw:commentRss>http://phill84.org/2008/07/nylon-121-deb-package/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>xvid 1.1.3 stable for debian based linux</title>
		<link>http://phill84.org/2008/07/xvid-113-stable-for-debian-based-linux/</link>
		<comments>http://phill84.org/2008/07/xvid-113-stable-for-debian-based-linux/#comments</comments>
		<pubDate>Sun, 06 Jul 2008 17:57:19 +0000</pubDate>
		<dc:creator>phill84</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[1.1.3]]></category>
		<category><![CDATA[deb]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[xvid]]></category>

		<guid isPermaLink="false">http://phill84.org/?p=102</guid>
		<description><![CDATA[it&#8217;s just for archiving so that i won&#8217;t have to compile it again next time when i have to reinstall the system.]]></description>
			<content:encoded><![CDATA[Note: There is a file embedded within this post, please visit this post to download the file.
<p>it&#8217;s just for archiving so that i won&#8217;t have to compile it again next time when i have to reinstall the system.</p>
]]></content:encoded>
			<wfw:commentRss>http://phill84.org/2008/07/xvid-113-stable-for-debian-based-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

