-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
562 lines (325 loc) · 17 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" >
<title>hzzcc's blog</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description">
<meta property="og:type" content="website">
<meta property="og:title" content="hzzcc's blog">
<meta property="og:url" content="http://hzzcc.github.io/index.html">
<meta property="og:site_name" content="hzzcc's blog">
<meta property="og:description">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="hzzcc's blog">
<meta name="twitter:description">
<link rel="alternative" href="/atom.xml" title="hzzcc's blog" type="application/atom+xml">
<link rel="icon" href="/favicon.png">
<link rel="stylesheet" href="/css/style.css">
</head>
<body>
<div id="container">
<div class="left-col">
<div class="overlay"></div>
<div class="intrude-less">
<header id="header" class="inner">
<a href="/" class="profilepic">
<img lazy-src="https://avatars1.githubusercontent.com/u/6861655?v=3&s=460" class="js-avatar">
</a>
<hgroup>
<h1 class="header-author"><a href="/">hzzcc</a></h1>
</hgroup>
<div class="switch-btn">
<div class="icon">
<div class="icon-ctn">
<div class="icon-wrap icon-house" data-idx="0">
<div class="birdhouse"></div>
<div class="birdhouse_holes"></div>
</div>
<div class="icon-wrap icon-ribbon hide" data-idx="1">
<div class="ribbon"></div>
</div>
<div class="icon-wrap icon-me hide" data-idx="3">
<div class="user"></div>
<div class="shoulder"></div>
</div>
</div>
</div>
<div class="tips-box hide">
<div class="tips-arrow"></div>
<ul class="tips-inner">
<li>菜单</li>
<li>标签</li>
<li>关于我</li>
</ul>
</div>
</div>
<div class="switch-area">
<div class="switch-wrap">
<section class="switch-part switch-part1">
<nav class="header-menu">
<ul>
<li><a href="/">主页</a></li>
<li><a href="/archives">所有文章</a></li>
<li><a href="/tags/React-Native">React Native</a></li>
<li><a href="/tags/git">git</a></li>
</ul>
</nav>
<nav class="header-nav">
<div class="social">
<a class="github" target="_blank" href="https://github.com/hzzcc" title="github">github</a>
<a class="weibo" target="_blank" href="#" title="weibo">weibo</a>
<a class="rss" target="_blank" href="#" title="rss">rss</a>
<a class="zhihu" target="_blank" href="#" title="zhihu">zhihu</a>
</div>
</nav>
</section>
<section class="switch-part switch-part2">
<div class="widget tagcloud" id="js-tagcloud">
<a href="/tags/React-Native/" style="font-size: 20px;">React Native</a> <a href="/tags/git/" style="font-size: 10px;">git</a> <a href="/tags/http协议/" style="font-size: 10px;">http协议</a> <a href="/tags/关联命令/" style="font-size: 10px;">关联命令</a> <a href="/tags/前端进阶/" style="font-size: 10px;">前端进阶</a>
</div>
</section>
<section class="switch-part switch-part3">
<div id="js-aboutme">我是谁,我从哪里来,我到哪里去?我就是我,是颜色不一样的吃货…</div>
</section>
</div>
</div>
</header>
</div>
</div>
<div class="mid-col">
<nav id="mobile-nav">
<div class="overlay">
<div class="slider-trigger"></div>
<h1 class="header-author js-mobile-header hide">hzzcc</h1>
</div>
<div class="intrude-less">
<header id="header" class="inner">
<div class="profilepic">
<img lazy-src="https://avatars1.githubusercontent.com/u/6861655?v=3&s=460" class="js-avatar">
</div>
<hgroup>
<h1 class="header-author">hzzcc</h1>
</hgroup>
<nav class="header-menu">
<ul>
<li><a href="/">主页</a></li>
<li><a href="/archives">所有文章</a></li>
<li><a href="/tags/React-Native">React Native</a></li>
<li><a href="/tags/git">git</a></li>
<div class="clearfix"></div>
</ul>
</nav>
<nav class="header-nav">
<div class="social">
<a class="github" target="_blank" href="https://github.com/hzzcc" title="github">github</a>
<a class="weibo" target="_blank" href="#" title="weibo">weibo</a>
<a class="rss" target="_blank" href="#" title="rss">rss</a>
<a class="zhihu" target="_blank" href="#" title="zhihu">zhihu</a>
</div>
</nav>
</header>
</div>
</nav>
<div class="body-wrap">
<article id="post-React Native 性能优化" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/06/04/React Native 性能优化/" class="article-date">
<time datetime="2016-06-04T12:24:33.000Z" itemprop="datePublished">2016-06-04</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/06/04/React Native 性能优化/">React Native 性能优化</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>React native 是facebook提供的可媲美原生应用的js框架,但是做一些性能优化还是有必要的。参考官方文档,列出了以下优化点。</p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/React-Native/">React Native</a></li></ul>
</div>
<p class="article-more-link">
<a href="/2016/06/04/React Native 性能优化/#more">more >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-HTTP消息中header头部信息的讲解" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/05/31/HTTP消息中header头部信息的讲解/" class="article-date">
<time datetime="2016-05-30T21:46:32.000Z" itemprop="datePublished">2016-05-31</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/05/31/HTTP消息中header头部信息的讲解/">HTTP消息中header头部信息的讲解</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p><em>HTTP消息包括客户机向服务器的请求消息和服务器向客户机的响应消息。这两种类型的消息由一个起始行,一个或者多个头域,一个只是头域结束的空行和可选的消息体组成。HTTP的头域包括通用头,请求头,响应头和实体头四个部分。每个头域由一个域名,冒号(:)和域值三部分组成。</em></p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/http协议/">http协议</a></li></ul>
</div>
<p class="article-more-link">
<a href="/2016/05/31/HTTP消息中header头部信息的讲解/#more">more >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-前端进阶所需了解的知识" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/05/29/前端进阶所需了解的知识/" class="article-date">
<time datetime="2016-05-29T01:24:41.000Z" itemprop="datePublished">2016-05-29</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/05/29/前端进阶所需了解的知识/">前端进阶所需了解的知识</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<ol>
<li>DNS 解析,使用 CDN,把资源请求分散到多个域名上去;</li>
<li>理解 HTTP Headers (Expires、Cache-Control、If-Modified-Since)</li>
<li>Steve Souders 的所有高性能网页优化规则(参考:High Performance Websites 一书)</li>
<li>如何解决 PageSpeed、YSlow、Chrome Dev Tools Audit、Chrome Dev Tools Timeline 等工具列出的所有问题;</li>
<li>何时把任务传到服务器,何时适合传到客户端;</li>
<li>缓存,预取和延迟加载技术的使用;</li>
<li>原生 JavaScript,知道何时从头开始做,何时参考别人的代码,同时可以评估这样做的优缺点;</li>
<li>最新的 MVC Javascript 库知识以及用法;</li>
<li>CSS 标准的知识与用法;</li>
<li>JavaScript的计算机科学部分的知识(内存管理,垃圾收集算法等等)</li>
</ol>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/前端进阶/">前端进阶</a></li></ul>
</div>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-git-alias-设置" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/05/29/git-alias-设置/" class="article-date">
<time datetime="2016-05-29T01:11:11.000Z" itemprop="datePublished">2016-05-29</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/05/29/git-alias-设置/">git alias 设置</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<ol>
<li><p>在用户目录下创建文件</p>
<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">touch ~/.gitconfig</span><br></pre></td></tr></table></figure>
</li>
<li><p>写入如下内容</p>
<figure class="highlight plain"><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></pre></td><td class="code"><pre><span class="line">[alias]</span><br><span class="line"> st = status</span><br><span class="line"> ci = commit</span><br><span class="line"> co = checkout</span><br><span class="line"> br = branch</span><br><span class="line"> unstage = reset HEAD --</span><br><span class="line"> last = log -1 HEAD</span><br></pre></td></tr></table></figure>
</li>
</ol>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/git/">git</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/关联命令/">关联命令</a></li></ul>
</div>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-React-Native-打包失败" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/05/28/React-Native-打包失败/" class="article-date">
<time datetime="2016-05-28T14:17:32.000Z" itemprop="datePublished">2016-05-28</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/05/28/React-Native-打包失败/">React Native 打包失败</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>一般我们在打包时,下面命令就可以了<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">react-native bundle --minify --entry-file index.ios.js --bundle-output ios/main.jsbundle --platform ios --dev false</span><br></pre></td></tr></table></figure></p>
<p>当遇到以下错误时<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">FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory</span><br></pre></td></tr></table></figure></p>
<p>需要调整node最大空间,这个时候需要指定最初安装react-native-cli的绝对位置,而我的位置是~/git/nvm/versions/node/v5.6.0/bin/react-native,所以命令如下:<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">node --max-old-space-size=4096 ~/git/nvm/versions/node/v5.6.0/bin/react-native bundle --minify --entry-file index.ios.js --bundle-output ios/main.jsbundle --platform ios --dev false</span><br></pre></td></tr></table></figure></p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/React-Native/">React Native</a></li></ul>
</div>
<div class="clearfix"></div>
</div>
</div>
</article>
</div>
<footer id="footer">
<div class="outer">
<div id="footer-info">
<div class="footer-left">
© 2016 hzzcc
</div>
<div class="footer-right">
<a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/litten/hexo-theme-yilia" target="_blank">Yilia</a> by Litten
</div>
</div>
</div>
</footer>
</div>
<div id="toTop">
<a href="#">▲</a>
<a href="#footer">▼</a>
</div>
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
<script>
var yiliaConfig = {
fancybox: true,
mathjax: true,
animate: true,
isHome: true,
isPost: false,
isArchive: false,
isTag: false,
isCategory: false,
open_in_new: false
}
</script>
<script src="http://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min.js"></script>
<script src="/js/main.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
processEscapes: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
}
});
MathJax.Hub.Queue(function() {
var all = MathJax.Hub.getAllJax(), i;
for(i=0; i < all.length; i += 1) {
all[i].SourceElement().parentNode.className += ' has-jax';
}
});
</script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</div>
</body>
</html>