-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
837 lines (371 loc) · 29.3 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
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
<!doctype html>
<html class="theme-next muse use-motion">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link href="/vendors/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css"/>
<link href="//fonts.googleapis.com/css?family=Lato:300,400,700,400italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
<link href="/vendors/font-awesome/css/font-awesome.min.css?v=4.4.0" rel="stylesheet" type="text/css" />
<link href="/css/main.css?v=0.5.0" rel="stylesheet" type="text/css" />
<meta name="keywords" content="Hexo, NexT" />
<link rel="shortcut icon" type="image/x-icon" href="/source?v=0.5.0" />
<meta name="description" content="能用钱解决的问题,现在我全都解决不了">
<meta property="og:type" content="website">
<meta property="og:title" content="老K的博客">
<meta property="og:url" content="http://yoursite.com/index.html">
<meta property="og:site_name" content="老K的博客">
<meta property="og:description" content="能用钱解决的问题,现在我全都解决不了">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="老K的博客">
<meta name="twitter:description" content="能用钱解决的问题,现在我全都解决不了">
<script type="text/javascript" id="hexo.configuration">
var NexT = window.NexT || {};
var CONFIG = {
scheme: 'Muse',
sidebar: {"position":"left","display":"post"},
fancybox: true,
motion: true,
duoshuo: {
userId: 6364013420575983000,
author: 'KEL'
}
};
</script>
<title> 老K的博客 </title>
</head>
<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">
<div class="container one-collumn sidebar-position-left
page-home
">
<div class="headband"></div>
<header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner"><div class="site-meta ">
<div class="custom-logo-site-title">
<a href="/" class="brand" rel="start">
<span class="logo-line-before"><i></i></span>
<span class="site-title">老K的博客</span>
<span class="logo-line-after"><i></i></span>
</a>
</div>
<p class="site-subtitle">Kel Blog</p>
</div>
<div class="site-nav-toggle">
<button>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
</button>
</div>
<nav class="site-nav">
<ul id="menu" class="menu ">
<li class="menu-item menu-item-home">
<a href="/" rel="section">
<i class="menu-item-icon fa fa-home fa-fw"></i> <br />
首页
</a>
</li>
<li class="menu-item menu-item-categories">
<a href="/categories" rel="section">
<i class="menu-item-icon fa fa-th fa-fw"></i> <br />
分类
</a>
</li>
<li class="menu-item menu-item-about">
<a href="/about" rel="section">
<i class="menu-item-icon fa fa-user fa-fw"></i> <br />
关于
</a>
</li>
<li class="menu-item menu-item-archives">
<a href="/archives" rel="section">
<i class="menu-item-icon fa fa-archive fa-fw"></i> <br />
归档
</a>
</li>
<li class="menu-item menu-item-tags">
<a href="/tags" rel="section">
<i class="menu-item-icon fa fa-tags fa-fw"></i> <br />
标签
</a>
</li>
</ul>
</nav>
</div>
</header>
<main id="main" class="main">
<div class="main-inner">
<div class="content-wrap">
<div id="content" class="content">
<section id="posts" class="posts-expand">
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2017/01/03/gitlab-pull-request/" itemprop="url">
gitlab-pull-request
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time itemprop="dateCreated" datetime="2017-01-03T23:20:58+08:00" content="2017-01-03">
2017-01-03
</time>
</span>
<span class="post-comments-count">
|
<a href="/2017/01/03/gitlab-pull-request/#comments" itemprop="discussionUrl">
<span class="post-comments-count ds-thread-count" data-thread-key="2017/01/03/gitlab-pull-request/" itemprop="commentsCount"></span>
</a>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h3 id="GITLAB__u4E2D_u7684_PULL_REQUEST"><a href="#GITLAB__u4E2D_u7684_PULL_REQUEST" class="headerlink" title="GITLAB 中的 PULL REQUEST"></a>GITLAB 中的 PULL REQUEST</h3><p>gitlab貌似没有github,gogs里面的pull request功能,那么如果同步主项目仓库代码到自己的仓库呢?<br>操作步骤如下:<br>1 添加上流:<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git remote add upstream URL</span><br></pre></td></tr></table></figure></p>
<p>2 拉取upstream,这个会创建一个remote的 upstream/master 和 upstream/dev<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git fetch upstream</span><br></pre></td></tr></table></figure></p>
<p>3 合并upstream分支dev到 本地dev(当前的本地分支)<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">git merge upstream/dev</span><br></pre></td></tr></table></figure></p>
<p>4 提交本地dev分支到remote</p>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2016/12/23/swoole-speed-up-laravel/" itemprop="url">
swoole-speed-up-laravel
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time itemprop="dateCreated" datetime="2016-12-23T00:07:28+08:00" content="2016-12-23">
2016-12-23
</time>
</span>
<span class="post-comments-count">
|
<a href="/2016/12/23/swoole-speed-up-laravel/#comments" itemprop="discussionUrl">
<span class="post-comments-count ds-thread-count" data-thread-key="2016/12/23/swoole-speed-up-laravel/" itemprop="commentsCount"></span>
</a>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h3 id="1_Laravel_u7684_u901F_u5EA6_u74F6_u9888_u5728_u54EA_uFF1F"><a href="#1_Laravel_u7684_u901F_u5EA6_u74F6_u9888_u5728_u54EA_uFF1F" class="headerlink" title="1 Laravel的速度瓶颈在哪?"></a>1 Laravel的速度瓶颈在哪?</h3><h4 id="1-1__u5DF2_u6709_u7684_u4E00_u4E9B_u4F18_u5316_u65B9_u6CD5"><a href="#1-1__u5DF2_u6709_u7684_u4E00_u4E9B_u4F18_u5316_u65B9_u6CD5" class="headerlink" title="1.1 已有的一些优化方法"></a>1.1 已有的一些优化方法</h4><p>1.1.1 laravel官方提供了一些优化laravel的优化方法<br><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">$ php artisan optimize</span><br><span class="line">$ php artisan config:cache</span><br><span class="line">$ php artisan route:cache</span><br></pre></td></tr></table></figure></p>
<p>1.1.2 使用opcache加速</p>
<p>PHP是个解释型语言执行的时候先得把程序读进来,由Zend引擎编译成opcode。最后Zend虚拟机顺次执行这些opcode完成操作。opcache起到的作用就是缓存opcode,从而减少编译的时间,减少CPU密集。</p>
<p>1.1.3 使用PHP7.1,不要问我为什么</p>
<h4 id="1-2__u78C1_u76D8IO_u4E0A_u7684_u74F6_u9888"><a href="#1-2__u78C1_u76D8IO_u4E0A_u7684_u74F6_u9888" class="headerlink" title="1.2 磁盘IO上的瓶颈"></a>1.2 磁盘IO上的瓶颈</h4><p>Laravel本身启动需要的文件就很多,外加其出了名的生态环境好,开发中我们会很多很多现有的轮子,使得一次启动的磁盘IO特别高(就是要加载很多文件嘛),虽然官方的php artisan optimize方法优化了文件的加载,但并没有实际解决IO上的问题。<br>知道了问题那就很容易解决了,只要不要每次启动都重新加载就好了,下面轮到Swoole上场啦。</p>
<hr>
<h3 id="2_Swoole"><a href="#2_Swoole" class="headerlink" title="2 Swoole"></a>2 Swoole</h3><p>Swoole是一个PHP扩展,使得PHP使用异步的方式执行,就像node一样,而且还能使用socket,为PHP提供了一系列异步IO、事件驱动、并行数据结构功能。具体的安装方法这就不说了,自己谷歌吧。</p>
<hr>
<h3 id="3__u73B0_u6709_u7684_u8F6E_u5B50"><a href="#3__u73B0_u6709_u7684_u8F6E_u5B50" class="headerlink" title="3 现有的轮子"></a>3 现有的轮子</h3><p>搜搜github上已有的swoole启动laravel的轮子,找了三个轮子</p>
<p><a href="https://github.com/scil/LaravelFly" target="_blank" rel="external">scil/LaravelFly</a><br><a href="https://github.com/chongyi/swoole-laravel-framework" target="_blank" rel="external">chongyi/swoole-laravel-framework</a><br><a href="https://github.com/garveen/laravoole" target="_blank" rel="external">garveen/laravoole</a></p>
<p>用了LaravelFly,听名字感觉感觉挺酷,结果不如人意,实在不喜欢它那种强硬的启动方式。跟Laravel的风格-‘优雅’ 很不搭。于是又想自己写,结果写到一半发现laravoole这个项目有更新,然后启动方式(使用artisan命令,没更新前是用的bash脚本启动),代码风格都很酷,这不就是我想做的东西嘛!</p>
<hr>
<p>chongyi/swoole-laravel-framework这个轮子是我在写轮子的时候,作者在微信群里分享的,有兴趣的朋友可以试试,我还没试过。</p>
<hr>
<h3 id="4_LARAVOOLE_u4E2D_u7684_u51E0_u4E2A_u6CE8_u610F_u70B9"><a href="#4_LARAVOOLE_u4E2D_u7684_u51E0_u4E2A_u6CE8_u610F_u70B9" class="headerlink" title="4 LARAVOOLE中的几个注意点"></a>4 LARAVOOLE中的几个注意点</h3><p>可以看看<a href="https://github.com/garveen/laravoole" target="_blank" rel="external">作者的文档</a>,我就只总结下我在用的过程中遇到的几个点<br>1 你没法不再使用一下的超全局变量,因为它们是WEB服务器创建的,而一个非热启动的项目使用他们可能会造成变量污染,你可以从Laravel的Request类中拿到你要的数据。<br><figure class="highlight php"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="variable">$GLOBALS</span></span><br><span class="line"><span class="variable">$_SERVER</span></span><br><span class="line"><span class="variable">$_REQUEST</span></span><br><span class="line"><span class="variable">$_POST</span></span><br><span class="line"><span class="variable">$_GET</span></span><br><span class="line"><span class="variable">$_FILES</span></span><br><span class="line"><span class="variable">$_ENV</span></span><br><span class="line"><span class="variable">$_COOKIE</span></span><br><span class="line"><span class="variable">$_SESSION</span></span><br></pre></td></tr></table></figure></p>
<p>2 因为我要开发微信相关的,所以使用了<a href="https://github.com/overtrue/wechat" target="_blank" rel="external">EASYWECHAT</a>这个包,但是这个包的oauth方法使用的是原生的SESSION,所以这边也要改成redis等其它方式去存储session。具体代码如下。</p>
<figure class="highlight"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line">//在你的控制器或者中间件中</span><br><span class="line">public function handle(Request $request, Closure $next)</span><br><span class="line">//省略代码</span><br><span class="line">$redirect = config('app.url') . $request->getRequestUri();//这个地址要求带着token</span><br><span class="line"> </span><br><span class="line">$options = [</span><br><span class="line"> 'app_id' => config('app.appid'),</span><br><span class="line"> 'secret' => config('app.secret'),</span><br><span class="line"> 'oauth' => [</span><br><span class="line"> 'scopes' => ['snsapi_userinfo'],</span><br><span class="line"> 'callback' => $redirect,</span><br><span class="line"> ],</span><br><span class="line"> ];</span><br><span class="line"></span><br><span class="line"> $app = new Application($options);</span><br><span class="line"> //使用laravel session替代原生session</span><br><span class="line"> $app->oauth->setRequest($request);</span><br><span class="line"> //省略下面代码</span><br><span class="line">}</span><br></pre></td></tr></table></figure>
<p>3 不支持热启动了,所以每次更新代码后都需要重新启动Laravoole进程。<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">php artisan laravoole restart</span><br></pre></td></tr></table></figure></p>
<p>如需要支持热启动,请自行谷歌 swoole + inotify,大概原理就是用inotify监控文件变更,如果更新了重启swoole,如果正式环境中还可以自己写个部署脚本,git pull后重启服务等,方法很多不一一列举。</p>
<h3 id="5__u6109_u5FEB_u7684_u51C6_u5907_u6D4B_u8BD5_u5566"><a href="#5__u6109_u5FEB_u7684_u51C6_u5907_u6D4B_u8BD5_u5566" class="headerlink" title="5 愉快的准备测试啦"></a>5 愉快的准备测试啦</h3><p>测试机子:<br>阿里云<br>centos6.5<br>双核<br>4G<br>无视带宽影响,向本机请求,测试结果如下,测了几次,平均在700RPS左右。原先的只有20多RPS。<br><img src="/2016/12/23/swoole-speed-up-laravel/img1.png" alt="img1.png" title=""><br><img src="/2016/12/23/swoole-speed-up-laravel/img2.png" alt="img2.png" title=""></p>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2016/12/15/php7快速安装/" itemprop="url">
php7快速安装
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time itemprop="dateCreated" datetime="2016-12-15T00:47:53+08:00" content="2016-12-15">
2016-12-15
</time>
</span>
<span class="post-comments-count">
|
<a href="/2016/12/15/php7快速安装/#comments" itemprop="discussionUrl">
<span class="post-comments-count ds-thread-count" data-thread-key="2016/12/15/php7快速安装/" itemprop="commentsCount"></span>
</a>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h2 id="1__u6DFB_u52A0mirror"><a href="#1__u6DFB_u52A0mirror" class="headerlink" title="1 添加mirror"></a>1 添加mirror</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-<span class="number">6</span>.noarch.rpm</span><br><span class="line">$ rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm</span><br></pre></td></tr></table></figure>
<h2 id="2_yum__u5B89_u88C5_php7"><a href="#2_yum__u5B89_u88C5_php7" class="headerlink" title="2 yum 安装 php7"></a>2 yum 安装 php7</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br></pre></td><td class="code"><pre><span class="line">$ yum install php70w</span><br><span class="line">$ yum install php70w-common</span><br><span class="line">$ yum install php70w-fpm</span><br><span class="line">$ yum install php70w-pdo</span><br><span class="line">$ yum install php70w-xml</span><br><span class="line">$ yum install php70w-mbstring</span><br></pre></td></tr></table></figure>
<p>(因为我跑的是laravel,所以需要以上的一些扩展,其它请自行安装,如果需要其他扩展,请使用yum search php70w)<br>安装完后运行</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ service php-fpm restart</span><br><span class="line">$ service nginx restart</span><br></pre></td></tr></table></figure>
<p>错误日志请查看/var/log/php-fpm/www-error.log</p>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title" itemprop="name headline">
<a class="post-title-link" href="/2016/01/18/hello-world/" itemprop="url">
Hello World
</a>
</h1>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time itemprop="dateCreated" datetime="2016-01-18T21:10:21+08:00" content="2016-01-18">
2016-01-18
</time>
</span>
<span class="post-comments-count">
|
<a href="/2016/01/18/hello-world/#comments" itemprop="discussionUrl">
<span class="post-comments-count ds-thread-count" data-thread-key="2016/01/18/hello-world/" itemprop="commentsCount"></span>
</a>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>Welcome to <a href="https://hexo.io/" target="_blank" rel="external">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/" target="_blank" rel="external">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html" target="_blank" rel="external">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="external">GitHub</a>.</p>
<h2 id="Quick_Start"><a href="#Quick_Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create_a_new_post"><a href="#Create_a_new_post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/writing.html" target="_blank" rel="external">Writing</a></p>
<h3 id="Run_server"><a href="#Run_server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html" target="_blank" rel="external">Server</a></p>
<h3 id="Generate_static_files"><a href="#Generate_static_files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html" target="_blank" rel="external">Generating</a></p>
<h3 id="Deploy_to_remote_sites"><a href="#Deploy_to_remote_sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/deployment.html" target="_blank" rel="external">Deployment</a></p>
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
</section>
</div>
</div>
<div class="sidebar-toggle">
<div class="sidebar-toggle-line-wrap">
<span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
<span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
<span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
</div>
</div>
<aside id="sidebar" class="sidebar">
<div class="sidebar-inner">
<section class="site-overview sidebar-panel sidebar-panel-active ">
<div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
<img class="site-author-image" itemprop="image"
src="/images/default_avatar.jpg"
alt="Death Kel" />
<p class="site-author-name" itemprop="name">Death Kel</p>
<p class="site-description motion-element" itemprop="description">能用钱解决的问题,现在我全都解决不了</p>
</div>
<nav class="site-state motion-element">
<div class="site-state-item site-state-posts">
<a href="/archives">
<span class="site-state-item-count">4</span>
<span class="site-state-item-name">日志</span>
</a>
</div>
<div class="site-state-item site-state-categories">
<a href="/categories">
<span class="site-state-item-count">0</span>
<span class="site-state-item-name">分类</span>
</a>
</div>
<div class="site-state-item site-state-tags">
<a href="/tags">
<span class="site-state-item-count">4</span>
<span class="site-state-item-name">标签</span>
</a>
</div>
</nav>
<div class="links-of-author motion-element">
<span class="links-of-author-item">
<a href="https://github.com/deathkel" target="_blank">
<i class="fa fa-github"></i> GitHub
</a>
</span>
<span class="links-of-author-item">
<a href="http://www.weibo.com/2947088267" target="_blank">
<i class="fa fa-weibo"></i> Weibo
</a>
</span>
</div>
<div class="links-of-author motion-element">
</div>
</section>
</div>
</aside>
</div>
</main>
<footer id="footer" class="footer">
<div class="footer-inner">
<div class="copyright" >
©
<span itemprop="copyrightYear">2017</span>
<span class="with-love">
<i class="icon-next-heart fa fa-heart"></i>
</span>
<span class="author" itemprop="copyrightHolder">Death Kel</span>
</div>
<div class="powered-by">
由 <a class="theme-link" href="http://hexo.io">Hexo</a> 强力驱动
</div>
<div class="theme-info">
主题 -
<a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
NexT.Muse
</a>
</div>
</div>
</footer>
<div class="back-to-top"></div>
</div>
<script type="text/javascript" src="/vendors/jquery/index.js?v=2.1.3"></script>
<script type="text/javascript" src="/vendors/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
<script type="text/javascript" src="/vendors/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
<script type="text/javascript" src="/vendors/velocity/velocity.min.js"></script>
<script type="text/javascript" src="/vendors/velocity/velocity.ui.min.js"></script>
<script type="text/javascript" src="/vendors/fancybox/source/jquery.fancybox.pack.js"></script>
<script type="text/javascript" src="/js/src/utils.js?v=0.5.0"></script>
<script type="text/javascript" src="/js/src/motion.js?v=0.5.0"></script>
<script type="text/javascript" src="/js/src/bootstrap.js?v=0.5.0"></script>
<script type="text/javascript">
var duoshuoQuery = {short_name:"http://duoshuo.com/"};
(function() {
var ds = document.createElement('script');
ds.type = 'text/javascript';ds.async = true;
ds.id = 'duoshuo-script';
ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
ds.charset = 'UTF-8';
(document.getElementsByTagName('head')[0]
|| document.getElementsByTagName('body')[0]).appendChild(ds);
})();
</script>
<script src="/vendors/ua-parser-js/dist/ua-parser.min.js"></script>
<script src="/js/src/hook-duoshuo.js"></script>
</body>
</html>