<?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>蓝色的华 &#187; linux</title>
	<atom:link href="http://bluehua.org/category/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://bluehua.org</link>
	<description>分享所学,backup一切~</description>
	<lastBuildDate>Fri, 27 Aug 2010 08:41:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ubuntu下看flash视频时禁用屏保</title>
		<link>http://bluehua.org/2010/08/23/1431.html</link>
		<comments>http://bluehua.org/2010/08/23/1431.html#comments</comments>
		<pubDate>Mon, 23 Aug 2010 06:37:43 +0000</pubDate>
		<dc:creator>小鹿</dc:creator>
				<category><![CDATA[bookmark]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[screensaver]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://bluehua.org/2010/08/23/1431.html</guid>
		<description><![CDATA[非原创，改进版本，原文在这里

#!/bin/sh
while true;
do
    if test -n &#34;`file /tmp/Flash*&#124;grep \&#34;Macromedia Flash Video\&#34;`&#34;;then
        gnome-screensaver-command -p
    fi
    sleep 30
done

原理是flash加载资源时会在/tmp目录产生缓存，这里每隔30秒检查一下是否有视频缓存，如果有，就用gnome-screensaver-command命令模拟活动一下,屏保就不会激活了~
&#8212;&#8212;&#8212;&#8211;
post by gmail~
]]></description>
			<content:encoded><![CDATA[<p>非原创，改进版本，<a href="http://www.ubuntu-inside.me/2009/03/howto-disable-screen-saver-while-flash.html">原文在这里</a></p>

<div class="wp_syntax"><div class="code overflow"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/sh</span>
<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #c20cb9; font-weight: bold;">true</span>;
<span style="color: #000000; font-weight: bold;">do</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #7a0874; font-weight: bold;">test</span> <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;<span style="color: #780078;">`file /tmp/Flash*|grep \&quot;Macromedia Flash Video\&quot;`</span>&quot;</span>;<span style="color: #000000; font-weight: bold;">then</span>
        gnome-screensaver-command <span style="color: #660033;">-p</span>
    <span style="color: #000000; font-weight: bold;">fi</span>
    <span style="color: #c20cb9; font-weight: bold;">sleep</span> <span style="color: #000000;">30</span>
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<p>原理是flash加载资源时会在/tmp目录产生缓存，这里每隔30秒检查一下是否有视频缓存，如果有，就用gnome-screensaver-command命令模拟活动一下,屏保就不会激活了~</p>
<p>&#8212;&#8212;&#8212;&#8211;<br />
post by gmail~</p>
]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2010/08/23/1431.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>速度创建一个grub启动盘</title>
		<link>http://bluehua.org/2010/08/13/1424.html</link>
		<comments>http://bluehua.org/2010/08/13/1424.html#comments</comments>
		<pubDate>Fri, 13 Aug 2010 11:36:03 +0000</pubDate>
		<dc:creator>小鹿</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[grub4dos]]></category>
		<category><![CDATA[syslinux]]></category>

		<guid isPermaLink="false">http://bluehua.org/2010/08/13/1424.html</guid>
		<description><![CDATA[写了个shell，可以把U盘快速变成一个Grub启动盘，防灾必备~
恩,我采用了syslinux引导grub4dos的方式，这样不用给u盘格ext分区，使用脚本之前要现确保一下U盘是fat格式,不是的话mkfs.vfat格一下，之后下载下面这个shell
http://code-of-emptyhua.googlecode.com/svn/trunk/shell/mkgrubusb/bin/mkgrubusb.bin
然后运行下

#/dev/sdb4是u盘的设备号,因人而异,可用df命令查到
sudo ./mkgrubusb.bin /dev/sdb4

如果提示成功,就可以用了
&#8212;&#8212;&#8212;&#8211;
post by gmail~
]]></description>
			<content:encoded><![CDATA[<p>写了个shell，可以把U盘快速变成一个Grub启动盘，防灾必备~<br />
恩,我采用了syslinux引导grub4dos的方式，这样不用给u盘格ext分区，使用脚本之前要现确保一下U盘是fat格式,不是的话mkfs.vfat格一下，之后下载下面这个shell<br />
<a href="http://code-of-emptyhua.googlecode.com/svn/trunk/shell/mkgrubusb/bin/mkgrubusb.bin">http://code-of-emptyhua.googlecode.com/svn/trunk/shell/mkgrubusb/bin/mkgrubusb.bin</a><br />
然后运行下</p>

<div class="wp_syntax"><div class="code overflow"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#/dev/sdb4是u盘的设备号,因人而异,可用df命令查到</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> .<span style="color: #000000; font-weight: bold;">/</span>mkgrubusb.bin <span style="color: #000000; font-weight: bold;">/</span>dev<span style="color: #000000; font-weight: bold;">/</span>sdb4</pre></div></div>

<p>如果提示成功,就可以用了</p>
<p>&#8212;&#8212;&#8212;&#8211;<br />
post by gmail~</p>
]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2010/08/13/1424.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>汉字转拼音的C语言版本</title>
		<link>http://bluehua.org/2010/07/30/1410.html</link>
		<comments>http://bluehua.org/2010/07/30/1410.html#comments</comments>
		<pubDate>Fri, 30 Jul 2010 15:55:07 +0000</pubDate>
		<dc:creator>小鹿</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[c]]></category>
		<category><![CDATA[汉字转拼音]]></category>

		<guid isPermaLink="false">http://bluehua.org/2010/07/30/1410.html</guid>
		<description><![CDATA[2010.8.5日更新，svn版本12
修正了部分多音字拼音的优先级顺序
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;
&#8230;，本周接到用C的任务，搞定了一个生成头像的fastcgi程序，这个转拼音的写好了给别人用，我对C终于不是那么恐惧了~
生成可执行文件可以直接用,多音字会用&#124;分开

$ echo 中国淫 &#124; ./hz2py 
zhong guo yan&#124;yao&#124;yin

编译:

gcc -D HZ2PY_BINARY hz2py.c -o hz2py

源代码:http://code-of-emptyhua.googlecode.com/svn/trunk/chz2py/hz2py.c
可执行文件:http://code-of-emptyhua.googlecode.com/svn/trunk/chz2py/hz2py
&#8212;&#8212;&#8212;&#8211;
post by gmail~
]]></description>
			<content:encoded><![CDATA[<p>2010.8.5日更新，svn版本12<br />
修正了部分多音字拼音的优先级顺序<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
&#8230;，本周接到用C的任务，搞定了一个生成头像的fastcgi程序，这个转拼音的写好了给别人用，我对C终于不是那么恐惧了~</p>
<p>生成可执行文件可以直接用,多音字会用|分开</p>

<div class="wp_syntax"><div class="code overflow"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">echo</span> 中国淫 <span style="color: #000000; font-weight: bold;">|</span> .<span style="color: #000000; font-weight: bold;">/</span>hz2py 
zhong guo yan<span style="color: #000000; font-weight: bold;">|</span>yao<span style="color: #000000; font-weight: bold;">|</span>yin</pre></div></div>

<p>编译:</p>

<div class="wp_syntax"><div class="code overflow"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">gcc</span> <span style="color: #660033;">-D</span> HZ2PY_BINARY hz2py.c <span style="color: #660033;">-o</span> hz2py</pre></div></div>

<p>源代码:<a href="http://code-of-emptyhua.googlecode.com/svn/trunk/chz2py/hz2py.c">http://code-of-emptyhua.googlecode.com/svn/trunk/chz2py/hz2py.c</a><br />
可执行文件:<a href="http://code-of-emptyhua.googlecode.com/svn/trunk/chz2py/hz2py">http://code-of-emptyhua.googlecode.com/svn/trunk/chz2py/hz2py</a></p>
<p>&#8212;&#8212;&#8212;&#8211;<br />
post by gmail~</p>
]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2010/07/30/1410.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>fastcgi的printf输出图片时有问题</title>
		<link>http://bluehua.org/2010/07/29/1408.html</link>
		<comments>http://bluehua.org/2010/07/29/1408.html#comments</comments>
		<pubDate>Thu, 29 Jul 2010 10:23:48 +0000</pubDate>
		<dc:creator>小鹿</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[fastcgi]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[printf]]></category>

		<guid isPermaLink="false">http://bluehua.org/2010/07/29/1408.html</guid>
		<description><![CDATA[直接使用stdio的printf输出二进制图片没有问题,但是改用fcgi_stdio.h后直接被吃了许多字节,不知道具体什么原因，不过直接写到标准输出没有问题

for &#40;i = 0; i &#60; base_outlen; i ++&#41;
&#123;
    //printf(&#34;%c&#34;, *start); 
    //fix:fastcgi脑残，printf输出不了二进制流
    tmpc = *start;
    fwrite&#40;&#38;tmpc, sizeof&#40;char&#41;, 1, stdout&#41;;
    start++;
&#125;

关键词:fastcgi image,搜出一个一样情况的帖子,不过没有解决方案,那我这个就算解决方法了.
http://www.fastcgi.com/archives/fastcgi-developers/2008-August/000011.html
&#8212;&#8212;&#8212;&#8211;
post by gmail~
]]></description>
			<content:encoded><![CDATA[<p>直接使用stdio的printf输出二进制图片没有问题,但是改用fcgi_stdio.h后直接被吃了许多字节,不知道具体什么原因，不过直接写到标准输出没有问题</p>

<div class="wp_syntax"><div class="code overflow"><pre class="c" style="font-family:monospace;"><span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">=</span> <span style="color: #0000dd;">0</span><span style="color: #339933;">;</span> i <span style="color: #339933;">&lt;</span> base_outlen<span style="color: #339933;">;</span> i <span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">//printf(&quot;%c&quot;, *start); </span>
    <span style="color: #666666; font-style: italic;">//fix:fastcgi脑残，printf输出不了二进制流</span>
    tmpc <span style="color: #339933;">=</span> <span style="color: #339933;">*</span>start<span style="color: #339933;">;</span>
    fwrite<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span>tmpc<span style="color: #339933;">,</span> <span style="color: #993333;">sizeof</span><span style="color: #009900;">&#40;</span><span style="color: #993333;">char</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000dd;">1</span><span style="color: #339933;">,</span> stdout<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    start<span style="color: #339933;">++;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>关键词:fastcgi image,搜出一个一样情况的帖子,不过没有解决方案,那我这个就算解决方法了.<br />
<a href="http://www.fastcgi.com/archives/fastcgi-developers/2008-August/000011.html">http://www.fastcgi.com/archives/fastcgi-developers/2008-August/000011.html</a></p>
<p>&#8212;&#8212;&#8212;&#8211;<br />
post by gmail~</p>
]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2010/07/29/1408.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Makefile中配置debug版本</title>
		<link>http://bluehua.org/2010/07/28/1399.html</link>
		<comments>http://bluehua.org/2010/07/28/1399.html#comments</comments>
		<pubDate>Wed, 28 Jul 2010 04:33:29 +0000</pubDate>
		<dc:creator>小鹿</dc:creator>
				<category><![CDATA[bookmark]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[Makefile]]></category>

		<guid isPermaLink="false">http://bluehua.org/2010/07/28/1399.html</guid>
		<description><![CDATA[参考:http://hi.baidu.com/wg_wang/blog/item/c79a1a7a4d375ee02f73b377.html

CC=gcc 
CFLAGS= 
SYSLIBS= -lmysqlclient
LIBS=$&#123;SYSLIBS&#125; $&#123;OWNLIBS&#125;
BIN_DIR=./bin
DEBUG_DIR=./debug
SOURCE=./src
VPATH=$&#123;SOURCE&#125;
objects=log.o base64.o get_avatar.o
release_name=get_avatar
&#160;
%.o:%.c
	$&#40;CC&#41; -c $&#40;CFLAGS&#41; $&#40;LIBS&#41; $&#60; -o $&#123;SOURCE&#125;/$@
%.debug.o:%.c
	$&#40;CC&#41; -D DEBUG -c $&#40;CFLAGS&#41; $&#40;LIBS&#41; $&#60; -o $&#123;SOURCE&#125;/$@
&#160;
all: release 
release: $&#40;objects&#41;
	$&#123;CC&#125; $&#123;CFLAGS&#125; $&#123;LIBS&#125; $^ -o $&#123;BIN_DIR&#125;/$&#123;release_name&#125;
debug: $&#40;objects:.o=.debug.o&#41;
	$&#123;CC&#125; -g $&#123;CFLAGS&#125; $&#123;LIBS&#125; $^ -o $&#123;DEBUG_DIR&#125;/$&#123;release_name&#125; 
base64_debug: base64.c
	$&#123;CC&#125; -g -D BASE64_DEBUG $&#123;CFLAGS&#125; $&#123;LIBS&#125; $&#123;SOURCE&#125;/base64.c -o $&#123;DEBUG_DIR&#125;/base64test
clean:
	rm $&#123;SOURCE&#125;/*.o

&#8212;&#8212;&#8212;&#8211;
post by gmail~
]]></description>
			<content:encoded><![CDATA[<p>参考:<a href="http://hi.baidu.com/wg_wang/blog/item/c79a1a7a4d375ee02f73b377.html">http://hi.baidu.com/wg_wang/blog/item/c79a1a7a4d375ee02f73b377.html</a></p>

<div class="wp_syntax"><div class="code overflow"><pre class="make" style="font-family:monospace;">CC<span style="color: #004400;">=</span>gcc 
CFLAGS<span style="color: #004400;">=</span> 
SYSLIBS<span style="color: #004400;">=</span> <span style="color: #004400;">-</span>lmysqlclient
LIBS<span style="color: #004400;">=$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">SYSLIBS</span><span style="color: #004400;">&#125;</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">OWNLIBS</span><span style="color: #004400;">&#125;</span>
BIN_DIR<span style="color: #004400;">=./</span>bin
DEBUG_DIR<span style="color: #004400;">=./</span>debug
SOURCE<span style="color: #004400;">=./</span>src
<span style="color: #666622; font-weight: bold;">VPATH</span><span style="color: #004400;">=$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">SOURCE</span><span style="color: #004400;">&#125;</span>
objects<span style="color: #004400;">=</span>log<span style="color: #004400;">.</span>o base64<span style="color: #004400;">.</span>o get_avatar<span style="color: #004400;">.</span>o
release_name<span style="color: #004400;">=</span>get_avatar
&nbsp;
<span style="color: #004400;">%.</span>o<span style="color: #004400;">:%.</span>c
	<span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">CC</span><span style="color: #004400;">&#41;</span> <span style="color: #004400;">-</span>c <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">CFLAGS</span><span style="color: #004400;">&#41;</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">LIBS</span><span style="color: #004400;">&#41;</span> <span style="color: #000088; font-weight: bold;">$&lt;</span> <span style="color: #004400;">-</span>o <span style="color: #004400;">$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">SOURCE</span><span style="color: #004400;">&#125;</span><span style="color: #004400;">/</span><span style="color: #000088; font-weight: bold;">$@</span>
<span style="color: #004400;">%.</span>debug<span style="color: #004400;">.</span>o<span style="color: #004400;">:%.</span>c
	<span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">CC</span><span style="color: #004400;">&#41;</span> <span style="color: #004400;">-</span>D DEBUG <span style="color: #004400;">-</span>c <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">CFLAGS</span><span style="color: #004400;">&#41;</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">LIBS</span><span style="color: #004400;">&#41;</span> <span style="color: #000088; font-weight: bold;">$&lt;</span> <span style="color: #004400;">-</span>o <span style="color: #004400;">$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">SOURCE</span><span style="color: #004400;">&#125;</span><span style="color: #004400;">/</span><span style="color: #000088; font-weight: bold;">$@</span>
&nbsp;
all<span style="color: #004400;">:</span> release 
release<span style="color: #004400;">:</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span><span style="color: #000088;">objects</span><span style="color: #004400;">&#41;</span>
	<span style="color: #004400;">$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">CC</span><span style="color: #004400;">&#125;</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">CFLAGS</span><span style="color: #004400;">&#125;</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">LIBS</span><span style="color: #004400;">&#125;</span> <span style="color: #000088; font-weight: bold;">$^</span> <span style="color: #004400;">-</span>o <span style="color: #004400;">$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">BIN_DIR</span><span style="color: #004400;">&#125;</span><span style="color: #004400;">/$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">release_name</span><span style="color: #004400;">&#125;</span>
debug<span style="color: #004400;">:</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#40;</span>objects<span style="color: #004400;">:.</span>o<span style="color: #004400;">=.</span>debug<span style="color: #004400;">.</span>o<span style="color: #004400;">&#41;</span>
	<span style="color: #004400;">$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">CC</span><span style="color: #004400;">&#125;</span> <span style="color: #004400;">-</span>g <span style="color: #004400;">$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">CFLAGS</span><span style="color: #004400;">&#125;</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">LIBS</span><span style="color: #004400;">&#125;</span> <span style="color: #000088; font-weight: bold;">$^</span> <span style="color: #004400;">-</span>o <span style="color: #004400;">$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">DEBUG_DIR</span><span style="color: #004400;">&#125;</span><span style="color: #004400;">/$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">release_name</span><span style="color: #004400;">&#125;</span> 
base64_debug<span style="color: #004400;">:</span> base64<span style="color: #004400;">.</span>c
	<span style="color: #004400;">$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">CC</span><span style="color: #004400;">&#125;</span> <span style="color: #004400;">-</span>g <span style="color: #004400;">-</span>D BASE64_DEBUG <span style="color: #004400;">$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">CFLAGS</span><span style="color: #004400;">&#125;</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">LIBS</span><span style="color: #004400;">&#125;</span> <span style="color: #004400;">$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">SOURCE</span><span style="color: #004400;">&#125;</span><span style="color: #004400;">/</span>base64<span style="color: #004400;">.</span>c <span style="color: #004400;">-</span>o <span style="color: #004400;">$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">DEBUG_DIR</span><span style="color: #004400;">&#125;</span><span style="color: #004400;">/</span>base64test
clean<span style="color: #004400;">:</span>
	rm <span style="color: #004400;">$</span><span style="color: #004400;">&#123;</span><span style="color: #000088;">SOURCE</span><span style="color: #004400;">&#125;</span><span style="color: #004400;">/*.</span>o</pre></div></div>

<p>&#8212;&#8212;&#8212;&#8211;<br />
post by gmail~</p>
]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2010/07/28/1399.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>shell:列出子目录的大小</title>
		<link>http://bluehua.org/2010/07/24/1398.html</link>
		<comments>http://bluehua.org/2010/07/24/1398.html#comments</comments>
		<pubDate>Sat, 24 Jul 2010 12:52:12 +0000</pubDate>
		<dc:creator>小鹿</dc:creator>
				<category><![CDATA[bookmark]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://bluehua.org/2010/07/24/1398.html</guid>
		<description><![CDATA[偶尔看了一下磁盘状况，分给home的一百多G竟然快用光了
/dev/sda8             101G   80G   17G  84% /home
于是找出老早之前写的一句拿出来跑跑，列出所有上M的目录

ls -la&#124;grep ^d&#124;awk '{print $8}'&#124;xargs -i du -sh &#123;&#125;&#124;grep M

&#8212;&#8212;&#8212;&#8211;
post by gmail~
]]></description>
			<content:encoded><![CDATA[<p>偶尔看了一下磁盘状况，分给home的一百多G竟然快用光了<br />
/dev/sda8             101G   80G   17G  84% /home</p>
<p>于是找出老早之前写的一句拿出来跑跑，列出所有上M的目录</p>

<div class="wp_syntax"><div class="code overflow"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ls</span> -la<span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> ^d<span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">awk</span> <span style="color: #ff0000;">'{print $8}'</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">xargs</span> <span style="color: #660033;">-i</span> <span style="color: #c20cb9; font-weight: bold;">du</span> <span style="color: #660033;">-sh</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span><span style="color: #7a0874; font-weight: bold;">&#125;</span><span style="color: #000000; font-weight: bold;">|</span><span style="color: #c20cb9; font-weight: bold;">grep</span> M</pre></div></div>

<p>&#8212;&#8212;&#8212;&#8211;<br />
post by gmail~</p>
]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2010/07/24/1398.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>一个python版的开源web截图工具:python-webkit2png</title>
		<link>http://bluehua.org/2010/07/23/1397.html</link>
		<comments>http://bluehua.org/2010/07/23/1397.html#comments</comments>
		<pubDate>Fri, 23 Jul 2010 08:27:22 +0000</pubDate>
		<dc:creator>小鹿</dc:creator>
				<category><![CDATA[bookmark]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[cli]]></category>
		<category><![CDATA[pyqt4]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[screenshot]]></category>
		<category><![CDATA[webkit]]></category>

		<guid isPermaLink="false">http://bluehua.org/2010/07/23/1397.html</guid>
		<description><![CDATA[http://github.com/AdamN/python-webkit2png/
一个使用pyqt4里的QtWebkit实现的命令行的web截图软件,可用于服务器端的web截图
貌似是个比较新的项目，以前找过类似的工具,没有多好用的，但是这个真的很好用，看一下参数就知道了

Creates a screenshot of a website using QtWebkit.This program comes with
ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to
redistribute it under the terms of the GNU General Public License v2.
&#160;
Options:
  --version             show program's version number and exit
  -h, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://github.com/AdamN/python-webkit2png/">http://github.com/AdamN/python-webkit2png/</a><br />
一个使用pyqt4里的QtWebkit实现的命令行的web截图软件,可用于服务器端的web截图<br />
貌似是个比较新的项目，以前找过类似的工具,没有多好用的，但是这个真的很好用，看一下参数就知道了</p>

<div class="wp_syntax"><div class="code overflow"><pre class="text" style="font-family:monospace;">Creates a screenshot of a website using QtWebkit.This program comes with
ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to
redistribute it under the terms of the GNU General Public License v2.
&nbsp;
Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -x WIDTH HEIGHT, --xvfb=WIDTH HEIGHT
                        Start an 'xvfb' instance with the given desktop size.
  -g WIDTH HEIGHT, --geometry=WIDTH HEIGHT
                        Geometry of the virtual browser window (0 means
                        'autodetect') [default: (0, 0)].
  -o FILE, --output=FILE
                        Write output to FILE instead of STDOUT.
  -f FORMAT, --format=FORMAT
                        Output image format [default: png]
  --scale=WIDTH HEIGHT  Scale the image to this size
  --aspect-ratio=RATIO  One of 'ignore', 'keep', 'crop' or 'expand' [default:
                        none]
  -F FEATURE, --feature=FEATURE
                        Enable additional Webkit features ('javascript',
                        'plugins')
  -w SECONDS, --wait=SECONDS
                        Time to wait after loading before the screenshot is
                        taken [default: 0]
  -t SECONDS, --timeout=SECONDS
                        Time before the request will be canceled [default: 0]
  -W, --window          Grab whole window instead of frame (may be required
                        for plugins)
  --style=STYLE         Change the Qt look and feel to STYLE (e.G. 'windows').
  -d DISPLAY, --display=DISPLAY
                        Connect to X server at DISPLAY.
  --debug               Show debugging information.
  --log=LOGFILE         Select the log output file</pre></div></div>

<p>使用举例:<br />
使用之前安装依赖的包</p>

<div class="wp_syntax"><div class="code overflow"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> python-qt4</pre></div></div>

<p>OK,可以用了,假如在用ubuntu桌面版的话就很简单了</p>

<div class="wp_syntax"><div class="code overflow"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#加上运行权限 </span>
<span style="color: #c20cb9; font-weight: bold;">chmod</span> +x .<span style="color: #000000; font-weight: bold;">/</span>webkit2png.py
<span style="color: #666666; font-style: italic;">#高度设置为0,就可以获得整个页面的截图了</span>
.<span style="color: #000000; font-weight: bold;">/</span>webkit2png.py <span style="color: #660033;">-g</span> <span style="color: #000000;">1024</span> <span style="color: #000000;">0</span> http:<span style="color: #000000; font-weight: bold;">//</span>bluehua.org <span style="color: #660033;">-o</span> test.png</pre></div></div>

<p>假如运行在服务器上，没有x环境，则需要安装一些额外的依赖包</p>

<div class="wp_syntax"><div class="code overflow"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#安装xvfb用于虚拟X环境</span>
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> xvfb
<span style="color: #666666; font-style: italic;">#安装中文字体</span>
<span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> xfonts-wqy
<span style="color: #666666; font-style: italic;">#配置字体</span>
fontconfig-voodoo <span style="color: #660033;">-f</span> <span style="color: #660033;">-s</span> zh_CN</pre></div></div>

<p>运行时需要加额外的参数</p>

<div class="wp_syntax"><div class="code overflow"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#x选项用于指定虚拟出来的X桌面的尺寸</span>
.<span style="color: #000000; font-weight: bold;">/</span>webkit2png.py <span style="color: #660033;">-x</span> <span style="color: #000000;">1024</span> <span style="color: #000000;">768</span> <span style="color: #660033;">-g</span> <span style="color: #000000;">1024</span> <span style="color: #000000;">0</span> http:<span style="color: #000000; font-weight: bold;">//</span>bluehua.org <span style="color: #660033;">-o</span> test.png</pre></div></div>

<p>恩，其实我找这个东西的目的是想在服务器端获取一个页面的实际渲染宽度，目的达成~</p>
<p>&#8212;&#8212;&#8212;&#8211;<br />
post by gmail~</p>
]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2010/07/23/1397.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>列出所有可用的dbus服务</title>
		<link>http://bluehua.org/2010/07/22/1395.html</link>
		<comments>http://bluehua.org/2010/07/22/1395.html#comments</comments>
		<pubDate>Thu, 22 Jul 2010 07:12:09 +0000</pubDate>
		<dc:creator>小鹿</dc:creator>
				<category><![CDATA[bookmark]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[dbus]]></category>

		<guid isPermaLink="false">http://bluehua.org/2010/07/22/1395.html</guid>
		<description><![CDATA[还是记下，用一次查一次。。

dbus-send --system --print-reply --type=method_call  --dest=&#34;org.freedesktop.DBus&#34;  /org/freedesktop/DBus  org.freedesktop.DBus.ListNames
dbus-send --print-reply --type=method_call  --dest=&#34;org.freedesktop.DBus&#34;  /org/freedesktop/DBus  org.freedesktop.DBus.ListNames

&#8212;&#8212;&#8212;&#8211;
post by gmail~
]]></description>
			<content:encoded><![CDATA[<p>还是记下，用一次查一次。。</p>

<div class="wp_syntax"><div class="code overflow"><pre class="bash" style="font-family:monospace;">dbus-send <span style="color: #660033;">--system</span> <span style="color: #660033;">--print-reply</span> <span style="color: #660033;">--type</span>=method_call  <span style="color: #660033;">--dest</span>=<span style="color: #ff0000;">&quot;org.freedesktop.DBus&quot;</span>  <span style="color: #000000; font-weight: bold;">/</span>org<span style="color: #000000; font-weight: bold;">/</span>freedesktop<span style="color: #000000; font-weight: bold;">/</span>DBus  org.freedesktop.DBus.ListNames
dbus-send <span style="color: #660033;">--print-reply</span> <span style="color: #660033;">--type</span>=method_call  <span style="color: #660033;">--dest</span>=<span style="color: #ff0000;">&quot;org.freedesktop.DBus&quot;</span>  <span style="color: #000000; font-weight: bold;">/</span>org<span style="color: #000000; font-weight: bold;">/</span>freedesktop<span style="color: #000000; font-weight: bold;">/</span>DBus  org.freedesktop.DBus.ListNames</pre></div></div>

<p>&#8212;&#8212;&#8212;&#8211;<br />
post by gmail~</p>
]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2010/07/22/1395.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>remuco，一个linux平台的播放器遥控软件</title>
		<link>http://bluehua.org/2010/05/23/1296.html</link>
		<comments>http://bluehua.org/2010/05/23/1296.html#comments</comments>
		<pubDate>Sun, 23 May 2010 12:49:16 +0000</pubDate>
		<dc:creator>小鹿</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[soft]]></category>
		<category><![CDATA[media player]]></category>
		<category><![CDATA[mobile phone]]></category>
		<category><![CDATA[remote control]]></category>
		<category><![CDATA[remuco]]></category>

		<guid isPermaLink="false">http://bluehua.org/?p=1296</guid>
		<description><![CDATA[看书的时候一般不会听音乐，因为一旦冒出一个不想听的就想去换一首。今天找到了remuco (http://code.google.com/p/remuco/)这个牛b的开源软件，可以用手机通过蓝牙或者wifi遥控linux上的播放器。

上面是E71上控制端的截图，控制我本子上的mpd播放器。除了mpd，还支持Amarok ，Audacious ，Banshee ， Exaile  ， MPlayer，Rhythmbox  ， Songbird ， Totem  ，TVtime ，VLC ， XMMS2。控制端是用java写的，一般支持java的手机应该都可以用。很佩服这个软件的作者，一个小众的开源软件能做到这么强大。
写下mpd服务端安装步骤：

#安装依赖
sudo apt-get install python-bluetooth python-mpd
tar -zxvf remuco-0.9.2.tar.gz
cd remuco-0.9.2
#安装mpd服务端
sudo make install-mpd
#运行服务端
sudo remuco-mpd

]]></description>
			<content:encoded><![CDATA[<p>看书的时候一般不会听音乐，因为一旦冒出一个不想听的就想去换一首。今天找到了<a href="http://code.google.com/p/remuco/">remuco</a> (<a href="http://code.google.com/p/remuco/">http://code.google.com/p/remuco/</a>)这个牛b的开源软件，可以用手机通过蓝牙或者wifi遥控linux上的播放器。</p>
<p><a href="http://bluehua.org/wp-content/uploads/2010/05/SuperScreenshot0020.jpg"><img class="alignnone size-full wp-image-1297" title="SuperScreenshot0020" src="http://bluehua.org/wp-content/uploads/2010/05/SuperScreenshot0020.jpg" alt="" width="320" height="240" /></a></p>
<p>上面是E71上控制端的截图，控制我本子上的mpd播放器。除了mpd，还支持Amarok ，Audacious ，Banshee ， Exaile  ， MPlayer，Rhythmbox  ， Songbird ， Totem  ，TVtime ，VLC ， XMMS2。控制端是用java写的，一般支持java的手机应该都可以用。很佩服这个软件的作者，一个小众的开源软件能做到这么强大。</p>
<p>写下mpd服务端安装步骤：</p>

<div class="wp_syntax"><div class="code overflow"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#安装依赖</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> python-bluetooth python-mpd
<span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-zxvf</span> remuco-0.9.2.tar.gz
<span style="color: #7a0874; font-weight: bold;">cd</span> remuco-0.9.2
<span style="color: #666666; font-style: italic;">#安装mpd服务端</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> install-mpd
<span style="color: #666666; font-style: italic;">#运行服务端</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> remuco-mpd</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2010/05/23/1296.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>terminal里看农历的东西</title>
		<link>http://bluehua.org/2010/05/03/1170.html</link>
		<comments>http://bluehua.org/2010/05/03/1170.html#comments</comments>
		<pubDate>Mon, 03 May 2010 13:14:05 +0000</pubDate>
		<dc:creator>小鹿</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[liblunar]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[农历]]></category>

		<guid isPermaLink="false">http://bluehua.org/?p=1170</guid>
		<description><![CDATA[曾经装了一个 liblunar ,用来在gnome panel里显示农历日历，今天升级到10.04，发现不灵了。由于liblunar提供了python的lib，于是简单写了一个命令行版的前端，顺便保持对python的熟悉程度。最近接触的语言有点杂，码代码时经常会搞混。。。

下载：zhcal.zip
使用之前需要安装liblunar,编译选项

./configure --prefix=/usr --enable-python
make
sudo make install

&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;
另：分享一个firefox插件default full zoom level, 可以设置页面的默认缩放级别，对于高分屏的同学会有帮助～
现在终端的字体我已经调到16，浏览器默认缩放120%，基本上回到1024时代~ 
]]></description>
			<content:encoded><![CDATA[<p>曾经装了一个<a href="http://code.google.com/p/liblunar/"> liblunar</a> ,用来在gnome panel里显示农历日历，今天升级到10.04，发现不灵了。由于liblunar提供了python的lib，于是简单写了一个命令行版的前端，顺便保持对python的熟悉程度。最近接触的语言有点杂，码代码时经常会搞混。。。</p>
<p><a href="http://bluehua.org/wp-content/uploads/2010/05/_001.png"><img src="http://bluehua.org/wp-content/uploads/2010/05/截取选区_001.png" alt="" title="zhcal" width="693" height="469" class="alignnone size-full wp-image-1171" /></a></p>
<p>下载：<a href='http://bluehua.org/wp-content/uploads/2010/05/zhcal.zip'>zhcal.zip</a></p>
<p>使用之前需要安装liblunar,编译选项</p>

<div class="wp_syntax"><div class="code overflow"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--prefix</span>=<span style="color: #000000; font-weight: bold;">/</span>usr <span style="color: #660033;">--enable-python</span>
<span style="color: #c20cb9; font-weight: bold;">make</span>
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></pre></div></div>

<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
另：分享一个firefox插件<a href="https://addons.mozilla.org/zh-CN/firefox/addon/6965">default full zoom level</a>, 可以设置页面的默认缩放级别，对于高分屏的同学会有帮助～<br />
现在终端的字体我已经调到16，浏览器默认缩放120%，基本上回到1024时代~ </p>
]]></content:encoded>
			<wfw:commentRss>http://bluehua.org/2010/05/03/1170.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.429 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-09-07 11:01:18 -->
