-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
655 lines (335 loc) · 18.1 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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>bibitiger的博客</title>
<meta name="author" content="bibitiger">
<meta name="description" content="shell 字符串在shell中截取 原文地址:blog.bibitiger.cn/blog/2017/11/07/shell-string-cut/ Linux 的字符串截取很有用。有八种方法。
假设有变量 var=http://www.hao.com/123.htm #号截取,删除左边字符, …">
<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="/atom.xml" rel="alternate" title="bibitiger的博客" type="application/atom+xml">
<link rel="canonical" href="http://blog.bibitiger.cn/">
<link href="/favicon.png" rel="shortcut icon">
<link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet" type="text/css">
<!--[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<script src="//libs.baidu.com/jquery/1.7.2/jquery.min.js"></script>
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,700' rel='stylesheet' type='text/css'>
<!--Fonts from Google"s Web font directory at http://google.com/webfonts -->
</head>
<body>
<div class="container">
<div class="left-col">
<div class="intrude-less">
<header id="header" class="inner"><div class="profilepic">
<!--script src="/javascripts/md5.js"></script>
<script type="text/javascript">
document.write("<img alt='Profile Picture' src='http://7xtz1f.com2.z0.glb.clouddn.com/image/octo/github/bibitigertiger.jpg-shuiyin.touxiang' style='width:160px;'/>");
</script-->
<img alt="Profile Picture" src="http://7xtz1f.com2.z0.glb.clouddn.com/image/octo/github/bibitigertiger.jpg-shuiyin" style="width:160px;"/>
<!--img alt="Profile Picture" src="/images/tiger.jpg" style="width:160px;"/-->
</div>
<h1><a href="/">bibitiger的博客</a></h1>
<p class="subtitle">把酒言欢.</p>
<nav id="main-nav"><ul class="main-navigation">
<li><a href="/">首页</a></li>
<li><a href="/blog/archives">全部文章</a></li>
</ul>
</nav>
<nav id="sub-nav">
<div class="social">
<a class="weibo" href="http://www.weibo.com/baronny" title="Weibo">Weibo</a>
<a class="jianshu" href="http://www.jianshu.com/users/f4d8eff68965/latest_articles" title="Jianshu">Jianshu</a>
<a class="dribbble" href="http://www.dribbble.com/baronny" title="Dribbble">Dribbble</a>
<a class="rss" href="/atom.xml" title="RSS">RSS</a>
</div>
</nav>
<hgroup>
</hgroup>
<section>
<h2>最新文章</h2>
<ul id="recent_posts">
<li class="post">
<a href="/blog/2017/11/07/shell-string-cut/">字符串在shell中截取</a>
</li>
<li class="post">
<a href="/blog/2017/11/06/use-sed-on-mac/">Sed在mac上的一些问题</a>
</li>
</ul>
</section>
<section>
<h2>分類</h2>
<span class='categories_tag'> <a href='/blog/categories/android' style='font-size: 100%'>Android(1)</a> <a href='/blog/categories/objective-c' style='font-size: 100%'>Objective-c(1)</a> <a href='/blog/categories/octopress' style='font-size: 100%'>Octopress(3)</a> <a href='/blog/categories/php' style='font-size: 100%'>Php(1)</a> <a href='/blog/categories/python' style='font-size: 100%'>Python(3)</a> <a href='/blog/categories/shell' style='font-size: 100%'>Shell(2)</a> <a href='/blog/categories/sheng-huo-sui-bi' style='font-size: 100%'>生活随笔(1)</a> </span>
</section>
</header>
</div>
</div>
<div class="mid-col">
<div class="mid-col-container">
<div id="content" class="inner">
<div itemscope itemtype="http://schema.org/Blog">
<article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<div class="date">
<time datetime="2017-11-07T00:40:23+08:00" data-updated="true" itemprop="datePublished"></time></div>
<div class="tags">
<a class='category' href='/blog/categories/shell/'>shell</a>
</div>
</div>
<h1 class="title" itemprop="name"><a href="/blog/2017/11/07/shell-string-cut/" itemprop="url">字符串在shell中截取</a></h1>
<div class="entry-content" itemprop="articleBody">
<h2>原文地址:<a href="http://blog.bibitiger.cn/blog/2017/11/07/shell-string-cut/">blog.bibitiger.cn/blog/2017/11/07/shell-string-cut/</a></h2>
<p><br/></p>
<hr />
<p>Linux 的字符串截取很有用。有八种方法。
假设有变量 <code>var=http://www.hao.com/123.htm</code></p>
<ol>
<li><p>#号截取,删除左边字符,保留右边字符。</p>
<p> echo ${var#*//}</p>
<p> 其中 var 是变量名,# 号是运算符,*//表示从左边开始删除第一个 // 号及左边的所有字符</p>
<p> 即删除 <code>http://</code></p>
<p> 结果是 :www.hao.com/123.htm</p></li>
</ol>
<a href="/blog/2017/11/07/shell-string-cut/" class="more-link">更多 →</a>
</div>
</article>
<article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<div class="date">
<time datetime="2017-11-06T23:15:49+08:00" data-updated="true" itemprop="datePublished"></time></div>
<div class="tags">
<a class='category' href='/blog/categories/shell/'>shell</a>
</div>
</div>
<h1 class="title" itemprop="name"><a href="/blog/2017/11/06/use-sed-on-mac/" itemprop="url">Sed在mac上的一些问题</a></h1>
<div class="entry-content" itemprop="articleBody">
<h2>原文地址:<a href="http://blog.bibitiger.cn/blog/2017/11/06/use-sed-on-mac/">blog.bibitiger.cn/blog/2017/11/06/use-sed-on-mac/</a></h2>
<p><br/></p>
<hr />
<p>今天要做一个文本拼接的活,本来很简单的事情,使用 sed /a /s轻轻松松就能搞定的事,结果因为mac的原因搞得简直痛不欲生。</p>
<p>让我们看下面一段代码</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
<span class='line-number'>4</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>$: touch test.json
</span><span class='line'>$: echo "[{"test":["abc","edf"]}" >> test.json
</span><span class='line'>$: sed -i '/test/a ,{"test1":["qwe"]}]' test.json
</span><span class='line'>$: sed -i 's/qwe/uio/g' test.json</span></code></pre></td></tr></table></div></figure>
<p>本来我们应该得出的结果是什么呢?</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
<span class='line-number'>2</span>
<span class='line-number'>3</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>$: cat test.json
</span><span class='line'> [{test:[abc,edf]}
</span><span class='line'> ,{"test1":["uio"]}]</span></code></pre></td></tr></table></div></figure>
<p>可是就是这么简单的语句,竟然出了问题,什么鬼呢?
<code>sed: 1: "/a ,{"test1":["qwe"]}]": command a expects \ followed by text</code></p>
<a href="/blog/2017/11/06/use-sed-on-mac/" class="more-link">更多 →</a>
</div>
</article>
<article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<div class="date">
<time datetime="2017-05-09T19:39:54+08:00" data-updated="true" itemprop="datePublished"></time></div>
<div class="tags">
<a class='category' href='/blog/categories/objective-c/'>objective-c</a>
</div>
</div>
<h1 class="title" itemprop="name"><a href="/blog/2017/05/09/scanning-qrcode-barcode-image-oc/" itemprop="url">Objective-c扫描二维码和条形码</a></h1>
<div class="entry-content" itemprop="articleBody">
<h2>原文地址:<a href="http://blog.bibitiger.cn/blog/2017/05/09/scanning-qrcode-barcode-image-oc/">blog.bibitiger.cn/blog/2017/04/11/install-php71-mac/</a></h2>
<p><br/></p>
<hr />
</div>
</article>
<article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<div class="date">
<time datetime="2017-05-09T19:36:40+08:00" data-updated="true" itemprop="datePublished"></time></div>
<div class="tags">
<a class='category' href='/blog/categories/python/'>python</a>
</div>
</div>
<h1 class="title" itemprop="name"><a href="/blog/2017/05/09/use-thread-in-pyqt/" itemprop="url">PyQt中Thread的使用</a></h1>
<div class="entry-content" itemprop="articleBody">
<h2>原文地址:<a href="http://blog.bibitiger.cn/blog/2017/05/09/use-thread-in-pyqt/">blog.bibitiger.cn/blog/2017/04/11/install-php71-mac/</a></h2>
<p><br/></p>
<hr />
<p>PyQt中的Thread通常使用QThread,这个个人感觉封装的很好,比如我经常喜欢这样使用C++的thread:</p>
<a href="/blog/2017/05/09/use-thread-in-pyqt/" class="more-link">更多 →</a>
</div>
</article>
<article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<div class="date">
<time datetime="2017-05-09T19:35:24+08:00" data-updated="true" itemprop="datePublished"></time></div>
<div class="tags">
<a class='category' href='/blog/categories/python/'>python</a>
</div>
</div>
<h1 class="title" itemprop="name"><a href="/blog/2017/05/09/make-loading-animation-by-qpainter/" itemprop="url">使用QPainter创建等待动画在PyQt中</a></h1>
<div class="entry-content" itemprop="articleBody">
<h2>原文地址:<a href="http://blog.bibitiger.cn/blog/2017/05/09/make-loading-animation-by-qpainter/">blog.bibitiger.cn/blog/2017/04/11/install-php71-mac/</a></h2>
<p><br/></p>
<hr />
<p>具体的代码和使用可查看<a href="https://github.com/bibitiger/testWaitProgress">github仓库</a></p>
<p>实现旋转动画还可以使用QGraphicsItemAnimation来实现,这个以后再说,今天说说用QPainter实现这个效果。</p>
<a href="/blog/2017/05/09/make-loading-animation-by-qpainter/" class="more-link">更多 →</a>
</div>
</article>
<article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<div class="date">
<time datetime="2017-04-17T22:41:22+08:00" data-updated="true" itemprop="datePublished"></time></div>
<div class="tags">
<a class='category' href='/blog/categories/python/'>python</a>
</div>
</div>
<h1 class="title" itemprop="name"><a href="/blog/2017/04/17/pythondecoratorsforfunctions/" itemprop="url">Python中的注解“@”</a></h1>
<div class="entry-content" itemprop="articleBody">
<h2>原文地址:<a href="http://blog.bibitiger.cn/blog/2017/04/17/pythondecoratorsforfunctions/">blog.bibitiger.cn/blog/2017/04/17/pythondecoratorsforfunctions/</a></h2>
<p><br/></p>
<hr />
<p>Python3.0之后加入新特性Decorators,以@为标记修饰function和class。有点类似c++的宏和java的注解。Decorators用以修饰约束function和class,分为带参数和不带参数,影响原有输出,例如类静态函数我们要表达的时候需要函数前面加上修饰@staticmethod或@classmethod,为什么这样做呢?下面用简单的例子来看一下,具体内容可以查看:<a href="http://www.python.org/dev/peps/pep-0318/">官方解释</a></p>
<a href="/blog/2017/04/17/pythondecoratorsforfunctions/" class="more-link">更多 →</a>
</div>
</article>
<article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<div class="date">
<time datetime="2017-04-11T17:10:47+08:00" data-updated="true" itemprop="datePublished"></time></div>
<div class="tags">
<a class='category' href='/blog/categories/php/'>php</a>
</div>
</div>
<h1 class="title" itemprop="name"><a href="/blog/2017/04/11/install-php71-mac/" itemprop="url">在mac上安装php7.1</a></h1>
<div class="entry-content" itemprop="articleBody">
<h2>原文地址:<a href="http://blog.bibitiger.cn/blog/2017/04/11/install-php71-mac/">blog.bibitiger.cn/blog/2017/04/11/install-php71-mac/</a></h2>
<p><br/></p>
<hr />
<p>mac上预装了PHP,但是版本是5.5.x,由于有的时候要用最新的版本,或者项目需要,我们需要不同版本的PHP经行开发。有多种办法可以搞定,比如说如果是团队开发,版本控制的话可以使用<strong><em>Vagrant</em></strong>虚拟机,这个之后再说,今天就简单的将mac上的PHP升级,以7.1版本为例,其实很简单。</p>
<figure class='code'><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class=''><span class='line'>curl -s https://php-osx.liip.ch/install.sh | bash -s 7.1</span></code></pre></td></tr></table></div></figure>
<p>在终端里运行,时间可能会有点长,视个人网络情况而定。</p>
<a href="/blog/2017/04/11/install-php71-mac/" class="more-link">更多 →</a>
</div>
</article>
<article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<div class="date">
<time datetime="2017-02-23T11:47:23+08:00" data-updated="true" itemprop="datePublished"></time></div>
<div class="tags">
<a class='category' href='/blog/categories/octopress/'>octopress</a>
</div>
</div>
<h1 class="title" itemprop="name"><a href="/blog/2017/02/23/duel-github-cant-for-baiduspiders/" itemprop="url">解决github-pages无法被百度抓取问题(octopress)</a></h1>
<div class="entry-content" itemprop="articleBody">
<h2>原文地址:<a href="http://blog.bibitiger.cn/blog/2017/02/23/duel-github-cant-for-baiduspiders/">http://blog.bibitiger.cn/blog/2017/02/23/duel-github-cant-for-baiduspiders/</a></h2>
<p><br></p>
<hr />
<p></br></p>
<p>网上已经有很多关于这个问题的解决方案,例如CDN到七牛等的镜像缓存、修改ip代理、云服务器等等,例如<a href="https://www.zhihu.com/question/30898326/answer/137735246">知乎上的问答“如何解决百度爬虫无法爬取搭建在Github上的个人博客的问题?”</a>,在此就不一一复述了。直接说一个方便的解决方案。</p>
<a href="/blog/2017/02/23/duel-github-cant-for-baiduspiders/" class="more-link">更多 →</a>
</div>
</article>
<article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<div class="date">
<time datetime="2017-02-21T15:19:29+08:00" data-updated="true" itemprop="datePublished"></time></div>
<div class="tags">
<a class='category' href='/blog/categories/sheng-huo-sui-bi/'>生活随笔</a>
</div>
</div>
<h1 class="title" itemprop="name"><a href="/blog/2017/02/21/to-south/" itemprop="url">随笔“南行“</a></h1>
<div class="entry-content" itemprop="articleBody">
<h2>原文地址:<a href="http://blog.bibitiger.cn/blog/2017/02/21/to-south/">blog.bibitiger.cn/blog/2017/02/21/to-south/</a></h2>
<p></br></p>
<hr />
<p></br></p>
<h3>南行</h3>
<p><br></p>
<a href="/blog/2017/02/21/to-south/" class="more-link">更多 →</a>
</div>
</article>
<article class="post" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<div class="meta">
<div class="date">
<time datetime="2017-02-21T14:22:35+08:00" data-updated="true" itemprop="datePublished"></time></div>
<div class="tags">
<a class='category' href='/blog/categories/octopress/'>octopress</a>
</div>
</div>
<h1 class="title" itemprop="name"><a href="/blog/2017/02/21/pull-octopress-from-github/" itemprop="url">将已有octopress从github搬移到本地</a></h1>
<div class="entry-content" itemprop="articleBody">
<h2>原文地址:<a href="http://blog.bibitiger.cn/blog/2017/02/21/pull-octopress-from-github/">blog.bibitiger.cn/blog/2017/02/21/pull-octopress-from-github/</a></h2>
<p></br></p>
<hr />
<p></br>
当我们换了电脑或者遗失了原本项目的时候,我们就需要将原来我们部署在github上的octopress博客重新搬移到本地。这里我们根据之前建立octopress项目的过程,首先清楚两个分支各自的功能:</p>
<table>
<thead>
<tr>
<th style="text-align:center;"> source </th>
<th style="text-align:center;"> octopress文件及代码,假如我们的工程根目录为octopress,source对应的就是octopress </th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:center;"> master </td>
<td style="text-align:center;"> octopress deploy时生成的缓存文件,可以认为是<em>deploy文件夹,对应于octopress/</em>deploy </td>
</tr>
</tbody>
</table>
<a href="/blog/2017/02/21/pull-octopress-from-github/" class="more-link">更多 →</a>
</div>
</article>
</div>
<nav id="pagenavi">
<a href="/posts/2" class="next">Next</a>
<div class="center"><a href="/blog/archives">Blog Archives</a></div>
</nav></div>
</div>
<footer id="footer" class="inner"><p>
Copyright © 2020 - bibitiger
<a href="http://blog.bibitiger.cn">(bibitiger的主页)
</a>
<script>
(function(){
var bp = document.createElement('script');
var curProtocol = window.location.protocol.split(':')[0];
if (curProtocol === 'https') {
bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
}
else {
bp.src = 'http://push.zhanzhang.baidu.com/push.js';
}
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(bp, s);
})();
</script>
<script>
(function(){
var src = (document.location.protocol == "http:") ? "http://js.passport.qihucdn.com/11.0.1.js?7f9c7a6f83d76c6421c5ed175eca4bee":"https://jspassport.ssl.qhimg.com/11.0.1.js?7f9c7a6f83d76c6421c5ed175eca4bee";
document.write('<script src="' + src + '" id="sozz"><\/script>');
})();
</script>
</p>
<p>
<a href="http://www.beian.miit.gov.cn/">沪ICP备18040345号
</a>
</p>
</footer>
<script src="/javascripts/slash.js"></script>
<script src="/javascripts/jquery.fancybox.pack.js"></script>
<script type="text/javascript">
(function($){
$('.fancybox').fancybox();
})(jQuery);
</script> <!-- Delete or comment this line to disable Fancybox -->
</div>
</div>
</body>
</html>