-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
871 lines (640 loc) · 29.5 KB
/
index.html
File metadata and controls
871 lines (640 loc) · 29.5 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
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
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="google-site-verification" content="uXxmVx_s5NWbdIPpt-HXHgVgVQ--UqZwGZgiqq0xHfg" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content=" | 你好,我是 Echo Han。我是一名运维工程师/奶爸/Ruby 爱好者。我不时在这里记录一些自己的想法。欢迎你与我交流。">
<meta name="keyword" content=" Echo Han Hon echohn ops mac ruby 运维 开发 博客 网络日志">
<link rel="shortcut icon" href="/img/favicon.ico">
<title>Echo 的网络日志 | Echo's Blog</title>
<link rel="canonical" href="https://echohn.github.io/">
<!-- Bootstrap Core CSS -->
<link rel="stylesheet" href="/css/bootstrap.min.css">
<!-- Custom CSS -->
<link rel="stylesheet" href="/css/hux-blog.min.css">
<!-- Pygments Github CSS -->
<link rel="stylesheet" href="/css/syntax.css">
<link rel="stylesheet" href="/css/echo.css">
<!-- Custom Fonts -->
<!-- <link href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> -->
<!-- Hux change font-awesome CDN to qiniu -->
<link href="http://cdn.staticfile.org/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/js/reset.css">
<link rel="stylesheet" href="/js/reveal.css">
<link rel="stylesheet" href="/js/reveal/theme/black.css" id="theme">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="/js/reveal/plugin/highlight/monokai.css" id="highlight-theme">
<script></script>
</head>
<!-- hack iOS CSS :active style -->
<body ontouchstart="">
<!-- Navigation -->
<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header page-scroll">
<button type="button" class="navbar-toggle">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">Echo's Blog</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<!-- Known Issue, found by Hux:
<nav>'s height woule be hold on by its content.
so, when navbar scale out, the <nav> will cover tags.
also mask any touch event of tags, unfortunately.
-->
<div id="huxblog_navbar">
<div class="navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li>
<a href="/">Home</a>
</li>
<li>
<a href="/about/">About</a>
</li>
<li>
<a href="/slides/">SILDES</a>
</li>
<li>
<a href="/tags/">Tags</a>
</li>
<li>
<a href="/tools/">TOOLS</a>
</li>
</ul>
</div>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<script>
// Drop Bootstarp low-performance Navbar
// Use customize navbar with high-quality material design animation
// in high-perf jank-free CSS3 implementation
var $body = document.body;
var $toggle = document.querySelector('.navbar-toggle');
var $navbar = document.querySelector('#huxblog_navbar');
var $collapse = document.querySelector('.navbar-collapse');
var __HuxNav__ = {
close: function(){
$navbar.className = " ";
// wait until animation end.
setTimeout(function(){
// prevent frequently toggle
if($navbar.className.indexOf('in') < 0) {
$collapse.style.height = "0px"
}
},400)
},
open: function(){
$collapse.style.height = "auto"
$navbar.className += " in";
}
}
// Bind Event
$toggle.addEventListener('click', function(e){
if ($navbar.className.indexOf('in') > 0) {
__HuxNav__.close()
}else{
__HuxNav__.open()
}
})
/**
* Since Fastclick is used to delegate 'touchstart' globally
* to hack 300ms delay in iOS by performing a fake 'click',
* Using 'e.stopPropagation' to stop 'touchstart' event from
* $toggle/$collapse will break global delegation.
*
* Instead, we use a 'e.target' filter to prevent handler
* added to document close HuxNav.
*
* Also, we use 'click' instead of 'touchstart' as compromise
*/
document.addEventListener('click', function(e){
if(e.target == $toggle) return;
if(e.target.className == 'icon-bar') return;
__HuxNav__.close();
})
</script>
<!-- Page Header -->
<header class="intro-header" style="background-image: url('/img/home-bg.jpg')">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1 ">
<div class="site-heading">
<h1>Echo's Blog</h1>
<!--<hr class="small">-->
<span class="subheading">我把桃花切两斤,且与时光炖了。</span>
</div>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<div class="container">
<div class="row">
<!-- USE SIDEBAR -->
<!-- Post Container -->
<div class="
col-lg-8 col-lg-offset-1
col-md-8 col-md-offset-1
col-sm-12
col-xs-12
post-container
">
<div class="post-preview">
<a href="/2021/01/23/fix-rubymine-not-found-node/">
<h2 class="post-title">
修复 RubyMine 在 Alfred workflow 打开项目时,出现 yarn packages are out of date 的错误
</h2>
<h3 class="post-subtitle">
</h3>
<div class="post-content-preview">
近来发现 RubyMine 在启动项目的服务时,有时正常,有时候异常,异常就如下图所示(启动 rails s):
在直接启动 RubyMine 的时候是不会出现该问题的,但是通过 Alfred 的 jetbrains workflow 直接启动项目时会出现此现象。
排查中发现,我在项目中实际用到的是 node 12, 但是在服务启动时,总是在调用 node 14。然而在 RubyMin...
</div>
</a>
<p class="post-meta">
Posted by Echo on January 23, 2021
</p>
</div>
<hr>
<div class="post-preview">
<a href="/2017/08/10/use-line-comment-with-apidoc-in-ruby-language/">
<h2 class="post-title">
在 Ruby 中使用行注释生成 apiDoc
</h2>
<h3 class="post-subtitle">
</h3>
<div class="post-content-preview">
以前我试过很多生成 api 文档的方法。
起初使用过 Markdown 独自维护一份文档,但是文档和代码不同步的话,会经常忘记更新。
后来尝试过使用 rDoc、Sphinx 等工具对代码注释进行解析直接生成 api 文档,Sphinx 是一种基于 reStructuredText 格式的文档生成工具。
最近发现了 apiDoc ,它相对于 Sphinx 来说,不用学习 rst 语法,学...
</div>
</a>
<p class="post-meta">
Posted by Echo on August 10, 2017
</p>
</div>
<hr>
<div class="post-preview">
<a href="/2016/10/23/fix-confluence-chinese-pack-lead-to-web-ui-error/">
<h2 class="post-title">
解决 Confluence 5.10 中文补丁导致的 web 界面 UI 错误
</h2>
<div class="post-content-preview">
最近把公司原来用的 Confluence 从 3.4.5 升到了 5.10.7 。
虽然这两个版本跨了六年,但是整个升级过程还是挺顺利的,就是麻烦了一些,根据官网要求,要按照 3.4.5 => 3.5 => 5.0 => 5.10 这样一步步进行升级。
然后在使用的时候发现了一些问题,花了不少时间排错。
起初是发现无法发送通知邮件,虽然测试邮件可以成功发送,但是一直收...
</div>
</a>
<p class="post-meta">
Posted by Echo on October 23, 2016
</p>
</div>
<hr>
<div class="post-preview">
<a href="/2016/10/22/import-passwords-to-iterm-password-management/">
<h2 class="post-title">
批量导入密码到 iTerm 密码管理器
</h2>
<div class="post-content-preview">
定期修改密码是非常常见的安全策略,我们这每隔几个月会将所有线上服务器的密码统一更新。
起初我是将服务器密码直接存储在 Keychain 里。
每次要登录服务器的时候,打开 Keychain,搜索相关服务器的信息,然后点击「将密码复制到剪贴板」,再回到终端里粘贴。
当时觉得虽然不太方便,但是总比从 Excel 里粘密码要好吧。
后来,iTerm 升到 3,多了一项密码管理器的功能。
...
</div>
</a>
<p class="post-meta">
Posted by Echo on October 22, 2016
</p>
</div>
<hr>
<div class="post-preview">
<a href="/2016/10/01/about-improve-zsh-response-speed/">
<h2 class="post-title">
尝试提高 ZSH 的响应速度
</h2>
<h3 class="post-subtitle">
</h3>
<div class="post-content-preview">
事情的起因是某一天我突然发现,我的 zsh 怎么这么卡?
以前实在没在意 zsh 的响应速度,但是一旦注意到,就开始各种接受不了。
打开一个 iTerm 标签页需要十几秒?
cd 一个目录需要一到两秒才有响应?
ls 一个目录要返回结果一两秒后才能操作?
^C 结束进程反而卡在这不动?
我想到最近机器做过的变更实在太多。升级 macOS Sierra,iTerm 升...
</div>
</a>
<p class="post-meta">
Posted by Echo on October 1, 2016
</p>
</div>
<hr>
<div class="post-preview">
<a href="/2016/10/01/the-reading-note-of-time-management/">
<h2 class="post-title">
「时间管理」读书笔记
</h2>
<div class="post-content-preview">
今天读了「你知道吗?每个时间管理方法都只适合解决某一类问题」这篇文章,觉得很受用。
正好我正想系统化的梳理一下之前学习过的时间管理相关资料,就以此文章为基础,先做一篇读书笔记。
对于这篇文章中所提到的「生命之花」和「晨间日记」我之前并不是很了解,所以在笔记中做了一些拓展。
以后如果有时间,我再把之前学过的其他时间管理的知识总结到这里。
点击这里查看
</div>
</a>
<p class="post-meta">
Posted by Echo on October 1, 2016
</p>
</div>
<hr>
<div class="post-preview">
<a href="/2016/09/24/use-cloc-to-count-your-code/">
<h2 class="post-title">
使用 cloc 统计你的代码量
</h2>
<div class="post-content-preview">
今天发现一个特别好用的工具 cloc,可以用它统计代码的行数。它可以识别多种开发语言,并在计算的时候忽略掉注释和空行。
我记得我上次申请软件著作权的时候,申请表格中要求提交代码量,当时为了计算行数,我写了类似于 find xxx -prune xxx | xargs grep -vE xxx | wc -l 的超长命令。
每年写年终总结统计工作量的时候,我也常常会用到类似的命令。
所以...
</div>
</a>
<p class="post-meta">
Posted by Echo on September 24, 2016
</p>
</div>
<hr>
<div class="post-preview">
<a href="/2016/09/22/hit-the-pit-after-updated-osx-to-sierra/">
<h2 class="post-title">
升级到 macOS Sierra 之后踩到的坑 (持续更新)
</h2>
<div class="post-content-preview">
本来没想这么早升级的,主要是之前看相关的消息,我以为新版本 GateKeeper 无法关闭,怕很多应用无法使用了。
之后看到《macOS Sierra 正式版升级须知一览》发现 GateKeeper 仍是可以通过命令行进行关闭的,这才放下心兴致勃勃的点了 Sierra 的下载。
安装过程一切顺利,完成之后直接重置了 NVRAM。
正常启动之后没有发现大的问题,比如 Homebrew 无...
</div>
</a>
<p class="post-meta">
Posted by Echo on September 22, 2016
</p>
</div>
<hr>
<div class="post-preview">
<a href="/2016/09/16/what-did-i-do-in-these-months/">
<h2 class="post-title">
这两个月我在忙什么
</h2>
<h3 class="post-subtitle">
</h3>
<div class="post-content-preview">
转眼间有两个多月没有写一篇文章了。
这两个多月,我一直在公司忙于开发一个给客户使用的数据可视化的项目。
说起来我接到做这个项目的因为,是因为研发的同事实在太忙了,研发的 Boss 对业务说实在抽不出人手来做这个项目,所以这个项目落到运维来了。
毕竟之前是一直写东西给自己人用,现在终于能写东西给客户用,我刚接到这个项目的时候还是很兴奋的。
这个项目立项时有三个人,我负责项目进度和开发,...
</div>
</a>
<p class="post-meta">
Posted by Echo on September 16, 2016
</p>
</div>
<hr>
<div class="post-preview">
<a href="/2016/07/22/auto-backup-safari-bookmarks/">
<h2 class="post-title">
如何自动备份 Safari 书签
</h2>
<h3 class="post-subtitle">
嘿,我好像又发现了 Safari 的 BUG
</h3>
<div class="post-content-preview">
今天上午美男子找我,「我 Safari 的书签突然全没啦,怎么办?」
「你上次说买 Time Capsule 后来买了吗?」
「还没啊。」
「那你试试登 iCloud 看看,我记得好像有恢复书签的功能。」
过了一会,美男子告诉我,确实在 iCloud 里找到了恢复书签的选项,包括通讯录,日历和 iCloud Drive 的文件,iCloud 都有恢复的功能。
这件事就这样结束了,然...
</div>
</a>
<p class="post-meta">
Posted by Echo on July 22, 2016
</p>
</div>
<hr>
<!-- Pager -->
<ul class="pager">
<li class="next">
<a href="/page2">Older Posts →</a>
</li>
</ul>
</div>
<!-- Sidebar Container -->
<div class="
col-lg-3 col-lg-offset-0
col-md-3 col-md-offset-0
col-sm-12
col-xs-12
sidebar-container
">
<!-- Featured Tags -->
<section>
<hr class="hidden-sm hidden-xs">
<h5><a href="/tags/">FEATURED TAGS</a></h5>
<div class="tags">
<a href="/tags/#杂记" title="杂记" rel="3">
杂记
</a>
<a href="/tags/#Mac" title="Mac" rel="9">
Mac
</a>
<a href="/tags/#Alfred" title="Alfred" rel="4">
Alfred
</a>
<a href="/tags/#Ruby" title="Ruby" rel="5">
Ruby
</a>
<a href="/tags/#Safari" title="Safari" rel="2">
Safari
</a>
<a href="/tags/#运维" title="运维" rel="3">
运维
</a>
<a href="/tags/#Linux" title="Linux" rel="1">
Linux
</a>
<a href="/tags/#script" title="script" rel="2">
script
</a>
<a href="/tags/#linux" title="linux" rel="1">
linux
</a>
<a href="/tags/#读书笔记" title="读书笔记" rel="1">
读书笔记
</a>
<a href="/tags/#Bash" title="Bash" rel="1">
Bash
</a>
<a href="/tags/#科学上网" title="科学上网" rel="1">
科学上网
</a>
<a href="/tags/#ShadowSocks" title="ShadowSocks" rel="1">
ShadowSocks
</a>
<a href="/tags/#安全" title="安全" rel="1">
安全
</a>
<a href="/tags/#工具" title="工具" rel="2">
工具
</a>
<a href="/tags/#时间管理" title="时间管理" rel="1">
时间管理
</a>
<a href="/tags/#ZSH" title="ZSH" rel="1">
ZSH
</a>
<a href="/tags/#iTerm" title="iTerm" rel="1">
iTerm
</a>
<a href="/tags/#Confluence" title="Confluence" rel="1">
Confluence
</a>
<a href="/tags/#apiDoc" title="apiDoc" rel="1">
apiDoc
</a>
<a href="/tags/#RubyMine" title="RubyMine" rel="1">
RubyMine
</a>
</div>
</section>
<!-- Short About -->
<section class="visible-md visible-lg">
<hr><h5><a href="/about/">ABOUT ME</a></h5>
<div class="short-about">
<img src="/img/avatar-echo.jpg" />
<p>你好,我是 Echo,我是一名运维工程师/奶爸/Ruby 爱好者。</p>
<!-- SNS Link -->
<ul class="list-inline">
<li>
<a href="https://twitter.com/echo_hon">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<li>
<a target="_blank" href="https://www.zhihu.com/people/echohn">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-stack-1x fa-inverse">知</i>
</span>
</a>
</li>
<li>
<a target="_blank" href="https://github.com/echohn">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
</ul>
</div>
</section>
<!-- Friends Blog -->
<hr>
<h5>FRIENDS</h5>
<ul class="list-inline">
</ul>
</div>
</div>
</div>
<!-- Footer -->
<footer>
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<ul class="list-inline text-center">
<li>
<a href="https://twitter.com/echo_hon">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-twitter fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
<!-- add Weibo, Zhihu by Hux, add target = "_blank" to <a> by Hux -->
<li>
<a target="_blank" href="https://www.zhihu.com/people/echohn">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-stack-1x fa-inverse">知</i>
</span>
</a>
</li>
<li>
<a target="_blank" href="https://github.com/echohn">
<span class="fa-stack fa-lg">
<i class="fa fa-circle fa-stack-2x"></i>
<i class="fa fa-github fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
</ul>
<p class="copyright text-muted">
Copyright © Echo's Blog 2021
<br>
Theme by <a href="http://huangxuan.me">Hux</a> |
<iframe
style="margin-left: 2px; margin-bottom:-5px;"
frameborder="0" scrolling="0" width="91px" height="20px"
src="https://ghbtns.com/github-btn.html?user=huxpro&repo=huxpro.github.io&type=star&count=true" >
</iframe>
</p>
</div>
</div>
</div>
</footer>
<!-- jQuery -->
<script src="/js/jquery.min.js "></script>
<!-- Bootstrap Core JavaScript -->
<script src="/js/bootstrap.min.js "></script>
<!-- Custom Theme JavaScript -->
<script src="/js/hux-blog.min.js "></script>
<!-- async load function -->
<script>
function async(u, c) {
var d = document, t = 'script',
o = d.createElement(t),
s = d.getElementsByTagName(t)[0];
o.src = u;
if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
s.parentNode.insertBefore(o, s);
}
</script>
<!--
Because of the native support for backtick-style fenced code blocks
right within the Markdown is landed in Github Pages,
From V1.6, There is no need for Highlight.js,
so Huxblog drops it officially.
- https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0
- https://help.github.com/articles/creating-and-highlighting-code-blocks/
-->
<!--
<script>
async("http://cdn.bootcss.com/highlight.js/8.6/highlight.min.js", function(){
hljs.initHighlightingOnLoad();
})
</script>
<link href="http://cdn.bootcss.com/highlight.js/8.6/styles/github.min.css" rel="stylesheet">
-->
<!-- jquery.tagcloud.js -->
<script>
// only load tagcloud.js in tag.html
if($('#tag_cloud').length !== 0){
async("/js/jquery.tagcloud.js",function(){
$.fn.tagcloud.defaults = {
//size: {start: 1, end: 1, unit: 'em'},
color: {start: '#bbbbee', end: '#0085a1'},
};
$('#tag_cloud a').tagcloud();
})
}
</script>
<!--fastClick.js -->
<script>
async("http://cdn.bootcss.com/fastclick/1.0.6/fastclick.min.js", function(){
var $nav = document.querySelector("nav");
if($nav) FastClick.attach($nav);
})
</script>
<!-- Google Analytics -->
<script>
// dynamic User by Hux
var _gaId = 'UA-77431076-1';
var _gaDomain = 'echohn.github.io';
// Originial
(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', _gaId, _gaDomain);
ga('send', 'pageview');
</script>
<!-- Baidu Tongji -->
<script>
// dynamic User by Hux
var _baId = '3f73ebe1e7ff90638adbb85f89789e3a';
// Originial
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?" + _baId;
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<!-- side catalog -->
<script type="text/javascript">
function generateCatalog (selector) {
var P = $('.post-container'),a,n,t,l,i,c;
a = P.find('h1,h2,h3,h4,h5,h6');
a.each(function () {
n = $(this).prop('tagName').toLowerCase();
i = "#"+$(this).prop('id');
t = $(this).text();
c = $('<a href="'+i+'" rel="nofollow">'+t+'</a>');
l = $('<li class="'+n+'_nav"></li>').append(c);
$(selector).append(l);
});
return true;
}
generateCatalog(".catalog-body");
// toggle side catalog
$(".catalog-toggle").click((function(e){
e.preventDefault();
$('.side-catalog').toggleClass("fold")
}))
/*
* Doc: https://github.com/davist11/jQuery-One-Page-Nav
* Fork by Hux to support padding
*/
async("/js/jquery.nav.js", function () {
$('.catalog-body').onePageNav({
currentClass: "active",
changeHash: !1,
easing: "swing",
filter: "",
scrollSpeed: 700,
scrollOffset: 0,
scrollThreshold: .2,
begin: null,
end: null,
scrollChange: null,
padding: 80
});
});
</script>
<!-- Image to hack wechat
<img src="/img/icon_wechat.png" width="0" height="0" />
-->
<!-- Migrate from head to bottom, no longer block render and still work -->
</body>
</html>