-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
361 lines (221 loc) · 11.2 KB
/
index.html
File metadata and controls
361 lines (221 loc) · 11.2 KB
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
<!DOCTYPE HTML>
<html >
<head>
<meta charset="UTF-8">
<title>Gavin's Blog</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=3, minimum-scale=1">
<meta name="author" content="Gavin">
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="flypiggys" />
<meta name="twitter:title" content="Gavin's Blog" />
<link rel="alternate" href="/atom.xml" title="Gavin's Blog" type="application/atom+xml">
<link rel="icon" href="/img/favicon.ico">
<link rel="apple-touch-icon" href="/img/pacman.jpg">
<link rel="apple-touch-icon-precomposed" href="/img/pacman.jpg">
<link rel="stylesheet" href="/css/style.css" type="text/css">
</head>
<body>
<header id="banner">
<div>
<div id="textlogo">
<h1 class="site-name"><a href="/" title="Gavin's Blog">Gavin's Blog</a></h1>
<h2 class="blog-motto">Programming (cdr (life))</h2>
</div>
<div class="navbar"><a class="navbutton navmobile" href="#" title="Menu">
</a></div>
<nav class="animated">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/archives">Archives</a></li>
<li><a href="/about_me.html">About Me</a></li>
<li>
<form class="search" action="//google.com/search" method="get" accept-charset="utf-8">
<label>Search</label>
<input type="text" id="search" name="q" autocomplete="off" maxlength="20" placeholder="Search" />
<input type="hidden" name="q" value="site:blog.ligan.me">
</form>
</li>
</ul>
</nav>
</div>
</header>
<div id="container">
<div id="main">
<section class="post" itemscope itemprop="blogPost">
<a href="/2015/02/10/join-us/" title="极客公园招人啦" itemprop="url">
<h1 itemprop="name">极客公园招人啦</h1>
<p itemprop="description" >极客公园招人啦. 工程师/产品经理/web 设计师</p>
<time datetime="2015-02-10T12:04:06.000Z" itemprop="datePublished">Feb 10 2015</time>
</a>
</section>
<section class="post" itemscope itemprop="blogPost">
<a href="/2015/01/13/a-simple-comments-spam-system/" title="一个简单的评论过滤系统的实现" itemprop="url">
<h1 itemprop="name">一个简单的评论过滤系统的实现</h1>
<p itemprop="description" >网站开启匿名评论之后, 垃圾评论就一直是一个让人头疼的问题. 关键词过滤及限制评论数很容易被找到针对的办法, 上 NLP 又太重. 最后使用了语句的相似度检查来完成一个简单的评论过滤系统.</p>
<time datetime="2015-01-13T15:28:32.000Z" itemprop="datePublished">Jan 13 2015</time>
</a>
</section>
<section class="post" itemscope itemprop="blogPost">
<a href="/2014/12/08/CSRF-and-protect-from-forgery-in-rails-4/" title="CSRF and protect_from_forgery in Rails 4" itemprop="url">
<h1 itemprop="name">CSRF and protect_from_forgery in Rails 4</h1>
<p itemprop="description" >最近的一个项目频繁出现恼人的 InvalidAuthenticityToken 错误, 引发了我对 Rails 中 protect_from_forgery 的思考, 本文介绍 CSRF 攻击以及在 Rails 中的保护方式, 什么情况下应该使用那种策略来防CSRF.</p>
<time datetime="2014-12-07T16:20:31.000Z" itemprop="datePublished">Dec 8 2014</time>
</a>
</section>
<section class="post" itemscope itemprop="blogPost">
<a href="/2014/03/02/shi-yong-oh-my-zshnei-zhi-cha-jian-sheng-lue-bundle-exec/" title="使用oh-my-zsh内置插件省略bundle exec" itemprop="url">
<h1 itemprop="name">使用oh-my-zsh内置插件省略bundle exec</h1>
<p itemprop="description" >在oh-my-zsh中省略输入烦人的 bundle exec.</p>
<time datetime="2014-03-02T04:09:23.000Z" itemprop="datePublished">Mar 2 2014</time>
</a>
</section>
<section class="post" itemscope itemprop="blogPost">
<a href="/2013/09/08/rspec-feature-ce-shi-jian-jie/" title="rspec中使用feature spec进行用户/验收测试" itemprop="url">
<h1 itemprop="name">rspec中使用feature spec进行用户/验收测试</h1>
<p itemprop="description" >rspec和capybara在ruby程序员中很多人都不陌生了.在2.0版本以后的capybara中,新加入了feature spec的写法.在rspec中默认使用spec/feature,而不再使用spec/request.</p>
<time datetime="2013-09-08T07:55:00.000Z" itemprop="datePublished">Sep 8 2013</time>
</a>
</section>
<section class="post" itemscope itemprop="blogPost">
<a href="/2013/09/05/using-rvm-manage-your-gems/" title="使用rvm更好的管理你的gem" itemprop="url">
<h1 itemprop="name">使用rvm更好的管理你的gem</h1>
<p itemprop="description" >rvm作为一种方便的ruby安装和管理方式已经被大家所习惯和接受.但是rvm中另外一个重要的功能gemset使用率却不高.本文简单介绍一下gemset的正确使用姿势.</p>
<time datetime="2013-09-04T17:42:00.000Z" itemprop="datePublished">Sep 5 2013</time>
</a>
</section>
<section class="post" itemscope itemprop="blogPost">
<a href="/2013/01/06/zsh-alias-with-parameters/" title="zsh alias with parameters" itemprop="url">
<h1 itemprop="name">zsh alias with parameters</h1>
<p itemprop="description" >以前经常在shell中使用alias来偷懒减少输入,今天想在zsh中加入一个带参数的alias.</p>
<time datetime="2013-01-06T14:01:00.000Z" itemprop="datePublished">Jan 6 2013</time>
</a>
</section>
<section class="post" itemscope itemprop="blogPost">
<a href="/2013/01/03/jiu-zhe-yao-dao-liao-2013nian-liao/" title="就这么到了2013年了" itemprop="url">
<h1 itemprop="name">就这么到了2013年了</h1>
<p itemprop="description" >2012 过去了,世界末日没来,依然没有成为高富帅,被逼着裸婚了,学习没有长进,又浪费了一年.</p>
<time datetime="2013-01-03T11:51:00.000Z" itemprop="datePublished">Jan 3 2013</time>
</a>
</section>
<section class="post" itemscope itemprop="blogPost">
<a href="/2012/10/01/first-blood/" title="First Blood" itemprop="url">
<h1 itemprop="name">First Blood</h1>
<p itemprop="description" >卖个萌,over</p>
<time datetime="2012-10-01T13:50:00.000Z" itemprop="datePublished">Oct 1 2012</time>
</a>
</section>
</div>
<div class="openaside"><a class="navbutton" href="#" title="Show Sidebar"></a></div>
<div id="asidepart">
<div class="closeaside"><a class="closebutton" href="#" title="Hide Sidebar"></a></div>
<aside class="clearfix">
<div class="categorieslist">
<p class="asidetitle">Categories</p>
<ul>
<li><a href="/categories/Linux/" title="Linux">Linux<sup>1</sup></a></li>
<li><a href="/categories/Rails/" title="Rails">Rails<sup>2</sup></a></li>
<li><a href="/categories/Ruby/" title="Ruby">Ruby<sup>3</sup></a></li>
<li><a href="/categories/闲聊/" title="闲聊">闲聊<sup>3</sup></a></li>
</ul>
</div>
<div class="tagslist">
<p class="asidetitle">Tags</p>
<ul class="clearfix">
<li><a href="/tags/bundler/" title="bundler">bundler<sup>1</sup></a></li>
<li><a href="/tags/capybara/" title="capybara">capybara<sup>1</sup></a></li>
<li><a href="/tags/gem/" title="gem">gem<sup>1</sup></a></li>
<li><a href="/tags/rails/" title="rails">rails<sup>2</sup></a></li>
<li><a href="/tags/rspec/" title="rspec">rspec<sup>1</sup></a></li>
<li><a href="/tags/ruby/" title="ruby">ruby<sup>5</sup></a></li>
<li><a href="/tags/rvm/" title="rvm">rvm<sup>1</sup></a></li>
<li><a href="/tags/zsh/" title="zsh">zsh<sup>1</sup></a></li>
<li><a href="/tags/垃圾评论/" title="垃圾评论">垃圾评论<sup>1</sup></a></li>
<li><a href="/tags/招聘/" title="招聘">招聘<sup>1</sup></a></li>
<li><a href="/tags/测试/" title="测试">测试<sup>1</sup></a></li>
<li><a href="/tags/闲聊/" title="闲聊">闲聊<sup>2</sup></a></li>
</ul>
</div>
<div class="rsspart">
<a href="/atom.xml" target="_blank" title="rss">RSS</a>
</div>
</aside>
</div>
</div>
<footer><div id="footer" >
<div class="line">
<span></span>
<div class="author"></div>
</div>
<section class="info">
<p> Hi, I'm Gavin. I'm a newbie programmer living in Beijing. <br/>
Ruby and Lisp are my favorite languages . </p>
</section>
<div class="social-font clearfix">
<a href="http://weibo.com/flypiggy" target="_blank" title="weibo"></a>
<a href="https://twitter.com/flypiggys" target="_blank" title="twitter"></a>
<a href="https://github.com/flypiggy" target="_blank" title="github"></a>
<a href="https://www.facebook.com/flypiggys" target="_blank" title="facebook"></a>
</div>
<p class="copyright">Powered by <a href="http://hexo.io" target="_blank" title="hexo">hexo</a> and Theme by <a href="https://github.com/A-limon/pacman" target="_blank" title="Pacman">Pacman</a> © 2015
<a href="http://blog.ligan.me" target="_blank" title="Gavin">Gavin</a>
</p>
</div>
</footer>
<script src="/js/jquery-2.1.0.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var num = Math.ceil( Math.random() * 3);
$("header#banner").css({"background": "url('/img/banner"+num+".jpg') center #000", "backgroundSize": "cover"})
});
$(document).ready(function(){
$('.navbar').click(function(){
$('header nav').toggleClass('shownav');
});
var myWidth = 0;
function getSize(){
if( typeof( window.innerWidth ) == 'number' ) {
myWidth = window.innerWidth;
} else if( document.documentElement && document.documentElement.clientWidth) {
myWidth = document.documentElement.clientWidth;
};
};
var m = $('#main'),
a = $('#asidepart'),
c = $('.closeaside'),
o = $('.openaside');
$(window).resize(function(){
getSize();
if (myWidth >= 1024) {
$('header nav').removeClass('shownav');
}else
{
m.removeClass('moveMain');
a.css('display', 'block').removeClass('fadeOut');
o.css('display', 'none');
}
});
c.click(function(){
a.addClass('fadeOut').css('display', 'none');
o.css('display', 'block').addClass('fadeIn');
m.addClass('moveMain');
});
o.click(function(){
o.css('display', 'none').removeClass('beforeFadeIn');
a.css('display', 'block').removeClass('fadeOut').addClass('fadeIn');
m.removeClass('moveMain');
});
$(window).scroll(function(){
o.css("top",Math.max(80,260-$(this).scrollTop()));
});
});
</script>
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-35413718-1', 'ligan.me');
ga('send', 'pageview');
</script>
</body>
</html>