Githug 过关攻略

Notice: The article is not finished.

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
********************************************************************************
* Githug *
********************************************************************************

Name: cherry-pick
Level: 42
Difficulty: ***

Your new feature isn't worth the time and you're going to delete it. But it has one commit that fills in `README` file, and you want this commit to be on the ma ster as well.

$ git branch
master
new-feature
$ git checkout new-feature
Switched to branch 'new-feature'
$ git log -p
commit ea2a47c19b85fc321e2737ddc49db3deeba3a1b5
Author: Andrey <aslushnikov@gmail.com>
Date: Wed Mar 28 02:28:35 2012 +0400

some small fixes

diff --git a/new-feature.js b/new-feature.js
index a214bad..14ad8f1 100644
--- a/new-feature.js
+++ b/new-feature.js
@@ -1,3 +1,4 @@
function newFeature () {
console.log("Now the feature works!");
+ console.log("And the output even more nice!");
}

commit 4a1961bce62840eaef9c4392fe5cc799e38c9b7b
Author: Andrey <aslushnikov@gmail.com>
Date: Wed Mar 28 02:27:18 2012 +0400

Fixed feature

diff --git a/new-feature.js b/new-feature.js
index d502e68..a214bad 100644
--- a/new-feature.js
+++ b/new-feature.js
@@ -1,3 +1,3 @@
function newFeature () {
- throw new Error("Not implemented yet! :(");
+ console.log("Now the feature works!");
}

commit ca32a6dac7b6f97975edbe19a4296c2ee7682f68
Author: Andrey <aslushnikov@gmail.com>
:
function newFeature () {
console.log("Now the feature works!");
+ console.log("And the output even more nice!");
}

commit 4a1961bce62840eaef9c4392fe5cc799e38c9b7b
Author: Andrey <aslushnikov@gmail.com>
Date: Wed Mar 28 02:27:18 2012 +0400

Fixed feature

diff --git a/new-feature.js b/new-feature.js
index d502e68..a214bad 100644
--- a/new-feature.js
+++ b/new-feature.js
@@ -1,3 +1,3 @@
function newFeature () {
- throw new Error("Not implemented yet! :(");
+ console.log("Now the feature works!");
}

commit ca32a6dac7b6f97975edbe19a4296c2ee7682f68
Author: Andrey <aslushnikov@gmail.com>
Date: Wed Mar 28 02:25:51 2012 +0400

Filled in README.md with proper input

diff --git a/README.md b/README.md
index 54f3308..c60c612 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1 @@
-I'll fill in the file some time later..
-
+This project is a FAKE.

commit 58a8c8edcfdd00c6d8cce9aada8f987a1677571f
Author: Andrey <aslushnikov@gmail.com>
Date: Wed Mar 28 02:24:41 2012 +0400

Added a stub for the feature

diff --git a/new-feature.js b/new-feature.js
new file mode 100644
index 0000000..d502e68
--- /dev/null
+++ b/new-feature.js
@@ -0,0 +1,3 @@
+function newFeature () {
+ throw new Error("Not implemented yet! :(");
+}

commit ea3dbcc5e2d2359698c3606b0ec44af9f76def54
Author: Andrey <aslushnikov@gmail.com>
Date: Wed Mar 28 02:20:32 2012 +0400

Initial commit

diff --git a/README.md b/README.md
new file mode 100644
index 0000000..54f3308
--- /dev/null
+++ b/README.md
@@ -0,0 +1,2 @@
+I'll fill in the file some time later..
+

$ git checkout master
Switched to branch 'master'

$ git cherry-pick ca32a6dac7b6f97975edbe19a4296c2ee7682f68
[master e679245] Filled in README.md with proper input
Author: Andrey <aslushnikov@gmail.com>
Date: Wed Mar 28 02:25:51 2012 +0400
1 file changed, 1 insertion(+), 2 deletions(-)

$

$ githug
********************************************************************************
* Githug *
********************************************************************************
Congratulations, you have solved the level!
阅读更多...

Linux下PHP插件自动编译脚本

注意:如果你不是闲的蛋疼,你可以用apt或者yum等包管理自动安装。。。

需要手动安装的看这里Linux下手动编译为PHP添加扩展

首先,必须的按照那篇文所说,先准备好源码包,然后在ext目录里建立build.sh文件加入脚本内容(或者直接下载本文附件)

脚本内容中需要自行替换的部分有

  1. sourceDir=插件源码目录ext路径(必须以/结尾)
  2. phpDir=PHP安装目录(必须以/结尾)
  3. extension_dir=PHP插件目录(必须以/结尾,不知道请用phpinfo看)
阅读更多...

Linux(Ubuntu) 下时区的修改方法

刚搞到一台HK的Ubuntu,花了N小时一个个配置好nginx+php+mysql+redis环境之后,才想起有一键安装包这种东西ORZ。。

本文内容于Ubuntu14.04下尝试,不保证本文内容在其他版本的Linux下适用。

言归正传,发现默认的时区是GMT+000,每次看时间不对,很不爽有木有

更改方法如下:
(我是在root下执行的,如果不能正确设置,请尝试使用切换到root用户或使用sudo命令)

阅读更多...

win10报告字体文件无效问题

win10 提示字体文件无效

今天安装字体结果死活报告字体文件无效。。
以为是网络抽风(从境外网站下载因为众所周知的原因)或者是格式不兼容,然后重新下载了好几遍。。
最后搜了下,发现win10相同情况的很多,
解决方案:开启被禁用的windows firewall服务。
(巨硬特技还真是炫酷啊,搞个字体防火墙也要来插一脚)

请我喝杯咖啡吧~

支付宝
微信