-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
587 lines (340 loc) · 17.8 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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>rank's blog</title>
<meta name="author" content="rank">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta property="og:site_name" content="rank's blog"/>
<link rel="alternate" href="/atom.xml" title="rank's blog" type="application/atom+xml">
<link rel="stylesheet" href="/css/style.css" media="screen" type="text/css">
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<!--[if lt IE 9]><script src="http://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script><![endif]-->
<script src="http://libs.baidu.com/jquery/1.8.0/jquery.min.js"></script>
</head>
<body>
<div class="wrapper">
<header id="header"><div class="title">
<h1><a href="/">rank's blog</a></h1>
<p><a href="/">Border is just for crossing</a></p>
</div>
<nav class="nav">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/archives">Archives</a></li>
<li><a href="/labs">Labs</a></li>
<li><a href="http://www.slideshare.net/ranklau/presentations">Slides</a></li>
<li><a href="/about">About</a></li>
<li><a href="/atom.xml">Feed</a></li>
</ul>
<div class="clearfix"></div>
</nav>
<div class="clearfix"></div></header>
<div class="content">
<article class="post">
<header>
<div class="icon"></div>
<time datetime="2014-03-10T13:40:27.000Z"><a href="/2014/03/10/hexo-for-blog/">Mar 10 2014</a></time>
<h1 class="title"><a href="/2014/03/10/hexo-for-blog/">用 hexo 在 github page 搭建博客</a></h1>
</header>
<div class="entry">
<p>这两天把博客新迁在 github page 上,这两天抽空注册了新域名,并且在 github pages 上搭建了新的博客,还用了逼格极高的 hexo 。 </p>
<p>在 github pages 上搭建静态博客不只 hexo ,排名前 5 的系统有:</p>
<ul>
<li><a href="https://github.com/mojombo/jekyll" target="_blank">mojombo/jekyll</a> 最著名的静态博客引擎 (ruby) </li>
<li><a href="https://github.com/imathis/octopress" target="_blank">imathis/octopress</a> jekyll 的一个框架,降低了使用难度</li>
<li><a href="https://github.com/tommy351/hexo" target="_blank">tommy351/hexo</a> 使用 NodeJS 编写的静态博客生成器</li>
<li><a href="https://github.com/getpelican/pelican" target="_blank">getpelican/pelican</a> Python 编写的静态博客生成器</li>
<li><a href="https://github.com/lepture/liquidluck" target="_blank">lepture/liquidluck</a> 同样也是 Python 的系统</li>
</ul>
<p>官方推荐的是 <a href="https://github.com/mojombo/jekyll" target="_blank">jekyll</a> 。</p>
<p>我用 hexo 主要想借机多熟悉下 NodeJS ,另外也先看了简介使用,感觉 hexo 上手也相对容易, markdown 语言来写内容。<br>如果你想对这几种静态博客进行系统比较的话,可自行测试,或 <a href="http://www.zhihu.com/question/21981094" target="_blank"> 参考这篇贴子 </a> 。</p>
<p>hexo 的配置及使用官方有比较详细的 <a href="http://zespia.tw/hexo/docs/" target="_blank"> 文档 </a> ,有一位热心同学写了较为详细的博文 《 <a href="http://ibruce.info/2013/11/22/hexo-your-blog/" target="_blank">hexo 你的博客 </a> 》 。 </p>
<p>有一些问题他没有提及,我补充一下:</p>
<ul>
<li><a href="https://github.com/tommy351/hexo/wiki/Themes" target="_blank"> 这里 </a> 有详细的官方推荐皮肤。目前我使用的是 <a href="https://github.com/heroicyang/hexo-theme-modernist" target="_blank">modernist</a> ,如果你对皮肤要求比较高的话,恐怕 theme 上没有太满意的,只能自己设计。:(</li>
<li><a href="http://zespia.tw/hexo/docs/" target="_blank"> 文档 </a> 。看上去挺全的,但很多地方『点到即止』,所以才看到有很多使用说明都是自己搭建过的同学写出来的经验之谈,不过这没关系,结合 google baidu 来使用就可以了。</li>
<li><a href="http://zespia.tw/hexo/docs/migration.html" target="_blank"> 迁移 </a> 。 关键的功能从 rss 导入功能
"hexo migrate rss <a href="http://rank.im/atom.xml">http://rank.im/atom.xml</a>" 居然不能用。我哪天 fix 了放出来给大家。</li>
</ul>
</div>
<footer class="end-sep">
<div class="clearfix"></div>
</footer>
</article>
<article class="post">
<header>
<div class="icon"></div>
<time datetime="2014-03-07T09:04:20.000Z"><a href="/2014/03/07/new-blog-start/">Mar 7 2014</a></time>
<h1 class="title"><a href="/2014/03/07/new-blog-start/">换域名,重新开博</a></h1>
</header>
<div class="entry">
<p>注册了一个比较帅的域名 <a href="http://rank.im">rank.im</a> ,用于个人站点。<br>把原来的很古老的博客系统换成现在比较流行,逼格比较高的 hexo 。 </p>
<p>虽然原来我的博客在 G reader 的订阅数也有 1K 多,抛弃历史包袱从头再开始是个不错的选择。:)<br>此篇是个新的开始。</p>
</div>
<footer class="end-sep">
<div class="clearfix"></div>
</footer>
</article>
<article class="post">
<header>
<div class="icon"></div>
<time datetime="2013-10-09T11:12:05.000Z"><a href="/2013/10/09/cutandslice/">Oct 9 2013</a></time>
<h1 class="title"><a href="/2013/10/09/cutandslice/">android/ios 开发切图神器 cutandslice</a></h1>
</header>
<div class="entry">
<p>在多端开发时切图是个很痛苦的事,如果有一个很好的工具必将解决掉很多很繁琐的工作。<br>最近试用了一款软件「 cutandslice 」,觉得不错,推荐给大家。<br>官网: <a href="http://www.cutandslice.me/" target="_blank">http://www.cutandslice.me/</a><br>作者从简介上来看是一名 ue 设计师。 </p>
<p>用了之后你会发现其实开发的原理不难:<br>用了很多 PS 里自己的「宏」来解决问题,程序只处理了规则( rule )。</p>
<p>这个思路很赞。</p>
<p><img src="http://www.cutandslice.me/css/layout/v1/ui/plugin.png" alt="'cutandslice'"></p>
</div>
<footer class="end-sep">
<div class="alignleft">
<a href="/2013/10/09/cutandslice/#more" class="more-link">Read More</a>
</div>
<div class="clearfix"></div>
</footer>
</article>
<article class="post">
<header>
<div class="icon"></div>
<time datetime="2012-12-13T06:54:40.000Z"><a href="/2012/12/13/get-script-path/">Dec 13 2012</a></time>
<h1 class="title"><a href="/2012/12/13/get-script-path/">取得当前脚本元素的路径的一个特例</a></h1>
</header>
<div class="entry">
<p>在正常情况下,无 defer 或 async 属性要准确取得当前脚本执行路径,在不同浏览器里有两种办法:</p>
<ol>
<li>在 <a href="https://developer.mozilla.org/en-US/docs/Web/API/document.currentScript" target="_blank">MDC</a> 里可查看到用 document.currentScript 拿到当前运用的 script 路径。除此属性外还可通过它的子属性 「 document.currentScript.async 」 来查看「异步」还是「同步」加载。</li>
<li>用 document.scripts 得到最后一个 script.src ,但需注意 readyState 是否为 「 interactive 」状态。</li>
</ol>
</div>
<footer class="end-sep">
<div class="alignleft">
<a href="/2012/12/13/get-script-path/#more" class="more-link">Read More</a>
</div>
<div class="clearfix"></div>
</footer>
</article>
<article class="post">
<header>
<div class="icon"></div>
<time datetime="2012-09-12T03:11:54.000Z"><a href="/2012/09/12/fix-swfupload2.5-2/">Sep 12 2012</a></time>
<h1 class="title"><a href="/2012/09/12/fix-swfupload2.5-2/">SWFUpload 2.5 bug 修改 (2)</a></h1>
</header>
<div class="entry">
<p>在 github 上我放了一个 <a href="https://github.com/ranklau/repos/tree/master/labs/swfupload2.5-fixed" target="_blank"> 修改版 </a> ,有兴趣的同学可以测试下性能。<br>需要注意的是,要在支持 PHP 的 Webserver 下运行。</p>
<h2 id="-">再遇问题</h2>
<p>经过上一轮的 SWFUpload 修改两周后有人反馈:</p>
<ul>
<li>上传速度非常慢,上传 8 张图片,有时甚至 8 分钟都没上传完;</li>
<li>其次是上传图片数量到某个阈值就无法上传;</li>
</ul>
<p>Debug 了一个下午,发现:</p>
<ul>
<li>问题 1 上传速度慢的问题,只存在 IE 里。<ul>
<li>我也觉得很奇怪,为什么 Flash 的性能还和浏览器有差别</li>
</ul>
</li>
<li>问题 2 不是 Flash 的问题,与脚本使用有关<ul>
<li>经查问题发现 Flash 用 css 隐藏之后,在 IE 下压缩和上传都无法 work (这比较好查);</li>
</ul>
</li>
</ul>
</div>
<footer class="end-sep">
<div class="alignleft">
<a href="/2012/09/12/fix-swfupload2.5-2/#more" class="more-link">Read More</a>
</div>
<div class="clearfix"></div>
</footer>
</article>
<article class="post">
<header>
<div class="icon"></div>
<time datetime="2012-08-18T07:08:51.000Z"><a href="/2012/08/18/fix-swfupload2.5-1/">Aug 18 2012</a></time>
<h1 class="title"><a href="/2012/08/18/fix-swfupload2.5-1/">SWFUpload 2.5 bug 修改 (1)</a></h1>
</header>
<div class="entry">
<h2 id="-swfupload">关于 SWFUpload</h2>
<blockquote>
<p>SWFUpload 是一个客户端文件上传工具,最初由 Vinterwebb.se 开发,它通过整合 Flash 与 JavaScript 技术为 WEB 开发者提供了一个具有丰富功能继而超越传统标签的文件上传模式。</p>
</blockquote>
<p>主要特点:</p>
<ul>
<li>可以同时上传多个文件;</li>
<li>类似 AJAX 的无刷新上传;</li>
<li>可以显示上传进度;</li>
<li>良好的浏览器兼容性;</li>
<li>兼容其他 JavaScript 库 ( 例如: jQuery, Prototype 等 ) ;</li>
<li>支持 Flash 8 和 Flash 9 ;</li>
</ul>
<blockquote>
<p>SWFUpload 不同于其他基于 Flash 构建的上传工具,它有着优雅的代码设计,开发者可以利用 XHTML 、 CSS 和 JavaScript 来随心所欲的定制它在浏览器下的外观;它还提供了一组简明的 JavaScript 事件,借助它们开发者可以方便的在文件上传过程中更新页面内容来营造各种动态效果。</p>
</blockquote>
<p>这么多说的就是一个意思, SWFUpload 使用灵活方便,不少人在用。<br>但是,它在我们项目实际应用中发现问题。
</div>
<footer class="end-sep">
<div class="alignleft">
<a href="/2012/08/18/fix-swfupload2.5-1/#more" class="more-link">Read More</a>
</div>
<div class="clearfix"></div>
</footer>
</article>
<article class="post">
<header>
<div class="icon"></div>
<time datetime="2012-06-26T09:08:31.000Z"><a href="/2012/06/26/tourism-in-shanxi/">Jun 26 2012</a></time>
<h1 class="title"><a href="/2012/06/26/tourism-in-shanxi/">山西的几张照片</a></h1>
</header>
<div class="entry">
<p>出门旅游在外, iPhone 4S 这样的设备拍照比较方便,可以不用拿沉重的单反了。
这次用 iPhone 拍的照片除了象素低点,广角和长焦都不够用以外,其他的还蛮好的。</p>
<p>大同或平遥都是有历史的城市,所以我把照片去色,用黑白体现历史感。</p>
<p><img src="/images/shanxi/IMG_0691.JPG" alt=""></p>
</div>
<footer class="end-sep">
<div class="alignleft">
<a href="/2012/06/26/tourism-in-shanxi/#more" class="more-link">Read More</a>
</div>
<div class="clearfix"></div>
</footer>
</article>
<article class="post">
<header>
<div class="icon"></div>
<time datetime="2012-01-05T06:00:03.000Z"><a href="/2012/01/05/webkit-css3-blink/">Jan 5 2012</a></time>
<h1 class="title"><a href="/2012/01/05/webkit-css3-blink/">webkit 里会出现突然闪一下的问题</a></h1>
</header>
<div class="entry">
<h2 id="-">问题</h2>
<p>有用户反馈在 chrome 下出现屏幕会闪,但不是每次都能复现。 </p>
<h2 id="-">解决办法</h2>
<figure class="highlight css"><pre><span class="class">.no-flick</span><span class="rules">{<span class="rule"><span class="attribute">-webkit-backface-visibility</span>:<span class="value"> hidden</span></span>; <span class="comment">/*但不能用于 sprite 雪碧图*/</span><span class="rule">}</span></span>
<span class="comment">/* 或 */</span>
<span class="class">.no-flick</span><span class="rules">{<span class="rule"><span class="attribute">-webkit-transform</span>:<span class="value"><span class="function">translate3d(<span class="number">0</span>,<span class="number">0</span>,<span class="number">0</span>)</span></span></span>;<span class="rule">}</span></span>
</pre></figure>
</div>
<footer class="end-sep">
<div class="alignleft">
<a href="/2012/01/05/webkit-css3-blink/#more" class="more-link">Read More</a>
</div>
<div class="clearfix"></div>
</footer>
</article>
<article class="post">
<header>
<div class="icon"></div>
<time datetime="2011-08-08T04:05:22.000Z"><a href="/2011/08/08/tourism-in-hunlunbeier/">Aug 8 2011</a></time>
<h1 class="title"><a href="/2011/08/08/tourism-in-hunlunbeier/">呼伦贝尔游的几张照片</a></h1>
</header>
<div class="entry">
<p><img src="/images/hunlunbeier/6016693788_149811e489_z.jpg" alt="">
</div>
<footer class="end-sep">
<div class="alignleft">
<a href="/2011/08/08/tourism-in-hunlunbeier/#more" class="more-link">Read More</a>
</div>
<div class="clearfix"></div>
</footer>
</article>
<article class="post">
<header>
<div class="icon"></div>
<time datetime="2011-04-07T15:45:43.000Z"><a href="/2011/04/07/user-behavior-record-data/">Apr 7 2011</a></time>
<h1 class="title"><a href="/2011/04/07/user-behavior-record-data/">用户行为系统 如何记录行为数据</a></h1>
</header>
<div class="entry">
<p>最近准备把我主持并负责的前端用户行为系统开源了,这个系统我们内部命名为 marmot 。中文为「土拨鼠」,有挖掘之意。
除我之外,还有两位开发人员分别是: seven 和 cyhello 。</p>
<p>本篇文章简短的说明一下 marmot 的 log 重点问题:</p>
<ol>
<li>解决不同分辩率的策略.</li>
<li>解决粒度过细的问题.</li>
<li>还原路径问题.</li>
<li>何时发回数据及数据量的问题</li>
</ol>
</div>
<footer class="end-sep">
<div class="alignleft">
<a href="/2011/04/07/user-behavior-record-data/#more" class="more-link">Read More</a>
</div>
<div class="clearfix"></div>
</footer>
</article>
<nav id="pagination">
<a href="/page/2/" class="next">Next</a>
<div class="clearfix"></div>
</nav></div>
</div>
<div class="widget-wrapper">
<aside id="sidebar">
<div class="widget tag first">
<h3 class="title">Categories</h3>
<ul class="entry">
<li><a href="/categories/life/">life</a><small>5</small></li>
<li><a href="/categories/tech/">tech</a><small>16</small></li>
</ul>
</div>
<div class="widget recent-posts">
<h3 class="title">Recent Posts</h3>
<ul class="entry">
<li>
<a href="/2014/03/10/hexo-for-blog/">用 hexo 在 github page 搭建博客</a>
</li>
<li>
<a href="/2014/03/07/new-blog-start/">换域名,重新开博</a>
</li>
<li>
<a href="/2013/10/09/cutandslice/">android/ios 开发切图神器 cutandslice</a>
</li>
<li>
<a href="/2012/12/13/get-script-path/">取得当前脚本元素的路径的一个特例</a>
</li>
<li>
<a href="/2012/09/12/fix-swfupload2.5-2/">SWFUpload 2.5 bug 修改 (2)</a>
</li>
</ul>
</div>
<div class="widget blogroll">
<h3 class="title">Links</h3>
<ul class="entry">
<li><a href="http://wuduoyi.com/" target="_blank">wuduoyi</a></li>
<li><a href="http://fex.baidu.com/" target="_blank">FEX team</a></li>
</ul>
</div>
</aside>
<div class="clearfix"></div>
</div>
<footer id="footer"><div class="copyright">
© 2015 <a href="/">rank</a>
</div>
<div class="theme-copyright">
Theme by <a href="https://github.com/orderedlist" target="_blank">orderedlist</a>
|
Redesign by <a href="http://heroicyang.com/" target="_blank">Heroic Yang</a>
</div>
<div class="clearfix"></div></footer>
<script src="/js/scale.fix.js"></script>
<script src="/js/jquery.imagesloaded.min.js"></script>
<script src="/js/gallery.js"></script>
<script type="text/javascript">
var duoshuoQuery = { short_name: 'rank' };
(function() {
var ds = document.createElement('script');
ds.type = 'text/javascript';
ds.async = true;
ds.src = 'http://static.duoshuo.com/embed.js';
ds.charset = 'UTF-8';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ds);
})();
</script>
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css" media="screen" type="text/css">
<script src="/fancybox/jquery.fancybox.pack.js"></script>
<script type="text/javascript">
(function($){
$('.fancybox').fancybox();
})(jQuery);
</script>
</body>
</html>