-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
410 lines (265 loc) · 16.4 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
<!DOCTYPE html>
<!--[if IEMobile 7 ]><html class="no-js iem7"><![endif]-->
<!--[if lt IE 9]><html class="no-js lte-ie8"><![endif]-->
<!--[if (gt IE 8)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<title>A Dreamer, a Writer</title>
<meta name="author" content="Shuo Yang">
<meta name="description" content="Prerequisite: Install Vundle Vundle is short for Vim Bundle, which is a plug-in manager for vim. If you want to use it for plug-in management, and …">
<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="http://syang.github.io">
<link href="/favicon.png" rel="icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<link href="/atom.xml" rel="alternate" title="A Dreamer, a Writer" type="application/atom+xml">
<script src="/javascripts/modernizr-2.0.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>!window.jQuery && document.write(unescape('%3Cscript src="./javascripts/libs/jquery.min.js"%3E%3C/script%3E'))</script>
<script src="/javascripts/octopress.js" type="text/javascript"></script>
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
<link href="http://fonts.googleapis.com/css?family=PT+Serif:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-2802378-9']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body >
<header role="banner"><hgroup>
<h1><a href="/">A Dreamer, a Writer</a></h1>
<h2>BigData Infrastructure, Cloud Computing, Devops Reflection</h2>
</hgroup>
</header>
<nav role="navigation"><ul class="subscription" data-subscription="rss">
<li><a href="/atom.xml" rel="subscribe-rss" title="subscribe via RSS">RSS</a></li>
</ul>
<form action="http://google.com/search" method="get">
<fieldset role="search">
<input type="hidden" name="q" value="site:syang.github.io" />
<input class="search" type="text" name="q" results="0" placeholder="Search"/>
</fieldset>
</form>
<ul class="main-navigation">
<li><a href="/">Blog</a></li>
<li><a href="/blog/archives">Archives</a></li>
<li><a href="/reading-list">Reading List</a></li>
<li><a href="/about">About</a></li>
</ul>
</nav>
<div id="main">
<div id="content">
<div class="blog-index">
<article>
<header>
<h1 class="entry-title"><a href="/blog/2014/03/11/vim-setup-for-ansible/">Vim Setup for Ansible</a></h1>
<p class="meta">
<time datetime="2014-03-11T16:27:55-07:00" pubdate data-updated="true">Mar 11<span>th</span>, 2014</time>
| <a href="/blog/2014/03/11/vim-setup-for-ansible/#disqus_thread"
data-disqus-identifier="http://syang.github.io/blog/2014/03/11/vim-setup-for-ansible/">Comments</a>
</p>
</header>
<div class="entry-content"><h3>Prerequisite: Install Vundle</h3>
<p><a href="https://github.com/gmarik/Vundle.vim">Vundle</a> is short for <em>Vim Bundle</em>, which is a plug-in manager for vim. If you want to use it for plug-in management, and read on.</p>
<p>Suppose you have already installed <a href="http://git-scm.com/book/en/Getting-Started-Installing-Git">Git</a>, set up Vundle from the source</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='sh'><span class='line'><span class="nv">$ </span>git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
</span></code></pre></td></tr></table></div></figure>
<h3>Configure the Ansible Bundle in your personal .vimrc</h3>
<p>Put the following at the top of your ~/.vimrc</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
<span class='line-number'>6</span>
<span class='line-number'>7</span>
<span class='line-number'>8</span>
<span class='line-number'>9</span>
<span class='line-number'>10</span>
<span class='line-number'>11</span>
<span class='line-number'>12</span>
<span class='line-number'>13</span>
<span class='line-number'>14</span>
<span class='line-number'>15</span>
<span class='line-number'>16</span>
<span class='line-number'>17</span>
<span class='line-number'>18</span>
<span class='line-number'>19</span>
<span class='line-number'>20</span>
<span class='line-number'>21</span>
<span class='line-number'>22</span>
<span class='line-number'>23</span>
<span class='line-number'>24</span>
<span class='line-number'>25</span>
<span class='line-number'>26</span>
<span class='line-number'>27</span>
<span class='line-number'>28</span>
<span class='line-number'>29</span>
<span class='line-number'>30</span>
<span class='line-number'>31</span>
<span class='line-number'>32</span>
<span class='line-number'>33</span>
<span class='line-number'>34</span>
<span class='line-number'>35</span>
<span class='line-number'>36</span>
<span class='line-number'>37</span>
</pre></td><td class='code'><pre><code class='sh'><span class='line'><span class="nb">set </span>nocompatible <span class="s2">" be iMproved, required</span>
</span><span class='line'><span class="s2">filetype off "</span> required
</span><span class='line'>
</span><span class='line'><span class="s2">" set the runtime path to include Vundle and initialize</span>
</span><span class='line'><span class="s2">set rtp+=~/.vim/bundle/vundle/</span>
</span><span class='line'><span class="s2">call vundle#rc()</span>
</span><span class='line'><span class="s2">"</span> alternatively, pass a path where Vundle should install bundles
</span><span class='line'><span class="s2">"let path = '~/some/path/here'</span>
</span><span class='line'><span class="s2">"</span>call vundle#rc<span class="o">(</span>path<span class="o">)</span>
</span><span class='line'>
</span><span class='line'><span class="s2">" let Vundle manage Vundle, required</span>
</span><span class='line'><span class="s2">Bundle 'gmarik/vundle'</span>
</span><span class='line'>
</span><span class='line'><span class="s2">"</span> Keep bundle commands between here and filetype plugin indent on.
</span><span class='line'><span class="s2">" For Ansible formatting</span>
</span><span class='line'><span class="s2">Bundle 'chase/vim-ansible-yaml'</span>
</span><span class='line'><span class="s2">"</span> For Go Language formatting
</span><span class='line'>Bundle <span class="s1">'jnwhiteh/vim-golang'</span>
</span><span class='line'><span class="s2">" For HTML/CSS formatting</span>
</span><span class='line'><span class="s2">Bundle 'mattn/emmet-vim'</span>
</span><span class='line'><span class="s2">"</span> For Chef script formatting
</span><span class='line'>Bundle <span class="s1">'t9md/vim-chef'</span>
</span><span class='line'>
</span><span class='line'>filetype plugin indent on <span class="s2">" required</span>
</span><span class='line'>
</span><span class='line'><span class="s2">"</span> To ignore plugin indent changes, instead use:
</span><span class='line'><span class="s2">"filetype plugin on</span>
</span><span class='line'><span class="s2">"</span>
</span><span class='line'><span class="s2">" Brief help</span>
</span><span class='line'><span class="s2">"</span> :BundleList - list configured bundles
</span><span class='line'><span class="s2">" :BundleInstall(!) - install (update) bundles</span>
</span><span class='line'><span class="s2">"</span> :BundleSearch<span class="o">(</span>!<span class="o">)</span> foo - search <span class="o">(</span>or refresh cache first<span class="o">)</span> <span class="k">for </span>foo
</span><span class='line'><span class="s2">" :BundleClean(!) - confirm (or auto-approve) removal of unused bundles</span>
</span><span class='line'><span class="s2">"</span>
</span><span class='line'><span class="s2">" see :h vundle for more details or wiki for FAQ</span>
</span><span class='line'><span class="s2">"</span> NOTE: comments after Bundle commands are not allowed.
</span><span class='line'><span class="err">"</span> Put your stuff after this line
</span></code></pre></td></tr></table></div></figure>
<h3>Install Bundles:</h3>
<p>Lauch <code>vim</code> and run <code>:BundleInstall</code> OR install directly from command line: <code>vim +BundleInstall +qall</code></p>
</div>
</article>
<article>
<header>
<h1 class="entry-title"><a href="/blog/2014/02/25/getting-started-on-octopress/">Getting Started on Octopress</a></h1>
<p class="meta">
<time datetime="2014-02-25T16:10:44-08:00" pubdate data-updated="true">Feb 25<span>th</span>, 2014</time>
| <a href="/blog/2014/02/25/getting-started-on-octopress/#disqus_thread"
data-disqus-identifier="http://syang.github.io/blog/2014/02/25/getting-started-on-octopress/">Comments</a>
</p>
</header>
<div class="entry-content"><p>Octopress is a blogging engine built on top of Jekyll, and its documentation can be found at <a href="http://octopress.org/docs/,">http://octopress.org/docs/,</a> but here is a quick
summary of how to use it along with github pages.</p>
<h2>Github User pages</h2>
<p>As how this blog is hosted, Github can help you host a blog from <code>http://username.github.com</code>.</p>
<p>You need to first setup a user account <code>username</code>, and then you need to create a repo as<code>http://www.github.com/username/username.github.com</code>.</p>
<h2>Setup your blog configuration with Rake (One time work)</h2>
<p>Octopress provides a configuration task that helps you set up all config related to your blog using the following command.</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='sh'><span class='line'>rake setup_github_pages
</span></code></pre></td></tr></table></div></figure>
<p>Copy the SSH or HTTPS URL from your newly created repository (e.g. <code>[email protected]:username/username.github.io.git</code>)
and paste it in as a response.</p>
<h2>Write your blog posts</h2>
<p>You need to run the following command to create a new blog entry.</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='sh'><span class='line'>rake new_post<span class="o">[</span><span class="s2">"title"</span><span class="o">]</span>
</span></code></pre></td></tr></table></div></figure>
<p>And you can use your favorite editor to edit the blog post content.</p>
<p>Moreover, you can <strong> Specify the page name and location </strong>
You can add pages anywhere in your blog source directory and they’ll be parsed by Jekyll. The URL will correspond directly to the filepath, so <code>about.markdown</code> will become <code>site.com/about.html</code>. If you prefer the URL <code>site.com/about/</code> you’ll want to create the page as <code>about/index.markdown</code>. Octopress has a rake task for creating new pages easily.</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
<span class='line-number'>5</span>
</pre></td><td class='code'><pre><code class='sh'><span class='line'>rake new_page<span class="o">[</span>super-awesome<span class="o">]</span>
</span><span class='line'><span class="c"># creates /source/super-awesome/index.markdown</span>
</span><span class='line'>
</span><span class='line'>rake new_page<span class="o">[</span>super-awesome/page.html<span class="o">]</span>
</span><span class='line'><span class="c"># creates /source/super-awesome/page.html</span>
</span></code></pre></td></tr></table></div></figure>
<h2>Generate and Preview Site</h2>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class='sh'><span class='line'>rake generate <span class="c"># Generates posts and pages into the public directory</span>
</span><span class='line'>rake watch <span class="c"># Watches source/ and sass/ for changes and regenerates</span>
</span><span class='line'>rake preview <span class="c"># Watches, and mounts a webserver at http://localhost:4000</span>
</span></code></pre></td></tr></table></div></figure>
<h2>Last, Push to Github to Publish</h2>
<p>Publish the comment by the following, which push the generated site to <code>master</code> branch</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
</pre></td><td class='code'><pre><code class='sh'><span class='line'>rake generate
</span><span class='line'>rake deploy
</span></code></pre></td></tr></table></div></figure>
<p>Do not forget to push the <code>source</code> branch</p>
<figure class='code'><figcaption><span></span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class='sh'><span class='line'>git add .
</span><span class='line'>git commit -m <span class="s1">'your message'</span>
</span><span class='line'>git push origin <span class="nb">source</span>
</span></code></pre></td></tr></table></div></figure>
</div>
</article>
<div class="pagination">
<a href="/blog/archives">Blog Archives</a>
</div>
</div>
<aside class="sidebar">
<section>
<h1>Recent Posts</h1>
<ul id="recent_posts">
<li class="post">
<a href="/blog/2014/03/11/vim-setup-for-ansible/">Vim Setup for Ansible</a>
</li>
<li class="post">
<a href="/blog/2014/02/25/getting-started-on-octopress/">Getting Started on Octopress</a>
</li>
</ul>
</section>
</aside>
</div>
</div>
<footer role="contentinfo"><p>
Copyright © 2014 - Shuo Yang -
<span class="credit">Powered by <a href="http://octopress.org">Octopress</a></span>
</p>
</footer>
<script type="text/javascript">
var disqus_shortname = 'syanggithubcom';
var disqus_script = 'count.js';
(function () {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/' + disqus_script;
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
}());
</script>
<script type="text/javascript">
(function(){
var twitterWidgets = document.createElement('script');
twitterWidgets.type = 'text/javascript';
twitterWidgets.async = true;
twitterWidgets.src = '//platform.twitter.com/widgets.js';
document.getElementsByTagName('head')[0].appendChild(twitterWidgets);
})();
</script>
</body>
</html>