<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Follow your heart</title>
 <link href="http://ckrissun.github.io/" rel="self"/>
 <link href="http://ckrissun.github.io"/>
 <updated>2013-07-29T02:58:33-07:00</updated>
 <id>http://ckrissun.github.io</id>
 <author>
   <name>Feihu Sun</name>
   <email>ckrissun#gmail.com</email>
 </author>

 
 <entry>
   <title>Remote Packet Capture for iOS Devices</title>
   <link href="http://ckrissun.github.io/2013/07/29/remote-packet-capture-on-ios"/>
   <updated>2013-07-29T15:12:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/07/29/remote-packet-capture-on-ios</id>
   <content type="html">&lt;p&gt;&lt;strong&gt;&lt;em&gt;just use the rvictl shell command to build an remote virtual interface and use tcpdump/wireshark to capture what one want&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;just see here&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://useyourloaf.com/blog/2012/02/07/remote-packet-capture-for-ios-devices.html&quot;&gt;Remote Packet Capture&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;here,&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://developer.apple.com/library/mac/#qa/qa1176/_index.html&quot;&gt;Getting a Packet Trace&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and here&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.cnblogs.com/v2m_/archive/2012/12/19/2825549.html&quot;&gt;网络模拟与抓包&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>The Wisdom Project</title>
   <link href="http://ckrissun.github.io/2013/07/16/wisdom-project"/>
   <updated>2013-07-16T09:56:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/07/16/wisdom-project</id>
   <content type="html">&lt;p&gt;&lt;strong&gt;&lt;em&gt;Nice website, just share it here&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.wisdomproject.cc&quot;&gt;The Widsom Prject&lt;/a&gt;, &quot;Safeguard significant knowledge for posterity&quot;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Git: 使用手册</title>
   <link href="http://ckrissun.github.io/2013/07/06/git-manual"/>
   <updated>2013-07-06T13:10:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/07/06/git-manual</id>
   <content type="html">&lt;p&gt;&lt;a href=&quot;http://git.oschina.net/progit&quot;&gt;Git使用手册&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Git: 使用手册&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>Mac: Build MacVim</title>
   <link href="http://ckrissun.github.io/2013/07/05/build-macvim"/>
   <updated>2013-07-05T20:50:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/07/05/build-macvim</id>
   <content type="html">&lt;p&gt;Github源码&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;  git clone https://github.com/b4winckler/macvim.git
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Build&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;  CC=clang ./configure --with-features=huge \
                       --enable-rubyinterp \
                       --enable-pythoninterp \
                       --enable-perlinterp \
                       --enable-cscope
  make
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Install&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;  cp -a src/MacVim/build/Release/MacVim.app ~/Applications/MacVim.app
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Configure:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;  git clone https://github.com/amix/vimrc.git

  and have a look at here (https://github.com/amix/vimrc)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Have fun, thanks!&lt;/p&gt;

&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Build MacVim&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>三个快速且简单的让你的大脑安静下来的方法</title>
   <link href="http://ckrissun.github.io/2013/07/05/cold-your-brain"/>
   <updated>2013-07-05T20:35:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/07/05/cold-your-brain</id>
   <content type="html">&lt;p&gt;Hey, you can check it out here&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.aqee.net/three-quick-and-easy-ways-to-quiet-your-mind/&quot;&gt;三个快速且简单的让你的大脑安静下来的方法&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;or here&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://blogs.hbr.org/cs/2012/12/quick_and_easy_ways_to_quiet_y.html&quot;&gt;Quick and Easy Ways to Quiet Your Mind&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&quot;
&lt;strong&gt;&lt;em&gt;快速冥想&lt;/em&gt;&lt;/strong&gt;
&quot;&lt;/p&gt;

&lt;p&gt;&quot;
&lt;strong&gt;&lt;em&gt;建立工作节奏&lt;/em&gt;&lt;/strong&gt;
&quot;
类似于番茄钟&lt;/p&gt;

&lt;p&gt;&quot;
&lt;strong&gt;&lt;em&gt;胡思乱想 白日做梦&lt;/em&gt;&lt;/strong&gt;
&quot;&lt;/p&gt;

&lt;p&gt;Just have fun, guys!&lt;/p&gt;

&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;三个快速且简单的让你的大脑安静下来的方法&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>无题</title>
   <link href="http://ckrissun.github.io/2013/07/05/attraction-in-life"/>
   <updated>2013-07-05T20:25:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/07/05/attraction-in-life</id>
   <content type="html">&lt;p&gt;最早了解到“吸引力法则”，是来自《秘密/Secret》这本书。&lt;/p&gt;

&lt;h3&gt;何为吸引力？&lt;/h3&gt;

&lt;hr /&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;能够吸引你的事物&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;生活中的吸引力法则&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;求职。面对多个offer，我们作出了自己的选择，而实际上是这份工作吸引了我们。。。&lt;/li&gt;
&lt;li&gt;恋爱。热恋的男女，是怎么走到一起的呢？彼此吸引&lt;/li&gt;
&lt;li&gt;购物。你是怎么去选择自己喜欢的服饰呢？谁更能吸引，就选择谁，不是吗&lt;/li&gt;
&lt;li&gt;还有很多很多。。。&lt;/li&gt;
&lt;/ol&gt;


&lt;h3&gt;正确引导吸引力&lt;/h3&gt;

&lt;p&gt;被好的事物所吸引/影响&lt;/p&gt;

&lt;h3&gt;能得到什么启发？&lt;/h3&gt;

&lt;p&gt;...
也许，可以利用这一点，做一些事情。
也许，没有任何意义。，&lt;/p&gt;

&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;无题之吸引力&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>MySQL: 两个实用的时间戳函数</title>
   <link href="http://ckrissun.github.io/2013/07/05/mysql-timestamp"/>
   <updated>2013-07-05T19:50:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/07/05/mysql-timestamp</id>
   <content type="html">&lt;ol&gt;
&lt;li&gt;&lt;p&gt;时间戳-&gt;日期字符串&lt;/p&gt;

&lt;p&gt; SELECT FROM_UNIXTIME(&lt;code&gt;1373025189&lt;/code&gt;);&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;日期字符串-&gt;时间戳&lt;/p&gt;

&lt;p&gt; SELECT UNIX_TIMESTAMP('2013-07-05 12:00:00');&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;MySQL: 两个实用的时间戳函数&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>TED: 四旋翼直升机的惊人运动机能</title>
   <link href="http://ckrissun.github.io/2013/07/04/smart-quads"/>
   <updated>2013-07-04T10:07:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/07/04/smart-quads</id>
   <content type="html">&lt;p&gt;NB的四旋翼直升机的惊人运动机能，浏览这里&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://v.163.com/movie/2013/6/K/4/M90KU15HG_M90KUKOK4.html&quot;&gt;四旋翼直升机的惊人运动机能&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;四旋翼直升机的惊人运动机能&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>tukkk在线小语种学习</title>
   <link href="http://ckrissun.github.io/2013/07/03/tukkk-language-learn"/>
   <updated>2013-07-03T22:47:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/07/03/tukkk-language-learn</id>
   <content type="html">&lt;p&gt;小语种在线学习资源，很不错的哈\&lt;sup&gt;_\^&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.tukkk.com&quot;&gt;tukkk小语种在线学习&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;tukkk在线小语种学习&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>CoffeeScript学习资源</title>
   <link href="http://ckrissun.github.io/2013/07/03/coffee-script-resource"/>
   <updated>2013-07-03T19:50:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/07/03/coffee-script-resource</id>
   <content type="html">&lt;p&gt;很好的学习资源，收藏，\&lt;sup&gt;_\^&lt;/sup&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://coffee-js.github.io/coffeescript.cn/&quot;&gt;Coffee is not a coffee: http://coffee-js.github.io/coffeescript.cn/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;hr /&gt;

&lt;ul&gt;
&lt;li&gt;CoffeeScript学习资源&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>Programming is an art</title>
   <link href="http://ckrissun.github.io/2013/07/03/programming-is-an-art"/>
   <updated>2013-07-03T10:12:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/07/03/programming-is-an-art</id>
   <content type="html">&lt;p&gt;just read here, &lt;a href=&quot;http://amix.dk/blog/post/19692#Programming-is-an-art&quot;&gt;Programming is an art&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;&quot;
I have been thinking why I love programming and the bottom line is that I love creating stuff. I like to imagine how things can be. Using only a computer I can create anything I can imagine and I can easily share my creations with other people. It's not many professions that enable you this
&quot;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;&quot;
Allocate 4 hours pr. week where you can create anything you want. Focus on creating. Don't let anybody interrupt you. Move to a cafe. Lock your office. Don't consume. Don't read Hacker News. Don't consume Twitter. Use the 4 hours to create something!
&quot;&lt;/em&gt;&lt;/strong&gt;
--- from Amir Salihefendic&lt;/p&gt;

&lt;p&gt;I think it's a very best idea.&lt;/p&gt;

&lt;p&gt;Just keep creative, and do something, you will get more.&lt;/p&gt;

&lt;p&gt;Have fun, guys~!&lt;/p&gt;

&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Programming is an art&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>Unity3D: 预定义宏定义</title>
   <link href="http://ckrissun.github.io/2013/07/02/unity-predefined-macros"/>
   <updated>2013-07-02T18:53:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/07/02/unity-predefined-macros</id>
   <content type="html">&lt;p&gt;Unity3D的一些预定义宏定义，仅仅作为备案，以备查阅。&lt;/p&gt;

&lt;p&gt;来自Unity3D官方&lt;a href=&quot;http://docs.unity3d.com/Documentation/Manual/PlatformDependentCompilation.html&quot;&gt;Platform Dependent Compilation&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Platform Defines
The platform defines that Unity supports for your scripts are:&lt;/p&gt;

&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;UNITY_EDITOR             &lt;/th&gt;
&lt;th&gt; Define for calling Unity Editor scripts from your game code.&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_STANDALONE_OSX   &lt;/td&gt;
&lt;td&gt; Platform define for compiling/executing code specifically for Mac OS (This includes Universal, PPC and Intel architectures).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_DASHBOARD_WIDGET &lt;/td&gt;
&lt;td&gt; Platform define when creating code for Mac OS dashboard widgets.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_STANDALONE_WIN     &lt;/td&gt;
&lt;td&gt; Use this when you want to compile/execute code for Windows stand alone applications.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_STANDALONE_LINUX &lt;/td&gt;
&lt;td&gt; Use this when you want to compile/execute code for Linux stand alone applications.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_STANDALONE         &lt;/td&gt;
&lt;td&gt; Use this to compile/execute code for any standalone platform (Mac, Windows or Linux).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_WEBPLAYER        &lt;/td&gt;
&lt;td&gt; Platform define for web player content (this includes Windows and Mac Web player executables).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_WII                &lt;/td&gt;
&lt;td&gt; Platform define for compiling/executing code for the Wii console.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_IPHONE             &lt;/td&gt;
&lt;td&gt; Platform define for compiling/executing code for the iPhone platform.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_ANDROID            &lt;/td&gt;
&lt;td&gt; Platform define for the Android platform.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_PS3                &lt;/td&gt;
&lt;td&gt; Platform define for running PlayStation 3 code.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_XBOX360            &lt;/td&gt;
&lt;td&gt; Platform define for executing Xbox 360 code.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_NACL             &lt;/td&gt;
&lt;td&gt; Platform define when compiling code for Google native client (this will be set additionally to UNITY_WEBPLAYER).&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_FLASH            &lt;/td&gt;
&lt;td&gt; Platform define when compiling code for Adobe Flash.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;


&lt;p&gt;Also you can compile code selectively depending on the version of the engine you are working on. Currently the supported ones are:&lt;/p&gt;

&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;UNITY_2_6   &lt;/th&gt;
&lt;th&gt; Platform define for the major version of Unity 2.6.&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_2_6_1 &lt;/td&gt;
&lt;td&gt; Platform define for specific version 1 from the major release 2.6.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_3_0   &lt;/td&gt;
&lt;td&gt; Platform define for the major version of Unity 3.0.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_3_0_0 &lt;/td&gt;
&lt;td&gt; Platform define for the specific version 0 of Unity 3.0.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_3_1   &lt;/td&gt;
&lt;td&gt; Platform define for major version of Unity 3.1.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_3_2   &lt;/td&gt;
&lt;td&gt; Platform define for major version of Unity 3.2.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_3_3   &lt;/td&gt;
&lt;td&gt; Platform define for major version of Unity 3.3.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_3_4   &lt;/td&gt;
&lt;td&gt; Platform define for major version of Unity 3.4.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_3_5   &lt;/td&gt;
&lt;td&gt; Platform define for major version of Unity 3.5.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_4_0   &lt;/td&gt;
&lt;td&gt; Platform define for major version of Unity 4.0.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_4_0_1 &lt;/td&gt;
&lt;td&gt; Platform define for major version of Unity 4.0.1.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UNITY_4_1   &lt;/td&gt;
&lt;td&gt; Platform define for major version of Unity 4.1.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;


&lt;p&gt;Note: For versions before 2.6.0 there are no platform defines as this feature was first introduced in that version.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Before I die, I want to ...</title>
   <link href="http://ckrissun.github.io/2013/07/01/before-i-die"/>
   <updated>2013-07-01T19:27:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/07/01/before-i-die</id>
   <content type="html">&lt;p&gt;&lt;img src=&quot;http://ckrissun.github.io/assets/images/before_i_die_cover.jpg&quot; alt=&quot;Before_i_die_cover&quot; /&gt;
Before I die, I want to be complete myself!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This topic can be found here &lt;a href=&quot;http://www.ted.com/talks/candy_chang_before_i_die_i_want_to.html&quot;&gt;Candy Chang: Before I die I want to...&lt;/a&gt; and here &lt;a href=&quot;http://beforeidieiwantto.org&quot;&gt;andy Chang: Before I die I want to...&lt;/a&gt; and here &lt;a href=&quot;http://en.wikipedia.org/wiki/Before_I_Die&quot;&gt;Before_I_Die&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;hr /&gt;

&lt;ul&gt;
&lt;li&gt;Before I die, I want to ...&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>你的时间都浪费在什么地方？</title>
   <link href="http://ckrissun.github.io/2013/07/01/time-waste-on-where"/>
   <updated>2013-07-01T19:25:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/07/01/time-waste-on-where</id>
   <content type="html">&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;hr /&gt;

&lt;ul&gt;
&lt;li&gt;你的时间都浪费在什么地方?&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>Richard St. John's 8 secrets of success</title>
   <link href="http://ckrissun.github.io/2013/07/01/secret-of-success"/>
   <updated>2013-07-01T19:15:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/07/01/secret-of-success</id>
   <content type="html">&lt;ul&gt;
&lt;li&gt;Passion&lt;/li&gt;
&lt;li&gt;Work&lt;/li&gt;
&lt;li&gt;Good&lt;/li&gt;
&lt;li&gt;Push&lt;/li&gt;
&lt;li&gt;Serve&lt;/li&gt;
&lt;li&gt;Ideas&lt;/li&gt;
&lt;li&gt;Persist&lt;/li&gt;
&lt;li&gt;Focus&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;and you can see this TED video on &lt;a href=&quot;http://www.ted.com/talks/richard_st_john_s_8_secrets_of_success.html&quot;&gt;Richard St. John's 8 secrets of success&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;hr /&gt;

&lt;ul&gt;
&lt;li&gt;Richard St. John's 8 secrets of success&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>Jkeyll: 如何写博客</title>
   <link href="http://ckrissun.github.io/2013/06/30/how-write-blog"/>
   <updated>2013-06-30T13:01:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/06/30/how-write-blog</id>
   <content type="html">&lt;h3&gt;基本格式&lt;/h3&gt;

&lt;hr /&gt;

&lt;pre&gt;&lt;code&gt;---
layout: post
title: &quot;title&quot;
date: 2013-06-30 12:00
category: &quot;category&quot;
tags: [tags]
--


xxxxxx
xxxxxx 使用markdown语法写内容
xxxxxx
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;MARKDOWN语法&lt;/h3&gt;

&lt;hr /&gt;

&lt;p&gt;参考Mac下&lt;a href=&quot;http://mouapp.com&quot;&gt;Mou编辑器&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;hr /&gt;

&lt;ul&gt;
&lt;li&gt;Jkeyll: 如何写博客&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>今天，你努力了吗？</title>
   <link href="http://ckrissun.github.io/2013/06/30/today-work-hard"/>
   <updated>2013-06-30T12:56:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/06/30/today-work-hard</id>
   <content type="html">&lt;p&gt;如题!&lt;/p&gt;

&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;hr /&gt;

&lt;ul&gt;
&lt;li&gt;今天，你努力了吗？&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>Golang开发环境: vim+gocode</title>
   <link href="http://ckrissun.github.io/2013/06/29/build-golang-environment"/>
   <updated>2013-06-29T18:02:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/06/29/build-golang-environment</id>
   <content type="html">&lt;h3&gt;安装Golang&lt;/h3&gt;

&lt;hr /&gt;

&lt;p&gt;下载&lt;a href=&quot;http://code.google.com/p/go/downloads/list&quot;&gt;Golang编译器&lt;/a&gt;，解压到某一目录，可以放在/usr/local或者~/bin目录，或者其他自己喜好的目录；&lt;/p&gt;

&lt;p&gt;设置Golang环境，我的配置如下(Mac)：&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Golang settings
export GOROOT=$HOME/Applications/go
export GOPATH=$HOME/go
export GOARCH=amd64
export GOOS=darwin
export GOBIN=$GOROOT/bin
export PATH=.:$GOBIN:$PATH
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;大家可以参考自己的安装环境做一定的修改。其中，
+ GOROOT - Golang的安装目录
+ GOPATH - Golang第三方库安装位置，用go get xx.xx.xx.xx/xx安装第三方库安装到该目录
+ GOARCH - CPU架构，amd64/386/arm/...
+ GOOS   - 当前使用的OS，linux/darwin/...&lt;/p&gt;

&lt;h3&gt;安装Gocode&lt;/h3&gt;

&lt;hr /&gt;

&lt;p&gt;参考&lt;a href=&quot;https://github.com/nsf/gocode&quot;&gt;官方的安装方法&lt;/a&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;go get -u github.com/nsf/gocode (-u flag for &quot;update&quot;)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;配置Gocode，命令为gocode set option value&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;gocode set propose-buildins true
gocode set lib-path ~/Projects/go/pkg/darwin_amd64:~/go/pkg/darwin_amd64
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;其中,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;propose-buildins: 是否自动提示Go的内置函数、类型和常量，默认false，不提示&lt;/li&gt;
&lt;li&gt;lib-path: 默认情况下，gocode只会搜索$GOPATH/pkg/$GOOS&lt;em&gt;$GOARCH和$GOROOT/pkg/$GOOS&lt;/em&gt;$GOARCH目录下的包，当然这个设置就是可以设置我们额外的lib能访问的路径，代码自动完成时需要设置该选项&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;配置Vim&lt;/h3&gt;

&lt;p&gt;复制$GOROOT/misc/vim目录下内容到~/.vim目录&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;make -p ~/.vim
cp -a $GOROOT/misc/vim ~/.vim
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;安装gocode的vim脚本&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cd $HOME/go/src/github.com/nsf/gocode/vim (gocode的安装目录下)
./update.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;启用 filetype plugin&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;filetype plugin on
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;使用golang的代码自动完成&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Ctrl-x Ctrl-o -- 代码编辑时，打开自动完成
Ctrl-p -- 代码提示列表
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;hr /&gt;

&lt;ul&gt;
&lt;li&gt;搭建Golang开发环境&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>Mac: 安装Jekyll博客系统</title>
   <link href="http://ckrissun.github.io/2013/06/29/install-jekyll-on-mac"/>
   <updated>2013-06-29T16:56:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/06/29/install-jekyll-on-mac</id>
   <content type="html">&lt;p&gt;部署Jekyll时，需要使用Ruby 1.9.x以上，而最新的Mac OSX 10.8.x系统上使用Ruby 1.8.x，需要使用RVM来安装不同的Ruby版本。&lt;/p&gt;

&lt;p&gt;也可以使用homebrew安装ruby，有兴趣的朋友可以尝试。&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;brew install ruby
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;安装RVM&lt;/h3&gt;

&lt;hr /&gt;

&lt;p&gt;RVM被用来管理系统中不同的Ruby版本，安装前请对RVM&lt;a href=&quot;https://rvm.io/rvm/install/&quot;&gt;进行了解&lt;/a&gt;。&lt;/p&gt;

&lt;p&gt;安装稳定版&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;curl -L https://get.rvm.io | bash -s stable
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;安装过程中输出的信息，会提示如何启用rvm，如使用&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;source ~/.rvm/scripts/rvm
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;即可使用RVM。&lt;/p&gt;

&lt;p&gt;安装成功后，在~/.bash_profile中会自动添加&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[[ -s &quot;$HOME/.rvm/scripts/rvm&quot; ]] &amp;amp;&amp;amp; source &quot;$HOME/.rvm/scripts/rvm&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;表示在打开终端时自动加载&lt;/p&gt;

&lt;p&gt;为了加快RVM下载源码的速度，可以修改RVM的源码镜像地址，具体请参考&lt;a href=&quot;http://ruby.taobao.org&quot;&gt;RubyGems淘宝镜像&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;安装Ruby&lt;/h3&gt;

&lt;hr /&gt;

&lt;p&gt;通过RVM中安装Ruby 2.0.0&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rvm install 2.0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;安装过程中，若下载Ruby 2.0.0源码时较慢或者没有反应，可以手动&lt;a href=&quot;http://ftp.ruby-lang.org/pub/ruby/2.0&quot;&gt;下载Ruby 2.0.0&lt;/a&gt;。然后把Ruby源码放在~/.rvm/archives/目录下，重新执行安装即可。&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rvm reinstall 2.0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;启用Ruby 2.0.0&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rvm use 2.0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;使用Rubygems安装包时，为了加快下载速度，可以改用RubyGems淘宝镜像，具体设置请参考&lt;a href=&quot;http://ruby.taobao.org&quot;&gt;RubyGems淘宝镜像&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;安装 Jekyll&lt;/h3&gt;

&lt;hr /&gt;

&lt;p&gt;通过RubyGems安装&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;gem install jekyll jekyll-tagging
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;如果不需要用默认的Markdown模版Maruku，想使用RDiscount，则请安装：&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;gem install rdiscount
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;hr /&gt;

&lt;ul&gt;
&lt;li&gt;github环境搭建&lt;/li&gt;
&lt;li&gt;jekyll配置&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;Refrence&lt;/h3&gt;

&lt;hr /&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://equation85.github.io/blog/install-jekyll-on-mac/&quot;&gt;在Mac中部署你的Jekyll&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://brandonbohling.com/2011/08/27/Installing-Jekyll-on-Mac/&quot;&gt;Installing-Jekyll-on-Mac&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://jekyllbootstrap.com&quot;&gt;Blogging with Jekyll Tutorial | Jekyll-Bootstrap&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>[TO-DO]为什么写Blog</title>
   <link href="http://ckrissun.github.io/2013/06/29/why-write-blog"/>
   <updated>2013-06-29T12:48:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/06/29/why-write-blog</id>
   <content type="html">&lt;p&gt;这个家伙很懒，什么也没留下&lt;/p&gt;

&lt;p&gt;!!!未完待续，to be continued ...!!!&lt;/p&gt;

&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;hr /&gt;

&lt;ul&gt;
&lt;li&gt;为什么写Blog&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>Jekyll Quick Start</title>
   <link href="http://ckrissun.github.io/2013/06/28/jekyll-quick-start"/>
   <updated>2013-06-28T22:36:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/06/28/jekyll-quick-start</id>
   <content type="html">&lt;p&gt;Read &lt;a href=&quot;http://jekyllbootstrap.com/usage/jekyll-quick-start.html&quot;&gt;Jekyll Quick Start&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Complete usage and documentation available at: &lt;a href=&quot;http://jekyllbootstrap.com&quot;&gt;Jekyll Bootstrap&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Update Author Attributes&lt;/h2&gt;

&lt;p&gt;In &lt;code&gt;_config.yml&lt;/code&gt; remember to specify your own data:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;title : My Blog =)

author :
  name : Name Lastname
  email : blah@email.test
  github : username
  twitter : username
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The theme should reference these variables whenever needed.&lt;/p&gt;

&lt;h2&gt;Sample Posts&lt;/h2&gt;

&lt;p&gt;This blog contains sample posts which help stage pages and blog data.
When you don't need the samples anymore just delete the &lt;code&gt;_posts/core-samples&lt;/code&gt; folder.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ rm -rf _posts/core-samples
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here's a sample &quot;posts list&quot;.&lt;/p&gt;

&lt;ul class=&quot;posts&quot;&gt;
  
    &lt;li&gt;&lt;span&gt;29 Jul 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/07/29/remote-packet-capture-on-ios&quot;&gt;Remote Packet Capture for iOS Devices&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;16 Jul 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/07/16/wisdom-project&quot;&gt;The Wisdom Project&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;06 Jul 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/07/06/git-manual&quot;&gt;Git: 使用手册&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;05 Jul 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/07/05/build-macvim&quot;&gt;Mac: Build MacVim&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;05 Jul 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/07/05/cold-your-brain&quot;&gt;三个快速且简单的让你的大脑安静下来的方法&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;05 Jul 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/07/05/attraction-in-life&quot;&gt;无题&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;05 Jul 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/07/05/mysql-timestamp&quot;&gt;MySQL: 两个实用的时间戳函数&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;04 Jul 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/07/04/smart-quads&quot;&gt;TED: 四旋翼直升机的惊人运动机能&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;03 Jul 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/07/03/tukkk-language-learn&quot;&gt;tukkk在线小语种学习&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;03 Jul 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/07/03/coffee-script-resource&quot;&gt;CoffeeScript学习资源&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;03 Jul 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/07/03/programming-is-an-art&quot;&gt;Programming is an art&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;02 Jul 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/07/02/unity-predefined-macros&quot;&gt;Unity3D: 预定义宏定义&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;01 Jul 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/07/01/before-i-die&quot;&gt;Before I die, I want to ...&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;01 Jul 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/07/01/time-waste-on-where&quot;&gt;你的时间都浪费在什么地方？&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;01 Jul 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/07/01/secret-of-success&quot;&gt;Richard St. John's 8 secrets of success&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;30 Jun 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/06/30/how-write-blog&quot;&gt;Jkeyll: 如何写博客&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;30 Jun 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/06/30/today-work-hard&quot;&gt;今天，你努力了吗？&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;29 Jun 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/06/29/build-golang-environment&quot;&gt;Golang开发环境: vim+gocode&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;29 Jun 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/06/29/install-jekyll-on-mac&quot;&gt;Mac: 安装Jekyll博客系统&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;29 Jun 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/06/29/why-write-blog&quot;&gt;[TO-DO]为什么写Blog&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;28 Jun 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/06/28/jekyll-quick-start&quot;&gt;Jekyll Quick Start&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;13 May 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/05/13/jobs-says&quot;&gt;乔布斯: 坚持思考两个问题&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;04 May 2013&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2013/05/04/how-is-life&quot;&gt;鲁迅生活哲理&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;26 Nov 2012&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2012/11/26/linux-install-jdk&quot;&gt;Linux: 设置Oracle JDK环境&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;26 Nov 2012&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2012/11/26/linux-install-wireshark&quot;&gt;Linux: 安装WireShark问题&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;26 Nov 2012&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2012/11/26/linux-build-rtthread&quot;&gt;Linux: 使用RT-Thread构建嵌入式应用&lt;/a&gt;&lt;/li&gt;
  
    &lt;li&gt;&lt;span&gt;29 Dec 2011&lt;/span&gt; &amp;raquo; &lt;a href=&quot;/2011/12/29/jekyll-introduction&quot;&gt;Jekyll Introduction&lt;/a&gt;&lt;/li&gt;
  
&lt;/ul&gt;


&lt;h2&gt;To-Do&lt;/h2&gt;

&lt;p&gt;This theme is still unfinished. If you'd like to be added as a contributor, &lt;a href=&quot;http://github.com/plusjade/jekyll-bootstrap&quot;&gt;please fork&lt;/a&gt;!
We need to clean up the themes, make theme usage guides with theme-specific markup examples.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>乔布斯: 坚持思考两个问题</title>
   <link href="http://ckrissun.github.io/2013/05/13/jobs-says"/>
   <updated>2013-05-13T20:30:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/05/13/jobs-says</id>
   <content type="html">&lt;ul&gt;
&lt;li&gt;Why doesn't it work?&lt;/li&gt;
&lt;li&gt;What should I change to make it work?&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;TO-Do&lt;/h3&gt;

&lt;hr /&gt;

&lt;ul&gt;
&lt;li&gt;乔布斯: 坚持思考两个问题&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>鲁迅生活哲理</title>
   <link href="http://ckrissun.github.io/2013/05/04/how-is-life"/>
   <updated>2013-05-04T12:48:00-07:00</updated>
   <id>http://ckrissun.github.io/2013/05/04/how-is-life</id>
   <content type="html">&lt;p&gt;鲁迅生活哲理，来自&lt;a href=&quot;http://www.xinli001.com/info/574/&quot;&gt;《一种深久的不安》&lt;/a&gt;，&lt;a href=&quot;http://fm.xinli001.com/2/&quot;&gt;有声版&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;所谓生存，不是苟活&lt;/li&gt;
&lt;li&gt;所谓温饱，不是奢侈&lt;/li&gt;
&lt;li&gt;所谓发展，不是放纵&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;hr /&gt;

&lt;ul&gt;
&lt;li&gt;鲁讯生活哲理&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>Linux: 设置Oracle JDK环境</title>
   <link href="http://ckrissun.github.io/2012/11/26/linux-install-jdk"/>
   <updated>2012-11-26T14:54:00-08:00</updated>
   <id>http://ckrissun.github.io/2012/11/26/linux-install-jdk</id>
   <content type="html">&lt;p&gt;安装好Oracle JDK环境后（实际上是安装到一个目录中），但Linux系统并不知道，需要进行设置，如下：&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo update-alternatives --install &quot;/usr/bin/java&quot; &quot;java&quot; &quot;/home/sfh/software/jdk1.6.0_37/bin/java&quot; 1  
$ sudo update-alternatives --install &quot;/usr/bin/javac&quot; &quot;javac&quot; &quot;/home/sfh/software/jdk1.6.0_37/bin/javac&quot; 1  
$ sudo update-alternatives --install &quot;/usr/bin/javaws&quot; &quot;javaws&quot; &quot;/home/sfh/software/jdk1.6.0_37/bin/javaws&quot; 1  

$ sudo update-alternatives --config java  
$ sudo update-alternatives --config javac  
$ sudo update-alternatives --config javaws 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;说明：/home/sfh/software/jdk1.6.0_37是jdk的安装目录&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ java -version
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;运行后发现java环境设置成功&lt;/p&gt;

&lt;p&gt;其次，设置java环境&lt;/p&gt;

&lt;p&gt;编辑/etc/profile文件，添加如下：&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#set java environment  
export JAVA_HOME=/home/sfh/software/jdk1.6.0_37  
export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/lib 
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;hr /&gt;

&lt;ul&gt;
&lt;li&gt;Linux: 设置Oracle JDK环境&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>Linux: 安装WireShark问题</title>
   <link href="http://ckrissun.github.io/2012/11/26/linux-install-wireshark"/>
   <updated>2012-11-26T14:39:00-08:00</updated>
   <id>http://ckrissun.github.io/2012/11/26/linux-install-wireshark</id>
   <content type="html">&lt;p&gt;由于项目需要调试网络数据帧，一个开源的好工具是wireshark。在Debian系统下安装wireshark（具体怎么安装就不介绍了）后，打开wireshark文件发现，没有一个网络接口可供操作的，这是肿么回事？&lt;/p&gt;

&lt;p&gt;在linux终端下尝试使用sudo来运行wireshark，这才发现，wireshark需要根用户权限才能使用。但话说回来，每次使用这wireshark工具，都用在终端下敲下&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;sudo wireshark 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;着实有些麻烦，本人一向比较懒，直接点击wireshark图标打开文件，岂不快哉？
在google大神的帮助下，终于找到解决方案:&lt;/p&gt;

&lt;p&gt;参考网址: &lt;a href=&quot;http://ask.wireshark.org/questions/7976/wireshark-setup-linux-for-nonroot-user&quot;&gt;http://ask.wireshark.org/questions/7976/wireshark-setup-linux-for-nonroot-user&lt;/a&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo dpkg-reconfigure wireshark-common   
$ sudo usermod -a -G wireshark $USER  
$ gnome-session-quit --logout --no-prompt
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;hr /&gt;

&lt;ul&gt;
&lt;li&gt;Linux: 安装Wireshark问题&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>Linux: 使用RT-Thread构建嵌入式应用</title>
   <link href="http://ckrissun.github.io/2012/11/26/linux-build-rtthread"/>
   <updated>2012-11-26T14:19:00-08:00</updated>
   <id>http://ckrissun.github.io/2012/11/26/linux-build-rtthread</id>
   <content type="html">&lt;p&gt;本文主要介绍如何在Linux环境使用国人开发的嵌入式实时操作系统RT-Thread构建嵌入式应用。&lt;/p&gt;

&lt;h3&gt;主要环境配置&lt;/h3&gt;

&lt;hr /&gt;

&lt;ul&gt;
&lt;li&gt;主机系统：Debian wheezy 32bit&lt;/li&gt;
&lt;li&gt;交叉编译工具：sourcery g++ lite-2012.09&lt;/li&gt;
&lt;li&gt;项目构建工具：scons&lt;/li&gt;
&lt;li&gt;RT-Thread版本：RT-Thread V1.0.3&lt;/li&gt;
&lt;li&gt;开发板：自制STM32F103ZET6开发板&lt;/li&gt;
&lt;li&gt;调试器：JLink&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;工程构建说明&lt;/h3&gt;

&lt;hr /&gt;

&lt;p&gt;在自制的STM32F103ZET6开发板上，基于RT-Thread自带的BSP—stm32f10x构建一个示例工程test，本工程仅仅是一个示例，意在介绍如何在Linux环境使用RT-Thread以及scons构建工具建立嵌入式应用，开发实际项目进行相应修改及扩展即可。&lt;/p&gt;

&lt;p&gt;将RT-Thread源码解压到工程目录test中;&lt;/p&gt;

&lt;p&gt;在test工程目录中建立应用程序目录apps，此时test工程目录是:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;+ apps
+ bsp
+ componets
+ documents
+ examples
+ include
+ libcpu
+ src
+ tools
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;在apps目录中建立test.c文件，在其中添加代码（假定是一个流水灯的任务代码）后保存;&lt;/p&gt;

&lt;p&gt;RT-Thread使用scons工具来进行项目工程构建，RT-Thread中scons的使用可以参照&lt;a href=&quot;http://www.rt-thread.org/dokuwiki/doku.php?id=rt-thread%E4%B8%AD%E7%9A%84scons%E4%BD%BF%E7%94%A8%E8%AF%A6%E8%A7%A3&quot;&gt;《RT-Thread中的SCons使用详解》&lt;/a&gt;，本文不做介绍。需要在apps目录下建立scons编译脚本文件SConscript（实际上是一段Python程序），告诉scons需要编译哪些文件。示例中apps目录下仅有一个文件test.c，因此SConscript文件内容如下:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Import('RTT_ROOT')
from building import *

src = Split(&quot;&quot;&quot;
test.c
&quot;&quot;&quot;)

#The set of source files associated with this SConscript file.
path = [GetCurrentDir()]
group = DefineGroup('Apps', src, depend = [''], CPPPATH = path)
Return('group')
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;在linux终端中，进入到目录bsp/stm32f10x中，执行scons，完成后发现apps目录中的文件并没有编译;&lt;/p&gt;

&lt;p&gt;为了能够编译apps目录下的内容，需要修改bsp/stm32f10x目录中的SConstruct文件，在适当的位置添加如下内容:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;#Application
objs = objs + SConscript(RTT_ROOT + '/apps/SConscript', variant_dir='build/apps', duplicate=0)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;这句脚本告诉scons，编译apps目录下的代码并添加到二进制目标文件中，且由apps目录下的SConscript指定编译哪些文件;&lt;/p&gt;

&lt;p&gt;再次执行scons，这时候可以看到，apps目录的代码已经被编译;
说明：若要查看apps下的代码有没有被编译，可以查看bsp/stm32f10x/build目录下，有没有apps目录，以及该目录有没有相应的.o文件;&lt;/p&gt;

&lt;p&gt;代码烧录到开发板中，操作说明请参照&lt;a href=&quot;http://www.rt-thread.org/dokuwiki/doku.php?id=linux%E4%B8%8B%E9%80%9A%E8%BF%87jlink%E7%83%A7%E5%86%99rt-thread&quot;&gt;《Linux下通过Jlink烧写RT-Thread》&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;如何使用scons构建工程项目，请参照&lt;a href=&quot;http://www.rt-thread.org/dokuwiki/doku.php?id=rt-thread%E4%B8%AD%E7%9A%84scons%E4%BD%BF%E7%94%A8%E8%AF%A6%E8%A7%A3&quot;&gt;《RT-Thread中的SCons使用详解》&lt;/a&gt;以及&lt;a href=&quot;http://www.scons.org/documentation.php&quot;&gt;scons官方文档&lt;/a&gt;。&lt;/p&gt;

&lt;h3&gt;TO-DO&lt;/h3&gt;

&lt;hr /&gt;

&lt;ul&gt;
&lt;li&gt;Linux: 使用RT-Thread构建嵌入式应用&lt;/li&gt;
&lt;/ul&gt;

</content>
 </entry>
 
 <entry>
   <title>Jekyll Introduction</title>
   <link href="http://ckrissun.github.io/2011/12/29/jekyll-introduction"/>
   <updated>2011-12-29T00:00:00-08:00</updated>
   <id>http://ckrissun.github.io/2011/12/29/jekyll-introduction</id>
   <content type="html">&lt;p&gt;This Jekyll introduction will outline specifically  what Jekyll is and why you would want to use it.
Directly following the intro we'll learn exactly &lt;em&gt;how&lt;/em&gt; Jekyll does what it does.&lt;/p&gt;

&lt;h2&gt;Overview&lt;/h2&gt;

&lt;h3&gt;What is Jekyll?&lt;/h3&gt;

&lt;p&gt;Jekyll is a parsing engine bundled as a ruby gem used to build static websites from
dynamic components such as templates, partials, liquid code, markdown, etc. Jekyll is known as &quot;a simple, blog aware, static site generator&quot;.&lt;/p&gt;

&lt;h3&gt;Examples&lt;/h3&gt;

&lt;p&gt;This website is created with Jekyll. &lt;a href=&quot;https://github.com/mojombo/jekyll/wiki/Sites&quot;&gt;Other Jekyll websites&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;What does Jekyll Do?&lt;/h3&gt;

&lt;p&gt;Jekyll is a ruby gem you install on your local system.
Once there you can call &lt;code&gt;jekyll --server&lt;/code&gt; on a directory and provided that directory
is setup in a way jekyll expects, it will do magic stuff like parse markdown/textile files,
compute categories, tags, permalinks, and construct your pages from layout templates and partials.&lt;/p&gt;

&lt;p&gt;Once parsed, Jekyll stores the result in a self-contained static &lt;code&gt;_site&lt;/code&gt; folder.
The intention here is that you can serve all contents in this folder statically from a plain static web-server.&lt;/p&gt;

&lt;p&gt;You can think of Jekyll as a normalish dynamic blog but rather than parsing content, templates, and tags
on each request, Jekyll does this once &lt;em&gt;beforehand&lt;/em&gt; and caches the &lt;em&gt;entire website&lt;/em&gt; in a folder for serving statically.&lt;/p&gt;

&lt;h3&gt;Jekyll is Not Blogging Software&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Jekyll is a parsing engine.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Jekyll does not come with any content nor does it have any templates or design elements.
This is a common source of confusion when getting started.
Jekyll does not come with anything you actually use or see on your website - you have to make it.&lt;/p&gt;

&lt;h3&gt;Why Should I Care?&lt;/h3&gt;

&lt;p&gt;Jekyll is very minimalistic and very efficient.
The most important thing to realize about Jekyll is that it creates a static representation of your website requiring only a static web-server.
Traditional dynamic blogs like Wordpress require a database and server-side code.
Heavily trafficked dynamic blogs must employ a caching layer that ultimately performs the same job Jekyll sets out to do; serve static content.&lt;/p&gt;

&lt;p&gt;Therefore if you like to keep things simple and you prefer the command-line over an admin panel UI then give Jekyll a try.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Developers like Jekyll because we can write content like we write code:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ability to write content in markdown or textile in your favorite text-editor.&lt;/li&gt;
&lt;li&gt;Ability to write and preview your content via localhost.&lt;/li&gt;
&lt;li&gt;No internet connection required.&lt;/li&gt;
&lt;li&gt;Ability to publish via git.&lt;/li&gt;
&lt;li&gt;Ability to host your blog on a static web-server.&lt;/li&gt;
&lt;li&gt;Ability to host freely on GitHub Pages.&lt;/li&gt;
&lt;li&gt;No database required.&lt;/li&gt;
&lt;/ul&gt;


&lt;h1&gt;How Jekyll Works&lt;/h1&gt;

&lt;p&gt;The following is a complete but concise outline of exactly how Jekyll works.&lt;/p&gt;

&lt;p&gt;Be aware that core concepts are introduced in rapid succession without code examples.
This information is not intended to specifically teach you how to do anything, rather it
is intended to give you the &lt;em&gt;full picture&lt;/em&gt; relative to what is going on in Jekyll-world.&lt;/p&gt;

&lt;p&gt;Learning these core concepts should help you avoid common frustrations and ultimately
help you better understand the code examples contained throughout Jekyll-Bootstrap.&lt;/p&gt;

&lt;h2&gt;Initial Setup&lt;/h2&gt;

&lt;p&gt;After &lt;a href=&quot;/index.html#start-now&quot;&gt;installing jekyll&lt;/a&gt; you'll need to format your website directory in a way jekyll expects.
Jekyll-bootstrap conveniently provides the base directory format.&lt;/p&gt;

&lt;h3&gt;The Jekyll Application Base Format&lt;/h3&gt;

&lt;p&gt;Jekyll expects your website directory to be laid out like so:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;.
|-- _config.yml
|-- _includes
|-- _layouts
|   |-- default.html
|   |-- post.html
|-- _posts
|   |-- 2011-10-25-open-source-is-good.markdown
|   |-- 2011-04-26-hello-world.markdown
|-- _site
|-- index.html
|-- assets
    |-- css
        |-- style.css
    |-- javascripts
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;_config.yml&lt;/strong&gt;&lt;br/&gt;
  Stores configuration data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;_includes&lt;/strong&gt;&lt;br/&gt;
  This folder is for partial views.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;_layouts&lt;/strong&gt; &lt;br/&gt;
  This folder is for the main templates your content will be inserted into.
  You can have different layouts for different pages or page sections.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;_posts&lt;/strong&gt;&lt;br/&gt;
  This folder contains your dynamic content/posts.
  the naming format is required to be &lt;code&gt;@YEAR-MONTH-DATE-title.MARKUP@&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;_site&lt;/strong&gt;&lt;br/&gt;
  This is where the generated site will be placed once Jekyll is done transforming it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;assets&lt;/strong&gt;&lt;br/&gt;
  This folder is not part of the standard jekyll structure.
  The assets folder represents &lt;em&gt;any generic&lt;/em&gt; folder you happen to create in your root directory.
  Directories and files not properly formatted for jekyll will be left untouched for you to serve normally.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;(read more: &lt;a href=&quot;https://github.com/mojombo/jekyll/wiki/Usage&quot;&gt;https://github.com/mojombo/jekyll/wiki/Usage&lt;/a&gt;)&lt;/p&gt;

&lt;h3&gt;Jekyll Configuration&lt;/h3&gt;

&lt;p&gt;Jekyll supports various configuration options that are fully outlined here:
&lt;a href=&quot;https://github.com/mojombo/jekyll/wiki/Configuration&quot;&gt;https://github.com/mojombo/jekyll/wiki/Configuration&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Content in Jekyll&lt;/h2&gt;

&lt;p&gt;Content in Jekyll is either a post or a page.
These content &quot;objects&quot; get inserted into one or more templates to build the final output for its respective static-page.&lt;/p&gt;

&lt;h3&gt;Posts and Pages&lt;/h3&gt;

&lt;p&gt;Both posts and pages should be written in markdown, textile, or HTML and may also contain Liquid templating syntax.
Both posts and pages can have meta-data assigned on a per-page basis such as title, url path, as well as arbitrary custom meta-data.&lt;/p&gt;

&lt;h3&gt;Working With Posts&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Creating a Post&lt;/strong&gt; &lt;br/&gt;
Posts are created by properly formatting a file and placing it the &lt;code&gt;_posts&lt;/code&gt; folder.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Formatting&lt;/strong&gt;&lt;br/&gt;
A post must have a valid filename in the form &lt;code&gt;YEAR-MONTH-DATE-title.MARKUP&lt;/code&gt; and be placed in the &lt;code&gt;_posts&lt;/code&gt; directory.
If the data format is invalid Jekyll will not recognize the file as a post. The date and title are automatically parsed from the filename of the post file.
Additionally, each file must have &lt;a href=&quot;https://github.com/mojombo/jekyll/wiki/YAML-Front-Matter&quot;&gt;YAML Front-Matter&lt;/a&gt; prepended to its content.
YAML Front-Matter is a valid YAML syntax specifying meta-data for the given file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Order&lt;/strong&gt;&lt;br/&gt;
Ordering is an important part of Jekyll but it is hard to specify a custom ordering strategy.
Only reverse chronological and chronological ordering is supported in Jekyll.&lt;/p&gt;

&lt;p&gt;Since the date is hard-coded into the filename format, to change the order, you must change the dates in the filenames.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tags&lt;/strong&gt; &lt;br/&gt;
Posts can have tags associated with them as part of their meta-data.
Tags may be placed on posts by providing them in the post's YAML front matter.
You have access to the post-specific tags in the templates. These tags also get added to the sitewide collection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Categories&lt;/strong&gt; &lt;br/&gt;
Posts may be categorized by providing one or more categories in the YAML front matter.
Categories offer more significance over tags in that they can be reflected in the URL path to the given post.
Note categories in Jekyll work in a specific way.
If you define more than one category you are defining a category hierarchy &quot;set&quot;.
Example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;---
title :  Hello World
categories : [lessons, beginner]
---
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This defines the category hierarchy &quot;lessons/beginner&quot;. Note this is &lt;em&gt;one category&lt;/em&gt; node in Jekyll.
You won't find &quot;lessons&quot; and &quot;beginner&quot; as two separate categories unless you define them elsewhere as singular categories.&lt;/p&gt;

&lt;h3&gt;Working With Pages&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Creating a Page&lt;/strong&gt;&lt;br/&gt;
Pages are created by properly formatting a file and placing it anywhere in the root directory or subdirectories that do &lt;em&gt;not&lt;/em&gt; start with an underscore.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Formatting&lt;/strong&gt;&lt;br/&gt;
In order to register as a Jekyll page the file must contain &lt;a href=&quot;https://github.com/mojombo/jekyll/wiki/YAML-Front-Matter&quot;&gt;YAML Front-Matter&lt;/a&gt;.
Registering a page means 1) that Jekyll will process the page and 2) that the page object will be available in the &lt;code&gt;site.pages&lt;/code&gt; array for inclusion into your templates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Categories and Tags&lt;/strong&gt;&lt;br/&gt;
Pages do not compute categories nor tags so defining them will have no effect.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sub-Directories&lt;/strong&gt;&lt;br/&gt;
If pages are defined in sub-directories, the path to the page will be reflected in the url.
Example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;.
|-- people
    |-- bob
        |-- essay.html
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This page will be available at &lt;code&gt;http://yourdomain.com/people/bob/essay.html&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Recommended Pages&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;index.html&lt;/strong&gt;&lt;br/&gt;
You will always want to define the root index.html page as this will display on your root URL.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;404.html&lt;/strong&gt;&lt;br/&gt;
Create a root 404.html page and GitHub Pages will serve it as your 404 response.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;sitemap.html&lt;/strong&gt;&lt;br/&gt;
Generating a sitemap is good practice for SEO.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;about.html&lt;/strong&gt;&lt;br/&gt;
A nice about page is easy to do and gives the human perspective to your website.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;Templates in Jekyll&lt;/h2&gt;

&lt;p&gt;Templates are used to contain a page's or post's content.
All templates have access to a global site object variable: &lt;code&gt;site&lt;/code&gt; as well as a page object variable: &lt;code&gt;page&lt;/code&gt;.
The site variable holds all accessible content and metadata relative to the site.
The page variable holds accessible data for the given page or post being rendered at that point.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create a Template&lt;/strong&gt;&lt;br/&gt;
Templates are created by properly formatting a file and placing it in the &lt;code&gt;_layouts&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Formatting&lt;/strong&gt;&lt;br/&gt;
Templates should be coded in HTML and contain YAML Front Matter.
All templates can contain Liquid code to work with your site's data.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rending Page/Post Content in a Template&lt;/strong&gt;&lt;br/&gt;
There is a special variable in all templates named : &lt;code&gt;content&lt;/code&gt;.
The &lt;code&gt;content&lt;/code&gt; variable holds the page/post content including any sub-template content previously defined.
Render the content variable wherever you want your main content to be injected into your template:&lt;/p&gt;

&lt;p&gt;  &lt;pre&gt;&lt;code&gt;...
&amp;lt;body&amp;gt;
  &amp;lt;div id=&quot;sidebar&quot;&amp;gt; ... &amp;lt;/div&amp;gt;
  &amp;lt;div id=&quot;main&quot;&amp;gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;amp;#123;{content}&amp;amp;#125;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;  &amp;lt;/div&amp;gt;
&amp;lt;/body&amp;gt;
...&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;

&lt;h3&gt;Sub-Templates&lt;/h3&gt;

&lt;p&gt;Sub-templates are exactly templates with the only difference being they
define another &quot;root&quot; layout/template within their YAML Front Matter.
This essentially means a template will render inside of another template.&lt;/p&gt;

&lt;h3&gt;Includes&lt;/h3&gt;

&lt;p&gt;In Jekyll you can define include files by placing them in the &lt;code&gt;_includes&lt;/code&gt; folder.
Includes are NOT templates, rather they are just code snippets that get included into templates.
In this way, you can treat the code inside includes as if it was native to the parent template.&lt;/p&gt;

&lt;p&gt;Any valid template code may be used in includes.&lt;/p&gt;

&lt;h2&gt;Using Liquid for Templating&lt;/h2&gt;

&lt;p&gt;Templating is perhaps the most confusing and frustrating part of Jekyll.
This is mainly due to the fact that Jekyll templates must use the Liquid Templating Language.&lt;/p&gt;

&lt;h3&gt;What is Liquid?&lt;/h3&gt;

&lt;p&gt;&lt;a href=&quot;https://github.com/Shopify/liquid&quot;&gt;Liquid&lt;/a&gt; is a secure templating language developed by &lt;a href=&quot;http://shopify.com&quot;&gt;Shopify&lt;/a&gt;.
Liquid is designed for end-users to be able to execute logic within template files
without imposing any security risk on the hosting server.&lt;/p&gt;

&lt;p&gt;Jekyll uses Liquid to generate the post content within the final page layout structure and as the primary interface for working with
your site and post/page data.&lt;/p&gt;

&lt;h3&gt;Why Do We Have to Use Liquid?&lt;/h3&gt;

&lt;p&gt;GitHub uses Jekyll to power &lt;a href=&quot;http://pages.github.com/&quot;&gt;GitHub Pages&lt;/a&gt;.
GitHub cannot afford to run arbitrary code on their servers so they lock developers down via Liquid.&lt;/p&gt;

&lt;h3&gt;Liquid is Not Programmer-Friendly.&lt;/h3&gt;

&lt;p&gt;The short story is liquid is not real code and its not intended to execute real code.
The point being you can't do jackshit in liquid that hasn't been allowed explicitly by the implementation.
What's more you can only access data-structures that have been explicitly passed to the template.&lt;/p&gt;

&lt;p&gt;In Jekyll's case it is not possible to alter what is passed to Liquid without hacking the gem or running custom plugins.
Both of which cannot be supported by GitHub Pages.&lt;/p&gt;

&lt;p&gt;As a programmer - this is very frustrating.&lt;/p&gt;

&lt;p&gt;But rather than look a gift horse in the mouth we are going to
suck it up and view it as an opportunity to work around limitations and adopt client-side solutions when possible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Aside&lt;/strong&gt; &lt;br/&gt;
My personal stance is to not invest time trying to hack liquid. It's really unnecessary
&lt;em&gt;from a programmer's&lt;/em&gt; perspective. That is to say if you have the ability to run custom plugins (i.e. run arbitrary ruby code)
you are better off sticking with ruby. Toward that end I've built &lt;a href=&quot;http://github.com/plusjade/mustache-with-jekyll&quot;&gt;Mustache-with-Jekyll&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Static Assets&lt;/h2&gt;

&lt;p&gt;Static assets are any file in the root or non-underscored subfolders that are not pages.
That is they have no valid YAML Front Matter and are thus not treated as Jekyll Pages.&lt;/p&gt;

&lt;p&gt;Static assets should be used for images, css, and javascript files.&lt;/p&gt;

&lt;h2&gt;How Jekyll Parses Files&lt;/h2&gt;

&lt;p&gt;Remember Jekyll is a processing engine. There are two main types of parsing in Jekyll.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Content parsing.&lt;/strong&gt; &lt;br/&gt;
  This is done with textile or markdown.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Template parsing.&lt;/strong&gt; &lt;br/&gt;
This is done with the liquid templating language.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;And thus there are two main types of file formats needed for this parsing.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Post and Page files.&lt;/strong&gt;&lt;br/&gt;
All content in Jekyll is either a post or a page so valid posts and pages are parsed with markdown or textile.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Template files.&lt;/strong&gt;  &lt;br/&gt;
  These files go in &lt;code&gt;_layouts&lt;/code&gt; folder and contain your blogs &lt;strong&gt;templates&lt;/strong&gt;. They should be made in HTML with the help of Liquid syntax.
  Since include files are simply injected into templates they are essentially parsed as if they were native to the template.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;strong&gt;Arbitrary files and folders.&lt;/strong&gt; &lt;br/&gt;
Files that &lt;em&gt;are not&lt;/em&gt; valid pages are treated as static content and pass through
Jekyll untouched and reside on your blog in the exact structure and format they originally existed in.&lt;/p&gt;

&lt;h3&gt;Formatting Files for Parsing.&lt;/h3&gt;

&lt;p&gt;We've outlined the need for valid formatting using &lt;strong&gt;YAML Front Matter&lt;/strong&gt;.
Templates, posts, and pages all need to provide valid YAML Front Matter even if the Matter is empty.
This is the only way Jekyll knows you want the file processed.&lt;/p&gt;

&lt;p&gt;YAML Front Matter must be prepended to the top of template/post/page files:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;---
layout: post
category : pages
tags : [how-to, jekyll]
---

... contents ...
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Three hyphens on a new line start the Front-Matter block and three hyphens on a new line end the block.
The data inside the block must be valid YAML.&lt;/p&gt;

&lt;p&gt;Configuration parameters for YAML Front-Matter is outlined here:
&lt;a href=&quot;https://github.com/mojombo/jekyll/wiki/YAML-Front-Matter&quot;&gt;A comprehensive explanation of YAML Front Matter&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;Defining Layouts for Posts and Templates Parsing.&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;layout&lt;/code&gt; parameter in the YAML Front Matter defines the template file for which the given post or template should be injected into.
If a template file specifies its own layout, it is effectively being used as a &lt;code&gt;sub-template.&lt;/code&gt;
That is to say loading a post file into a template file that refers to another template file with work in the way you'd expect; as a nested sub-template.&lt;/p&gt;

&lt;h2&gt;How Jekyll Generates the Final Static Files.&lt;/h2&gt;

&lt;p&gt;Ultimately, Jekyll's job is to generate a static representation of your website.
The following is an outline of how that's done:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Jekyll collects data.&lt;/strong&gt; &lt;br/&gt;
Jekyll scans the posts directory and collects all posts files as post objects. It then scans the layout assets and collects those and finally scans other directories in search of pages.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Jekyll computes data.&lt;/strong&gt; &lt;br/&gt;
Jekyll takes these objects, computes metadata (permalinks, tags, categories, titles, dates) from them and constructs one
big &lt;code&gt;site&lt;/code&gt; object that holds all the posts, pages, layouts, and respective metadata.
At this stage your site is one big computed ruby object.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Jekyll liquifies posts and templates.&lt;/strong&gt;&lt;br/&gt;
Next jekyll loops through each post file and converts (through markdown or textile) and &lt;strong&gt;liquifies&lt;/strong&gt; the post inside of its respective layout(s).
Once the post is parsed and liquified inside the the proper layout structure, the layout itself is &quot;liquified&quot;. &lt;br/&gt;
 &lt;strong&gt;Liquification&lt;/strong&gt; is defined as follows: Jekyll initiates a Liquid template, and passes a simpler hash representation of the ruby site object as well as a simpler
hash representation of the ruby post object. These simplified data structures are what you have access to in the templates.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Jekyll generates output.&lt;/strong&gt; &lt;br/&gt;
 Finally the liquid templates are &quot;rendered&quot;, thereby processing any liquid syntax provided in the templates
 and saving the final, static representation of the file.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;&lt;strong&gt;Notes.&lt;/strong&gt;&lt;br/&gt;
Because Jekyll computes the entire site in one fell swoop, each template is given access to
a global &lt;code&gt;site&lt;/code&gt; hash that contains useful data. It is this data that you'll iterate through and format
using the Liquid tags and filters in order to render it onto a given page.&lt;/p&gt;

&lt;p&gt;Remember, in Jekyll you are an end-user. Your API has only two components:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The manner in which you setup your directory.&lt;/li&gt;
&lt;li&gt;The liquid syntax and variables passed into the liquid templates.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;All the data objects available to you in the templates via Liquid are outlined in the &lt;strong&gt;API Section&lt;/strong&gt; of Jekyll-Bootstrap.
You can also read the original documentation here: &lt;a href=&quot;https://github.com/mojombo/jekyll/wiki/Template-Data&quot;&gt;https://github.com/mojombo/jekyll/wiki/Template-Data&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;I hope this paints a clearer picture of what Jekyll is doing and why it works the way it does.
As noted, our main programming constraint is the fact that our API is limited to what is accessible via Liquid and Liquid only.&lt;/p&gt;

&lt;p&gt;Jekyll-bootstrap is intended to provide helper methods and strategies aimed at making it more intuitive and easier to work with Jekyll =)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thank you&lt;/strong&gt; for reading this far.&lt;/p&gt;

&lt;h2&gt;Next Steps&lt;/h2&gt;

&lt;p&gt;Please take a look at &lt;a href=&quot;&quot;&gt;&lt;/a&gt;
or jump right into &lt;a href=&quot;&quot;&gt;Usage&lt;/a&gt; if you'd like.&lt;/p&gt;
</content>
 </entry>
 
 
</feed>