抱歉,您的浏览器无法访问本站

本页面需要浏览器支持(启用)JavaScript


了解详情 >

Enable Dragging With Three Finger :

System Preferences -> Accessibility -> Mouse & Trackpad -> Trackpad Options.

1. Common Soft

  1. Chrome
  2. NeteaseMusic

2. Dev Tools

2.1 general dev tool

  1. Macdown
  2. Alfred
  3. SubLime Text
  4. Homebrew
  5. Iterm2
  6. Oh-my-zsh
  7. PyCharm & IDEA

brew (install 过程会自动需要 Xcode 被安装)
brew install wget tree

待定 wget https://bootstrap.pypa.io/get-pip.py

待定 sudo python get-pip.py

2.2 iterm & zsh

Iterm2 Change Font

Iterm2 -> Preference -> Profiles -> Text -> Change Font -> 17pt Courier New Bold

Iterm2 Hide scrollbars And title bar

Preference -> Appearance

取消 show per-pane title bar with split panes.
勾选 Hide scrollbars

Iterm2 Color Presets

Iterm2 -> Preference -> Profiles -> Color -> Color Presets -> your_theme

maybe Atom, Brogrammer, Darkside

Zsh astro theme

Iterm2 -> Preference -> Profiles -> 右下角 -> import JSON profiles -> HotKey Window.json (MyProfiles)

HotKey Window.json
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
{
"Working Directory" : "\/Users\/blair",
"Prompt Before Closing 2" : false,
"Selected Text Color" : {
"Green Component" : 0,
"Red Component" : 0,
"Blue Component" : 0
},
"Rows" : 25,
"Ansi 11 Color" : {
"Green Component" : 1,
"Red Component" : 1,
"Blue Component" : 0.3333333432674408
},
"Use Italic Font" : true,
"HotKey Characters" : "",
"Foreground Color" : {
"Green Component" : 0.73333334922790527,
"Red Component" : 0.73333334922790527,
"Blue Component" : 0.73333334922790527
},
"HotKey Window Floats" : true,
"Right Option Key Sends" : 0,
"Character Encoding" : 4,
"Selection Color" : {
"Green Component" : 0.8353000283241272,
"Red Component" : 0.70980000495910645,
"Blue Component" : 1
},
"Mouse Reporting" : true,
"Ansi 4 Color" : {
"Green Component" : 0,
"Red Component" : 0,
"Blue Component" : 0.73333334922790527
},
"Non-ASCII Anti Aliased" : true,
"Sync Title" : false,
"Disable Window Resizing" : true,
"Description" : "Default",
"Close Sessions On End" : true,
"Jobs to Ignore" : [
"rlogin",
"ssh",
"slogin",
"telnet"
],
"Scrollback Lines" : 1000,
"HotKey Window Reopens On Activation" : false,
"Prevent Opening in a Tab" : false,
"Flashing Bell" : false,
"Cursor Guide Color" : {
"Red Component" : 0.70213186740875244,
"Color Space" : "sRGB",
"Blue Component" : 1,
"Alpha Component" : 0.25,
"Green Component" : 0.9268307089805603
},
"BM Growl" : true,
"Ansi 3 Color" : {
"Green Component" : 0.73333334922790527,
"Red Component" : 0.73333334922790527,
"Blue Component" : 0
},
"Use Non-ASCII Font" : false,
"Link Color" : {
"Red Component" : 0,
"Color Space" : "sRGB",
"Blue Component" : 0.73423302173614502,
"Alpha Component" : 1,
"Green Component" : 0.35916060209274292
},
"Shortcut" : "",
"Background Image Location" : "",
"Bold Color" : {
"Green Component" : 1,
"Red Component" : 1,
"Blue Component" : 1
},
"Unlimited Scrollback" : false,
"Custom Command" : "No",
"HotKey Key Code" : 49,
"Keyboard Map" : {
"0xf700-0x260000" : {
"Text" : "[1;6A",
"Action" : 10
},
"0x37-0x40000" : {
"Text" : "0x1f",
"Action" : 11
},
"0x32-0x40000" : {
"Text" : "0x00",
"Action" : 11
},
"0xf709-0x20000" : {
"Text" : "[17;2~",
"Action" : 10
},
"0xf70c-0x20000" : {
"Text" : "[20;2~",
"Action" : 10
},
"0xf729-0x20000" : {
"Text" : "[1;2H",
"Action" : 10
},
"0xf72b-0x40000" : {
"Text" : "[1;5F",
"Action" : 10
},
"0xf705-0x20000" : {
"Text" : "[1;2Q",
"Action" : 10
},
"0xf703-0x260000" : {
"Text" : "[1;6C",
"Action" : 10
},
"0xf700-0x220000" : {
"Text" : "[1;2A",
"Action" : 10
},
"0xf701-0x280000" : {
"Text" : "0x1b 0x1b 0x5b 0x42",
"Action" : 11
},
"0x38-0x40000" : {
"Text" : "0x7f",
"Action" : 11
},
"0x33-0x40000" : {
"Text" : "0x1b",
"Action" : 11
},
"0xf703-0x220000" : {
"Text" : "[1;2C",
"Action" : 10
},
"0xf701-0x240000" : {
"Text" : "[1;5B",
"Action" : 10
},
"0xf70d-0x20000" : {
"Text" : "[21;2~",
"Action" : 10
},
"0xf702-0x260000" : {
"Text" : "[1;6D",
"Action" : 10
},
"0xf729-0x40000" : {
"Text" : "[1;5H",
"Action" : 10
},
"0xf706-0x20000" : {
"Text" : "[1;2R",
"Action" : 10
},
"0x34-0x40000" : {
"Text" : "0x1c",
"Action" : 11
},
"0xf700-0x280000" : {
"Text" : "0x1b 0x1b 0x5b 0x41",
"Action" : 11
},
"0x2d-0x40000" : {
"Text" : "0x1f",
"Action" : 11
},
"0xf70e-0x20000" : {
"Text" : "[23;2~",
"Action" : 10
},
"0xf702-0x220000" : {
"Text" : "[1;2D",
"Action" : 10
},
"0xf703-0x280000" : {
"Text" : "0x1b 0x1b 0x5b 0x43",
"Action" : 11
},
"0xf700-0x240000" : {
"Text" : "[1;5A",
"Action" : 10
},
"0xf707-0x20000" : {
"Text" : "[1;2S",
"Action" : 10
},
"0xf70a-0x20000" : {
"Text" : "[18;2~",
"Action" : 10
},
"0x35-0x40000" : {
"Text" : "0x1d",
"Action" : 11
},
"0xf70f-0x20000" : {
"Text" : "[24;2~",
"Action" : 10
},
"0xf703-0x240000" : {
"Text" : "[1;5C",
"Action" : 10
},
"0xf701-0x260000" : {
"Text" : "[1;6B",
"Action" : 10
},
"0xf702-0x280000" : {
"Text" : "0x1b 0x1b 0x5b 0x44",
"Action" : 11
},
"0xf72b-0x20000" : {
"Text" : "[1;2F",
"Action" : 10
},
"0x36-0x40000" : {
"Text" : "0x1e",
"Action" : 11
},
"0xf708-0x20000" : {
"Text" : "[15;2~",
"Action" : 10
},
"0xf701-0x220000" : {
"Text" : "[1;2B",
"Action" : 10
},
"0xf70b-0x20000" : {
"Text" : "[19;2~",
"Action" : 10
},
"0xf702-0x240000" : {
"Text" : "[1;5D",
"Action" : 10
},
"0xf704-0x20000" : {
"Text" : "[1;2P",
"Action" : 10
}
},
"Ansi 14 Color" : {
"Green Component" : 1,
"Red Component" : 0.3333333432674408,
"Blue Component" : 1
},
"Ansi 2 Color" : {
"Green Component" : 0.73333334922790527,
"Red Component" : 0,
"Blue Component" : 0
},
"Send Code When Idle" : false,
"ASCII Anti Aliased" : true,
"Tags" : [

],
"Ansi 9 Color" : {
"Green Component" : 0.3333333432674408,
"Red Component" : 1,
"Blue Component" : 0.3333333432674408
},
"Use Bold Font" : true,
"Silence Bell" : false,
"Ansi 12 Color" : {
"Green Component" : 0.3333333432674408,
"Red Component" : 0.3333333432674408,
"Blue Component" : 1
},
"Window Type" : 0,
"Use Bright Bold" : true,
"Has Hotkey" : true,
"HotKey Modifier Activation" : 0,
"Cursor Text Color" : {
"Green Component" : 1,
"Red Component" : 1,
"Blue Component" : 1
},
"HotKey Window Dock Click Action" : 0,
"Default Bookmark" : "No",
"Cursor Color" : {
"Green Component" : 0.73333334922790527,
"Red Component" : 0.73333334922790527,
"Blue Component" : 0.73333334922790527
},
"Ansi 1 Color" : {
"Green Component" : 0,
"Red Component" : 0.73333334922790527,
"Blue Component" : 0
},
"Name" : "HotKey Window",
"Blinking Cursor" : false,
"Guid" : "93391868-B18E-488D-8281-468CE7F2D96D",
"Idle Code" : 0,
"Ansi 10 Color" : {
"Green Component" : 1,
"Red Component" : 0.3333333432674408,
"Blue Component" : 0.3333333432674408
},
"Ansi 8 Color" : {
"Green Component" : 0.3333333432674408,
"Red Component" : 0.3333333432674408,
"Blue Component" : 0.3333333432674408
},
"Badge Color" : {
"Red Component" : 1,
"Color Space" : "sRGB",
"Blue Component" : 0,
"Alpha Component" : 0.5,
"Green Component" : 0.1491314172744751
},
"Ambiguous Double Width" : false,
"Blur Radius" : 3.4086770304568521,
"Ansi 0 Color" : {
"Green Component" : 0,
"Red Component" : 0,
"Blue Component" : 0
},
"Blur" : true,
"Normal Font" : "CourierNewPS-BoldMT 17",
"Vertical Spacing" : 1,
"Ansi 7 Color" : {
"Green Component" : 0.73333334922790527,
"Red Component" : 0.73333334922790527,
"Blue Component" : 0.73333334922790527
},
"HotKey Window AutoHides" : true,
"Command" : "",
"Terminal Type" : "xterm-256color",
"Horizontal Spacing" : 1,
"Option Key Sends" : 0,
"HotKey Window Animates" : true,
"HotKey Modifier Flags" : 1179648,
"Ansi 15 Color" : {
"Green Component" : 1,
"Red Component" : 1,
"Blue Component" : 1
},
"Ansi 6 Color" : {
"Green Component" : 0.73333334922790527,
"Red Component" : 0,
"Blue Component" : 0.73333334922790527
},
"Transparency" : 0.13976840101522844,
"HotKey Activated By Modifier" : false,
"Background Color" : {
"Green Component" : 0,
"Red Component" : 0,
"Blue Component" : 0
},
"Screen" : -2,
"HotKey Characters Ignoring Modifiers" : " ",
"Bound Hosts" : [

],
"Non Ascii Font" : "Monaco 12",
"Ansi 13 Color" : {
"Green Component" : 0.3333333432674408,
"Red Component" : 1,
"Blue Component" : 1
},
"Columns" : 77,
"HotKey Alternate Shortcuts" : [

],
"Use Tab Color" : true,
"Visual Bell" : true,
"Custom Directory" : "No",
"Ansi 5 Color" : {
"Green Component" : 0,
"Red Component" : 0.73333334922790527,
"Blue Component" : 0.73333334922790527
},
"Set Local Environment Vars" : false
}

oh-my-zsh 自带 git 插件,里面的针对git 的别名设置见:

➜ >vim .oh-my-zsh/plugins/git/git.plugin.zsh

my_zprofile

.zprofile

my_vimrc

.vimrc

oh-my-zsh autojump plugin install

  1. brew install autojump
  2. vim .zshrc
1
2
plugins=(git autojump)
[[ -s $(brew --prefix)/etc/profile.d/autojump.sh ]] && . $(brew --prefix)/etc/profile.d/autojump.sh

then, source ~/.zshrc

if Folder permission “Insecure completion-dependent directories detected”, then:

vim .zshrc

1
2
Set ZSH_DISABLE_COMPFIX=true 
# in your zshrc file, before oh-my-zsh.sh is sourced, and update OMZ to the latest version. It should ignore these permission issues and load the completion system normally.

then, source ~/.zshrc

Astro zsh theme add in .zshrc Astro zsh theme, download and move to target dir, then:

1
ZSH_THEME="astro"

then, source ~/.zshrc

也加载下 .bash_profile

~/.zshrc, tail line add

1
source ~/.bash_profile

then, source ~/.zshrc

iTerm2 如何设置半透明窗口?

Reference Article

Iterm2-color-schemes
Iterm-colors
Zsh astro theme
使用 Zsh 的十大优点.
oh-my-zsh配置你的zsh提高shell逼格终极选择.
打造高效个性Terminal(一)之 iTerm.
打造高效个性Terminal(二)之 zsh.
Mac下的效率工具autojump


2.3 Miniconda

https://docs.conda.io/en/latest/miniconda.html

Miniconda3 MacOSX 64-bit pkg

~/.zshrc, tail line add

1
source ~/.bash_profile

then, source ~/.zshrc

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
➜ conda info

active environment : base
active env location : /opt/miniconda3
shell level : 1
user config file : /Users/blair/.condarc
populated config files :
conda version : 4.9.2
conda-build version : not installed
python version : 3.9.1.final.0
virtual packages : __osx=10.14.6=0
__unix=0=0
__archspec=1=x86_64
base environment : /opt/miniconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /opt/miniconda3/pkgs
/Users/blair/.conda/pkgs
envs directories : /opt/miniconda3/envs
/Users/blair/.conda/envs
platform : osx-64
user-agent : conda/4.9.2 requests/2.25.0 CPython/3.9.1 Darwin/18.7.0 OSX/10.14.6
UID:GID : 501:20
netrc file : None
offline mode : False
1
2
3
4
5
6
7
8
9
➜ python -V
Python 3.9.1
(base)
# ~ [18:54:12]
➜ pip --version
pip 20.3.1 from /opt/miniconda3/lib/python3.9/site-packages/pip (python 3.9)
(base)
# ~ [18:54:14]

create env foo & install common package

1
2
3
4
5
6
7
8
9
conda create --name foo
conda info
conda info --envs
conda activate foo
conda list
conda install pip
pip list
pip install pandas numpy scikit-learn matplotlib ipython notebook
# 优先用 pip 来安装 package, pip 不行, 在用 conda. 浩哥的习惯. 推荐不绝对

只用来管理 Python 版本和虚拟环境,Miniconda 也是一个很好的选择

1
2
3
4
5
➜ conda info --envs
# conda environments:
#
base * /opt/miniconda3
foo /opt/miniconda3/envs/foo

2.4 ssh config

  1. ssh-keygen -t rsa -C “your-company-email-full-address”
  2. ~/.ssh/id_rsa.pub 粘贴到运维平台

mac iterm2 ssh 跳转失败, 解决办法 :

(1) 新建并编辑 .ssh/config, 并复制以下内容到 config文件中

1
2
3
4
5
6
Host * 
ForwardAgent yes
PasswordAuthentication yes
StrictHostKeyChecking no
HashKnownHosts yes
Compression yes

(2) cd ~/.ssh, 并在 terminal 中执行 ssh-add

2.5 navicat for MySQL

rds-general

Encoding 设置为 utf-8 则,查询数据库,汉字乱码,改为 Auto 解决。

ssh-rds

3. Java

  1. JDK
  2. Maven
  3. Tomcat
  4. Scala
  5. Spark
1
2
3
4
5
6
7
8
9
➜  software pwd
/usr/local/xsoft/software
➜ software ll
total 0
lrwxr-xr-x 1 blair staff 40B Jun 30 2020 jdk -> /usr/local/xsoft/software/jdk-14.0.1.jdk
lrwxr-xr-x 1 blair staff 44B Mar 21 08:42 maven -> /usr/local/xsoft/software/apache-maven-3.6.3
drwxr-xr-x@ 7 blair staff 224B Mar 21 08:42 software
lrwxr-xr-x 1 blair staff 51B Jul 1 2020 spark -> /usr/local/xsoft/software/spark-3.0.0-bin-hadoop3.2
➜ software

4. Blog

git config

1
2
3
4
5
$ git config --list
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
$ git config --list
$ git config user.name

nvm node.js

  1. hexo
  2. Install Node.js
1
$ wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.35.2/install.sh | bash

Once nvm is installed, restart the terminal and run the following command to install Node.js:

1
2
3
# $ nvm install v4.1.0
$ nvm install v14.17.1
$ npm install -g hexo-cli

5. Python (待定)

5.1 this mac install pip (待定)

Python pip , sudo python get-pip.py

then, terminal input pip list.

If exist warning:

DEPRECATION: The default format will switch to columns in the future. You can use —format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.

solve this warning:

~.vim ~/.pip/pip.conf
[list]
format=columns

5.2 pyenv install package (待定)

First, you need to install python pyenv environment

1
2
3
4
5
6
7
8
9
10
Python 3.6.3
(vpy3)


pip install numpy
pip install scipy
pip install matplotlib
pip install pandas

pip install scikit-learn

ipython

1
pip install ipython

然后, 如 terminall input ipython 不存在, 则 pip show ipython, python -m IPython 试试.

notebook

1
2
3
#pip install --ignore-installed six
#pip install target-gsheet tap-fixerio
pip install notebook

pip install notebook, 如 macos High Sierra 10.13 报错,则
pip install —ignore-installed six
pip install target-gsheet tap-fixerio
then, pip install notebook

8. Reference

Macos NSNavRecentPlaces 内部自动生成的配置,别乱改。

defaults write -g NSNavRecentPlaces ‘(“~/Desktop”, “/usr/local/xsoft/software”)’;