<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5992131415781765269</id><updated>2024-08-28T04:26:39.138-07:00</updated><category term="Linux Skills"/><category term="Vim Skill"/><category term="Programming"/><category term="Apple"/><category term="Linux Driver"/><category term="Linux Kernel Config"/><category term="Mac OS"/><category term="Network"/><category term="Ruby"/><category term="streaming"/><title type='text'>Shawn&#39;s Garage</title><subtitle type='html'>Stay hungry, stay foolish.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>32</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-5713568731655238018</id><published>2011-12-07T02:02:00.001-08:00</published><updated>2011-12-07T02:04:26.069-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programming"/><title type='text'>Linux Kernel Indent Rule.</title><summary type="text">This is the sample for programmer to reference.

We can find the Linux Indent Rule in usr/src/linux-headers-2.6.32-35/scripts/Lindent

And the indent rule is: 

indent -npro -kr -i8 -ts8 -sob -l80 -ss -ncs -cp1


-npro, --ignore-profile
Do not read `.indent.pro&#39; files.
-kr, --k-and-r-style
Use Kernighan &amp;amp; Ritchie coding style.
-in, --indent-leveln
Set indentation level to n spaces.
-tsn, -</summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/5713568731655238018/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2011/12/linux-kernel-indent-rule.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/5713568731655238018'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/5713568731655238018'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2011/12/linux-kernel-indent-rule.html' title='Linux Kernel Indent Rule.'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-6350943917790437924</id><published>2011-11-17T00:41:00.001-08:00</published><updated>2011-11-17T00:41:51.428-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Vim Skill"/><title type='text'>VIM with tags</title><summary type="text">Using vim coding program for a long time.
It&#39;s a very good tool &quot;ctags&quot; to work with vim when coding.


Create tags 
#ctags -R *

Naming tags 
#ctags -R * -f tagName


In vim, using below command to setting PATH of tags:
:set tags=./tags,../tags

or
:set tags=tags;

Add ; can recursive search tags from parent folder.</summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/6350943917790437924/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2011/11/using-vim-coding-program-for-long-time.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/6350943917790437924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/6350943917790437924'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2011/11/using-vim-coding-program-for-long-time.html' title='VIM with tags'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-7318747746307948371</id><published>2011-11-10T02:36:00.001-08:00</published><updated>2011-11-10T02:36:32.472-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programming"/><title type='text'>[C/C++ basic] Preprocessing #if defined(SHAWN)</title><summary type="text">It&#39;s lot of usage same as #ifdef
Like #if defined(...)

When using #if defined(...)
we can used logic AND/OR for preprocessing.

Sample 1:


#ifdef ABC
// do something
#elif DEF
// do something
#else
// do something else
#endif



Sample 1 above can be simply recoding as:


#if defined(ABC) || defined(DEF)
//do something
#else
// do something else
#endif

</summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/7318747746307948371/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2011/11/cc-basic-preprocessing-if-definedshawn.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/7318747746307948371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/7318747746307948371'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2011/11/cc-basic-preprocessing-if-definedshawn.html' title='[C/C++ basic] Preprocessing #if defined(SHAWN)'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-7572220131082590633</id><published>2011-11-04T03:15:00.001-07:00</published><updated>2011-11-04T03:15:23.242-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programming"/><title type='text'>[C/C++ basic] Preprocessing #ifdef, #elif, #else</title><summary type="text">Today I using C/C++ preprocessor to compile my code,
But I have a little confuse about &quot;is #elif can work correctly with #ifdef&quot;?


#ifdef TEST_IFDEF
	printf(&quot;Test #ifdef&quot;);
#elif TEST_ELIF
	printf(&quot;Test #elif&quot;);
#else
	printf(&quot;Test #else&quot;);
#endif


And after my trying.
It&#39;s work well :D</summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/7572220131082590633/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2011/11/cc-basic-preprocessing-ifdef-elif-else.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/7572220131082590633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/7572220131082590633'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2011/11/cc-basic-preprocessing-ifdef-elif-else.html' title='[C/C++ basic] Preprocessing #ifdef, #elif, #else'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-2119756134947945050</id><published>2011-09-26T23:39:00.001-07:00</published><updated>2011-09-26T23:39:43.428-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programming"/><title type='text'>[C/C++]switch-case with range?</title><summary type="text">There is an interesting discussed after today study group.

Is C/C++ support switch-case with range of integer!?

Let see a example :


//===================
switch (a)
{
	case 1 ... 10:
		//do somthing
		break;

	case 11 ... 20:
		//do somthing
		break;
	default:
		//do something 
		break;
}
//===================



This is successfully with gcc compiler.
But not done with VC++

That&#39;s because </summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/2119756134947945050/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2011/09/ccswitch-case-with-range.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/2119756134947945050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/2119756134947945050'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2011/09/ccswitch-case-with-range.html' title='[C/C++]switch-case with range?'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-1574446790768009947</id><published>2011-04-19T00:04:00.001-07:00</published><updated>2011-04-19T00:04:32.949-07:00</updated><title type='text'>Using mii-tool/ethtools to sniff status of network interface</title><summary type="text">When I am trying using mii-tool on my new develop environment,
Some error occur, and the log message like below:

# mii-tool -V
mii-tool.c 1.9 2000/04/28 00:56:08 (David Hinds)
SIOCGMIIPHY on &#39;eth0&#39; failed: Operation not supported
no MII interfaces found

Then I google this problem find out,
mii-tool has lot of bug, and some net drivers didn&#39;t support it.

So, I am trying using ethtool which have</summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/1574446790768009947/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2011/04/using-mii-toolethtools-to-sniff-status.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/1574446790768009947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/1574446790768009947'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2011/04/using-mii-toolethtools-to-sniff-status.html' title='Using mii-tool/ethtools to sniff status of network interface'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-5381718942716958004</id><published>2011-04-13T20:18:00.001-07:00</published><updated>2011-04-13T20:18:54.647-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apple"/><category scheme="http://www.blogger.com/atom/ns#" term="Mac OS"/><title type='text'>Mac OS disable/enable .DS_Store</title><summary type="text">Mac OS will create .DS_Store on Network Disk.
And it would confused the other operation system user.
This is the way to disable auto create .DS_Store.

defaults write com.apple.desktopservices DSDontWriteNetworkStores true </summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/5381718942716958004/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2011/04/mac-os-disableenable-dsstore.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/5381718942716958004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/5381718942716958004'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2011/04/mac-os-disableenable-dsstore.html' title='Mac OS disable/enable .DS_Store'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-3247527452874956840</id><published>2011-04-13T05:09:00.001-07:00</published><updated>2011-04-13T05:09:20.262-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux Skills"/><title type='text'>vbindiff : Good tools for compare binary files.</title><summary type="text">vbindiff is a graphical windows tools for compare binary file.

It can easy find out what bytes different in ASCII or EBCDIC mode.

more information in manual page :)

SYNOPSIS
       vbindiff file1 [ file2 ]

DESCRIPTION

        Movement Keys
        -------------
        Up      Move one line (16 bytes) towards the beginning of the file
        Down    Move one line (16 bytes) towards the end </summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/3247527452874956840/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2011/04/vbindiff-good-tools-for-compare-binary.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/3247527452874956840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/3247527452874956840'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2011/04/vbindiff-good-tools-for-compare-binary.html' title='vbindiff : Good tools for compare binary files.'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-9044501868631263179</id><published>2011-04-12T02:54:00.001-07:00</published><updated>2011-04-12T02:54:54.143-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux Skills"/><title type='text'>SD card automount for Embedded Linux</title><summary type="text">If we want to using SD card auto mount.
Please reference manual page of command &quot;mdev&quot;.

#  mdev --helpBusyBox v1.18.4 (2011-04-01 22:32:35 CST) multi-call binary.Usage: mdev [-s] -s      Scan /sys and populate /dev during system bootIt can be run by kernel as a hotplug helper. To activate it: echo /sbin/mdev &amp;gt; /proc/sys/kernel/hotplug
It uses /etc/mdev.conf with lines[-]DEVNAME UID:GID PERM [</summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/9044501868631263179/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2011/04/sd-card-automount-for-embedded-linux.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/9044501868631263179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/9044501868631263179'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2011/04/sd-card-automount-for-embedded-linux.html' title='SD card automount for Embedded Linux'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0-Sn4PVqA3UozziPj3SGjXzK3fIZ-LRy_tU0r5KiCm0nhajeUMKiHpyvfGag3na83CLUwcNJwRgGCzYe8seb_HZtsj34zcXNZpBU1SSiYKv7e4RWSnW9NB0X49dwCerkHWNg-4JlQ6Dqd/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-2455701528676962945</id><published>2011-04-11T20:51:00.001-07:00</published><updated>2011-04-11T20:51:28.388-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux Skills"/><category scheme="http://www.blogger.com/atom/ns#" term="Programming"/><title type='text'>Bash Introduction (4/12)</title><summary type="text">4/12 Present in Alphanetworks.
 

 </summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/2455701528676962945/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2011/04/bash-introduction-412.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/2455701528676962945'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/2455701528676962945'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2011/04/bash-introduction-412.html' title='Bash Introduction (4/12)'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-8239230073718493262</id><published>2011-02-13T19:42:00.001-08:00</published><updated>2011-02-13T19:42:41.963-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Programming"/><category scheme="http://www.blogger.com/atom/ns#" term="Ruby"/><title type='text'>The chr() in Ruby.</title><summary type="text">Cause I have to write bytes string using Ruby.
I  collation some rules of chr() to clarify my mind.
At first. create new file.
file = File.new(&quot;helloRuby&quot;, &quot;w+&quot;)
 
There are three way to get the same result :

file.write(65.chr)
file.write(Integer(0x41).chr)
file.write(&quot;A&quot;)

upon three all get the hexdump result like :
00000000  41                                                |A|

And if using </summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/8239230073718493262/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2011/02/chr-in-ruby.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/8239230073718493262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/8239230073718493262'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2011/02/chr-in-ruby.html' title='The chr() in Ruby.'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-7584607946768883084</id><published>2011-02-08T23:59:00.001-08:00</published><updated>2011-02-08T23:59:09.829-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux Kernel Config"/><title type='text'>Cannot identify SD card partition! (mmcblk0: unknown partition table )</title><summary type="text">Situation : 
When I  plug-in my SD card into some EVB board.
SD driver can detect mmcblk0, but cannot detect SD partition.
like below:

# mmc0: new high speed SDHC card at address f7c1
mmcblk0: mmc0:f7c1 SD08G 3.50 GiB
mmcblk0: unknown partition table

 
But if I want to mount SD card to some folder,
I&#39;ll need to identify partition of SD card file system.
 
Solution :
After tracing...
Only need </summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/7584607946768883084/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2011/02/cannot-identify-sd-card-partition.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/7584607946768883084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/7584607946768883084'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2011/02/cannot-identify-sd-card-partition.html' title='Cannot identify SD card partition! (mmcblk0: unknown partition table )'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9GMcTr031TI1VV09il1VjOnwZoet8YaeOoYmrNMXJE2-kQhTVyAYOfafbLgRyudRR77np0fL9Dy28ap0F9AUsrEaYVjR2vEVf_-R8CSvO3c-uR6wA3pj75jH9yTLH2rbMdh33quJ8el1z/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-8175285847112725043</id><published>2010-09-27T21:19:00.000-07:00</published><updated>2010-09-27T21:20:25.690-07:00</updated><title type='text'>UNIX Programming</title><summary type="text">9/28 Present at Alpha networks.

Reference Books:
Advanced Programming in the UNIX Environment 2nd.
(W. Richard Stevens &amp;amp;&amp;nbsp;Stephen A. Rago)


</summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/8175285847112725043/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2010/09/unix-programming.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/8175285847112725043'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/8175285847112725043'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2010/09/unix-programming.html' title='UNIX Programming'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-2724727126791836014</id><published>2010-09-06T03:37:00.000-07:00</published><updated>2010-09-06T03:37:51.954-07:00</updated><title type='text'>Linux Man-Pages Release - 3.26</title><summary type="text">Linux Man-Pages 3.26 release.

Download from git :



git clone git://git.kernel.org/pub/scm/docs/man-pages/man-pages.git



Downliad tarball

http://www.kernel.org/pub/linux/docs/man-pages/Archive/


Release Notes:
http://www.kernel.org/doc/man-pages/changelog.html#release_3.26</summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/2724727126791836014/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2010/09/linux-man-pages-release-326.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/2724727126791836014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/2724727126791836014'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2010/09/linux-man-pages-release-326.html' title='Linux Man-Pages Release - 3.26'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-7448742190270573454</id><published>2010-08-22T21:07:00.000-07:00</published><updated>2010-08-22T21:07:02.191-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Vim Skill"/><title type='text'>Vim plugin - Doxygen</title><summary type="text"># 1. DoxygenToolkit.vim

let g:doxygenToolkit_authorName=&quot;your name&quot;

Usages:

:Dox
:DoxAuthor
:DoxBlock
:DoxUndoc(DEBUG)
:DoxLic


# 2. Doxygen.vim
cd ~/.vim/after/syntax;
ln -s doxygen.vim c.vim;
ln -s doxygen.vim cpp.vim;
ln -s doxygen.vim java.vim;

</summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/7448742190270573454/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2010/08/vim-plugin-doxygen.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/7448742190270573454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/7448742190270573454'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2010/08/vim-plugin-doxygen.html' title='Vim plugin - Doxygen'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-4015371021149608776</id><published>2010-08-10T00:53:00.000-07:00</published><updated>2010-08-10T00:53:31.537-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Vim Skill"/><title type='text'>vimgrep</title><summary type="text">
:vimgrep /pattern/[g][j] file1 file2 ... fileN


vimgrep is using to search pattern from following filelist.



vimgrep accept to ignore case,

If want to using this feature, put /\c in the pattern to ignore case.

ex: &amp;nbsp;vimgrep /pattern\c/ filename



or put /\C in the pattern to match it.

ex: &amp;nbsp;vimgrep /PaTtErn\c/ filename



Without flag &#39;j&#39;, vim jumps to the first match.

With flag </summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/4015371021149608776/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2010/08/vimgrep.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/4015371021149608776'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/4015371021149608776'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2010/08/vimgrep.html' title='vimgrep'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-6673503844946094438</id><published>2010-07-19T02:27:00.000-07:00</published><updated>2010-07-19T02:27:40.728-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Vim Skill"/><title type='text'>vim 一次註解多行</title><summary type="text">
使用VIM時, 註解多行的方式如下:

1. 進入 command mode ,
2. 按ctrl-V, 然後圈選要註解的區塊
3. 按 I 進入 Insert mode
4. 鍵入註解符號或要輸入的內容
5. 按 ESC 兩次, 就可以看到輸入的註解已經套用在所選擇的那幾行

note: 步驟三的 I 可以替換成 A, 這樣就會變成在行尾註解


在C/C++ 註解多行其實可以透過下面的方式簡單完成,
但 VIM 的多行註解則適用於各式語言喔！

#if 0

... 要註解的部份

#endif
</summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/6673503844946094438/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2010/07/vim_19.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/6673503844946094438'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/6673503844946094438'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2010/07/vim_19.html' title='vim 一次註解多行'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-407729411564175216</id><published>2010-07-19T02:20:00.000-07:00</published><updated>2010-07-19T02:20:40.529-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Vim Skill"/><title type='text'>vim 加密功能</title><summary type="text">Command Line 底下執行 VIM 時, 加上 -X 即可開啟檔案加密模式.

# vim -X [檔名]

這樣 vim 在開啟檔案時會要求使用者輸入密碼, 若原本沒有密碼, 則會要求建立密碼.

若密碼輸入錯誤, 同樣可以開啟檔案, 不過內容會呈現亂碼.

加密功能亦可以在編輯檔案時, 透過 :x 指令來加密.

不過要注意檔案在編輯時, vim 自動產生的 swap 檔案是沒有加密的,

因此在編輯檔案時可以考慮將 swap 功能關閉.

使用方法如下：

#vim -X 檔名 -n

或是檔案編輯中使用 :set noswf即可.</summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/407729411564175216/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2010/07/vim.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/407729411564175216'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/407729411564175216'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2010/07/vim.html' title='vim 加密功能'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-2198149572641284279</id><published>2010-03-29T22:51:00.000-07:00</published><updated>2010-03-29T22:56:13.838-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Apple"/><title type='text'>Apple release Mac OS X 10.6.3 with QuickTime X, OpenGL improvements</title><summary type="text">昨天蘋果釋出 Mac OS 10.6.3 更新雪豹作業系統,
主要改進了QuickTime X 和 OpenGL-base應用程式定址相容性問題.
蘋果建議使用Snow Leopard 的使用者 update 到 10.6.3 版,
這次的更新共佔 437.2 MB的空間.
概略更新的項目如下：

  Improves the reliability and compatibility of QuickTime X

  Addresses compatibility issues with OpenGL-based applications

  Addresses an issue that causes background message colors to display incorrectly in Mail

  Resolves an issue that </summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/2198149572641284279/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2010/03/apple-release-mac-os-x-1063-with.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/2198149572641284279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/2198149572641284279'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2010/03/apple-release-mac-os-x-1063-with.html' title='Apple release Mac OS X 10.6.3 with QuickTime X, OpenGL improvements'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-4930010553389547601</id><published>2010-03-26T01:48:00.000-07:00</published><updated>2010-03-28T23:43:35.007-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="streaming"/><title type='text'>Transport Stream Format.</title><summary type="text">簡介：
Transport Stream (傳輸串流) 簡稱 TS, 主要根據 ITU-T Rec. H.262 | ISO/IEC 13818-2 and ISO/IEC 13818-3制定而成.
Transport Stream 包含了一個或以上的 Program (節目),
Program 由 Video , Audio 和節目資訊(PSI) 組成,
而 Video 和 Audio 的 Elementary Stream 將被拆解裝載到 PES Packets.
而 PSI 則分為四種如下所列：

  Program Association Table

  Program Map Table

  Conditional Access Table

  Network Information Table

TS 結構分析 ：
TS 的長度是固定的, 每個 TS Packet 都是</summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/4930010553389547601/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2010/03/transport-stream-format.html#comment-form' title='1 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/4930010553389547601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/4930010553389547601'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2010/03/transport-stream-format.html' title='Transport Stream Format.'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://farm3.static.flickr.com/2705/4464574512_9f240bf668_t.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-1969916185857771379</id><published>2010-03-25T00:55:00.001-07:00</published><updated>2010-03-25T02:57:14.392-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux Skills"/><title type='text'>Standard I/O Redirection</title><summary type="text">Linux 提供三種 I/O Streams 給程式使用

  STDIN (0) : default is keyboard.


  STDOUT (1) : default is terminal.


  STDERR (2) : default is terminal.

而 STDOUT 和 STDERR 可以被重新導向至檔案 ( I/O Redirection ), 作法如下：

  
  $ binary &amp;gt; (將 STDOUT 重新導向)


  $ binary 2&amp;gt; (將 STDERR 重新導向)


  $ binary &amp;amp;&amp;gt; (將所有輸出重新導向)


  $ binary 2&amp;gt;&amp;amp;1 (將 STDERR 重新導向至 STDOUT)


  $ binary &amp;gt;&amp;amp;2 (將STDOUT 重新導向至 STDERR)</summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/1969916185857771379/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2010/03/standard-io-redirection.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/1969916185857771379'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/1969916185857771379'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2010/03/standard-io-redirection.html' title='Standard I/O Redirection'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-824691506989377595</id><published>2010-03-14T09:36:00.001-07:00</published><updated>2010-03-26T03:14:17.965-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux Skills"/><title type='text'>Linux 底下處理減號開頭的檔案名稱</title><summary type="text">在 Linux 底下, 由於減號(-) 通常都被來利用為指令的 Option,
因此若我們執行檔案處理的指令時,
若遇到減號開頭的檔名 (Example : -filename)
則通常會無法順利執行,
例如:
$ rm -filename
$ mv -filename filename
$ cp -filename filename

這幾個執行的結果都是失敗的!
遇到這種情況我們通常可以透過 ./ 或是 -- 來解決：
$ cp ./-filename filename
$ rm -- filename

當然啦,在UNIX底下, 減號是非常常用的特殊符號, 極度不建議拿來命名檔案或資料夾,
但若真的遇到這種狀況的話, 就透過以上的方式來處理囉 :)

</summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/824691506989377595/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2010/03/linux.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/824691506989377595'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/824691506989377595'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2010/03/linux.html' title='Linux 底下處理減號開頭的檔案名稱'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://farm5.static.flickr.com/4049/4464139614_7db16112f3_t.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-7148503654338422567</id><published>2010-03-09T01:50:00.000-08:00</published><updated>2010-03-25T02:45:08.916-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux Skills"/><title type='text'>X over ssh</title><summary type="text">一般我們遠端使用 Linux or Unix 主機時,常常是透過 telnet 或是 ssh 來做文字模式的操作 如果我們希望遠端使用 Linux 或是 Unix 系統的圖形介面,

常用的方式有 VNC, 另一種就是透過 ssh 來啟動 X 圖形介面.
 X 視窗系統(目前版本為 X11) 提供了圖形介面來代替文字操作介面, 多數 Unix-linx 的作業系統都有支援,
 ssh 則是使用 Secure shell, 透過網路來做兩台主機間的溝通. 可以在加密的狀態下使兩台有ssh的裝置透過網路連接 如果我們透過 ssh 使用 X windows system,
就可以透過遠端連線來使用圖形話GUI介面,
要使用 X over ssh 要先準備幾個項目
1. 首先在本機端 (local) 安裝 X server
2. 遠端系統必須預先安裝 xterm, xeyes, xcalc, </summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/7148503654338422567/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2010/03/x-over-ssh.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/7148503654338422567'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/7148503654338422567'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2010/03/x-over-ssh.html' title='X over ssh'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJ4AGHH4iT5jeAzzlyO-kNqCeKE7GG_MrkAEHjPG_Wq8zfLK1198jR1BUoJ5x_jngWbAJD1B7xkccAMLKh-ISeZtL-ERUC0_a7DCC37nsFsVuz2Cs6Lzck1d3K5kW-FSQtbraRfXwUhX-8/s72-c/%E8%9E%A2%E5%B9%95%E5%BF%AB%E7%85%A7+2010-03-09+%E4%B8%8B%E5%8D%887.29.16.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-8874074234511367411</id><published>2010-03-04T00:53:00.000-08:00</published><updated>2010-03-25T02:44:09.772-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux Skills"/><category scheme="http://www.blogger.com/atom/ns#" term="Vim Skill"/><title type='text'>Vim Session</title><summary type="text">Vim 7 除了相當好用的 Vim Tab Pages 功能外,
也能搭配 mksession 來儲存目前 Vim 的狀態,
例如,每次工作實都開了一些Vim Tab Pages,
或是設定了一些 .vimrc 中非預設的設定
但關掉 Terminal 後就通通消失,
Tab Page要重開, 設定也要重新設定過,

這時候就可以利用 mksession的功能囉！

  
  



:mksession 預設會幫你在目前的目錄底下產生 Session.vim
裡面記錄了已經開啟的 Tab 資訊以及其他設定,
也可以用縮寫 :mks

下次開始 Vim 時, 只要加上 -S Session.vim,



  
  



或是開啟 Vim 後使用 :source Session.vim,



  
  

就能恢復上次工作的狀態了:)


  
  


當然,也可以自己決定</summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/8874074234511367411/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2010/03/vim-session.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/8874074234511367411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/8874074234511367411'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2010/03/vim-session.html' title='Vim Session'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2BF6lQQe6q6ZIvP9RH6DFLWa_7LFmgsPWtqvBkcBTo1YxD4xAX0UvL0qNuOG2eqHG1EHiBX3FcW8wstbxWZBKAjzA_6uKhcA6g5TTWOLG1NPiKh22NzyN9_prxk8AVhIo3pZ3nh6fgUfG/s72-c/%E8%9E%A2%E5%B9%95%E5%BF%AB%E7%85%A7+2010-03-04+%E4%B8%8B%E5%8D%884.43.18.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5992131415781765269.post-8074919693693428870</id><published>2010-02-07T18:30:00.000-08:00</published><updated>2010-03-04T00:54:21.334-08:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux Skills"/><category scheme="http://www.blogger.com/atom/ns#" term="Vim Skill"/><title type='text'>Vim Tab Page 功能</title><summary type="text">Vim Tab功能：


:tae[dit] or tabnew +&amp;nbsp;filename &amp;nbsp; &amp;nbsp; 開新 tab page
:tabc&amp;nbsp;
:tabc[lose] {count}
:tabo[nly]

:tabn[ext] 下一個tab
:tabp[revious] 上一個tab


:tabm[move] [N] 移動目前的Tab Page順序到第N頁, 若N為0則移動到第一頁.

:tabfind filename* 尋找當前目錄檔案filename開頭的檔名
:tabs &amp;nbsp;列出以開啟的tab
:tabdo %s/foo/boo/g &amp;nbsp;將開啟的tab中所有foo替換成boo

Note that : Tab Page 是 Vim 7 開始加入的新功能

--</summary><link rel='replies' type='application/atom+xml' href='http://infosoure.blogspot.com/feeds/8074919693693428870/comments/default' title='張貼留言'/><link rel='replies' type='text/html' href='http://infosoure.blogspot.com/2010/02/vim-tab.html#comment-form' title='0 個意見'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/8074919693693428870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5992131415781765269/posts/default/8074919693693428870'/><link rel='alternate' type='text/html' href='http://infosoure.blogspot.com/2010/02/vim-tab.html' title='Vim Tab Page 功能'/><author><name>Shawn Lin</name><uri>http://www.blogger.com/profile/10290383585359704381</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://4.bp.blogspot.com/_Mg69URZW8P4/THPvdvsgCHI/AAAAAAAAAHQ/VaE0lPxCOJE/S220/%E7%85%A7%E7%89%87%E6%97%A5%E6%9C%9F+2010-05-25%E6%99%82%E9%96%93+19.36.jpg'/></author><thr:total>0</thr:total></entry></feed>