Skip to content

Commit 8613b35

Browse files
committed
rebase
0 parents  commit 8613b35

File tree

99 files changed

+84265
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+84265
-0
lines changed

.gitattributes

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
*.zip filter=lfs diff=lfs merge=lfs -text
2+
*.jpg filter=lfs diff=lfs merge=lfs -text
3+
*.png filter=lfs diff=lfs merge=lfs -text
4+
*.jpeg filter=lfs diff=lfs merge=lfs -text
5+
*.terminal filter=lfs diff=lfs merge=lfs -text
6+
*.bin filter=lfs diff=lfs merge=lfs -text
7+
*.tgz filter=lfs diff=lfs merge=lfs -text
8+
*.tar.gz filter=lfs diff=lfs merge=lfs -text
9+
*.jar filter=lfs diff=lfs merge=lfs -text
10+
rime/rime_custom/luna_pinyin.sogou.dict.yaml filter=lfs diff=lfs merge=lfs -text

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*/.DS_STORE
2+
zsh_history
3+
zsh_history_back
4+
*.userdb.txt
5+
OmegaOptions.bak
6+
vim/autoload/
7+
vim/plugged/

KeyBindings.dict

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// /Applications/TextMate.app/Contents/Resources/KeyBindings.dict
2+
// ~/Library/Application\ Support/TextMate/KeyBindings.dict
3+
// /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict
4+
{
5+
"^x" = ("moveToEndOfLine:", "deleteToBeginningOfLine:");
6+
"@U" = "uppercaseWord:";
7+
"@u" = "lowercaseWord:";
8+
}

LICENSE

+373
Large diffs are not rendered by default.

README.md

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
# macOS libs
2+
3+
Config Development Environment On macOS
4+
5+
## 工具编译安装
6+
7+
- [基础工具](./build.md#基础工具)
8+
+ [Terminal基础配置](./build.md#terminal基础配置)
9+
+ [SSH免密](./build.md#ssh免密)
10+
- [安装包下载链接](./build.md#安装包下载链接)
11+
+ [配置 & 编译](./build.md#配置--编译)
12+
+ [Python2.7.15 & Python3.7.4 源码构建](./build.md#python2--python3-源码构建)
13+
使用 **LibreSSL 2.9.2** _macOS 自带 LibreSSL 2.6.5(`/usr/bin/openssl version`)_
14+
+ [Python 模块安装](./build.md#python-模块安装)
15+
+ [Nginx](./build.md#nginx)
16+
+ [构建流程备份](./build.md#构建流程备份)
17+
+ [GnuPG](./build.md#gnupg)
18+
- [`Squirrel`(`鼠鬚管`)安装](https://yakirchen.github.io/tech/2016/11/20/squirrel-build-on-macOS.html)
19+
- [Shadowsocks](./build.md#shadowsocks)
20+
21+
- [Useful Shell Fragment](./useful-shell.md)
22+
23+
24+
## rwx
25+
```bash
26+
# r 4
27+
# w 2
28+
# x 1
29+
chmod 111 rwx
30+
# ---x--x--x 1 yakir staff 0B 10 28 18:02 rwx
31+
chmod 333 rwx
32+
# --wx-wx-wx 1 yakir staff 0B 10 28 18:02 rwx
33+
chmod 555 rwx
34+
# -r-xr-xr-x 1 yakir staff 0B 10 28 18:02 rwx
35+
chmod 755 rwx
36+
# -rwxr-xr-x 1 yakir staff 0B 10 28 18:02 rwx
37+
chmod 777 rwx
38+
# -rwxrwxrwx 1 yakir staff 0B 10 28 18:02 rwx
39+
```
40+
41+
## 自签名证书生成 & Nginx开启 h2、ssl
42+
[自签名证书生成 & Nginx开启 h2、ssl](nginx自签名证书.md)
43+
44+
## Soft Links
45+
46+
```bash
47+
ln -s /Volumes/To/repos/m2 ${HOME}/.m2
48+
ln -s /Volumes/To/repos/vscode ${HOME}/.vscode
49+
ln -s "${HOME}/Library/Mobile Documents/com~apple~CloudDocs/Developer/macOS-libs/npmrc" ${HOME}/.npmrc
50+
ln -s "${HOME}/Library/Mobile Documents/com~apple~CloudDocs/Developer/macOS-libs/tm_properties" ${HOME}/.tm_properties
51+
ln -s "${HOME}/Library/Mobile Documents/com~apple~CloudDocs/Developer/macOS-libs/vim/vimrc" ${HOME}/.vimrc
52+
ln -s "${HOME}/Library/Mobile Documents/com~apple~CloudDocs/Developer/macOS-libs/yarnrc" ${HOME}/.yarnrc
53+
ln -s "${HOME}/Library/Mobile Documents/com~apple~CloudDocs/Developer/macOS-libs/zshrc" ${HOME}/.zshrc
54+
rm ${HOME}/Library/Application\ Support/Code/User/settings.json
55+
rm ${HOME}/Library/Application\ Support/Code/User/keybindings.json
56+
ln -s /Users/yakir/Library/Mobile\ Documents/com\~apple\~CloudDocs/Developer/macOS-libs/vscode/vscode-settings.json ${HOME}/Library/Application\ Support/Code/User/settings.json
57+
ln -s /Users/yakir/Library/Mobile\ Documents/com\~apple\~CloudDocs/Developer/macOS-libs/vscode/vscode-keybindings.json ${HOME}/Library/Application\ Support/Code/User/keybindings.json
58+
```
59+
60+
## Too many open files
61+
62+
```bash
63+
sudo cp "/Users/yakir/Library/Mobile Documents/com~apple~CloudDocs/Developer/macOS-libs/macOS-limit/limit.maxfiles.plist" /Library/LaunchDaemons/
64+
sudo cp "/Users/yakir/Library/Mobile Documents/com~apple~CloudDocs/Developer/macOS-libs/macOS-limit/limit.maxproc.plist" /Library/LaunchDaemons/
65+
66+
sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist
67+
sudo chown root:wheel /Library/LaunchDaemons/limit.maxproc.plist
68+
69+
sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist
70+
sudo launchctl load -w /Library/LaunchDaemons/limit.maxproc.plist
71+
72+
```
73+
74+
```bash
75+
sudo vim /etc/sysctl.conf
76+
sudo vim /etc/launchd.conf
77+
78+
sysctl -A | grep kern.max
79+
kern.maxvnodes: 600000
80+
kern.maxproc: 10000
81+
kern.maxfiles: 300000
82+
kern.maxfilesperproc: 300000
83+
kern.maxprocperuid: 7500
84+
kern.maxnbuf: 16384
85+
86+
launchctl limit
87+
cpu unlimited unlimited
88+
filesize unlimited unlimited
89+
data unlimited unlimited
90+
stack 8388608 67104768
91+
core 0 unlimited
92+
rss unlimited unlimited
93+
memlock unlimited unlimited
94+
maxproc 7500 10000
95+
maxfiles 256 unlimited
96+
```
97+
98+
macOS 高性能模式(performance mode)
99+
+ [performance-mode-for-macOS](https://yakirchen.github.io/tech/2018/11/23/performance-mode-for-macOS.html)
100+
+ [针对 macOS Server 开启性能模式](https://support.apple.com/zh-cn/HT202528)
101+
+ [Turn on performance mode for macOS Server](https://support.apple.com/pl-pl/HT202528)
102+
103+
:grinning:

altair.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"theme": "dark",
3+
"language": "zh-CN",
4+
"addQueryDepthLimit": 3,
5+
"tabSize": 2,
6+
"theme.fontsize": 20,
7+
"theme.editorFontFamily": "Source Code Pro"
8+
}

aria2.conf

+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
## '#'开头为注释内容, 选项都有相应的注释说明, 根据需要修改 ##
2+
## 被注释的选项填写的是默认值, 建议在需要修改时再取消注释 ##
3+
4+
## 文件保存相关 ##
5+
6+
# 文件的保存路径(可使用绝对路径或相对路径), 默认: 当前启动位置
7+
dir=/Volumes/sm/aria2/
8+
# 启用磁盘缓存, 0为禁用缓存, 需1.16以上版本, 默认:16M
9+
#disk-cache=32M
10+
# 文件预分配方式, 能有效降低磁盘碎片, 默认:prealloc
11+
# 预分配所需时间: none < falloc ? trunc < prealloc
12+
# falloc和trunc则需要文件系统和内核支持
13+
# NTFS建议使用falloc, EXT3/4建议trunc, MAC 下需要注释此项
14+
#file-allocation=none
15+
# 断点续传
16+
continue=true
17+
18+
## 下载连接相关 ##
19+
20+
# 最大同时下载任务数, 运行时可修改, 默认:5
21+
max-concurrent-downloads=12
22+
# 同一服务器连接数, 添加时可指定, 默认:1
23+
max-connection-per-server=12
24+
# 最小文件分片大小, 添加时可指定, 取值范围1M -1024M, 默认:20M
25+
# 假定size=10M, 文件为20MiB 则使用两个来源下载; 文件为15MiB 则使用一个来源下载
26+
min-split-size=10M
27+
# 单个任务最大线程数, 添加时可指定, 默认:5
28+
#split=5
29+
# 整体下载速度限制, 运行时可修改, 默认:0
30+
#max-overall-download-limit=0
31+
# 单个任务下载速度限制, 默认:0
32+
#max-download-limit=0
33+
# 整体上传速度限制, 运行时可修改, 默认:0
34+
#max-overall-upload-limit=0
35+
# 单个任务上传速度限制, 默认:0
36+
#max-upload-limit=0
37+
# 禁用IPv6, 默认:false
38+
#disable-ipv6=true
39+
# 连接超时时间, 默认:60
40+
#timeout=60
41+
# 最大重试次数, 设置为0表示不限制重试次数, 默认:5
42+
#max-tries=5
43+
# 设置重试等待的秒数, 默认:0
44+
#retry-wait=0
45+
46+
## 进度保存相关 ##
47+
48+
# 从会话文件中读取下载任务
49+
input-file=/Volumes/sm/aria2/aria2.session
50+
# 在Aria2退出时保存`错误/未完成`的下载任务到会话文件
51+
save-session=/Volumes/sm/aria2/aria2.session
52+
# 定时保存会话, 0为退出时才保存, 需1.16.1以上版本, 默认:0
53+
#save-session-interval=60
54+
55+
## RPC相关设置 ##
56+
57+
# 启用RPC, 默认:false
58+
enable-rpc=true
59+
# 允许所有来源, 默认:false
60+
rpc-allow-origin-all=true
61+
# 允许非外部访问, 默认:false
62+
rpc-listen-all=true
63+
# 事件轮询方式, 取值:[epoll, kqueue, port, poll, select], 不同系统默认值不同
64+
#event-poll=select
65+
# RPC监听端口, 端口被占用时可以修改, 默认:6800
66+
#rpc-listen-port=6800
67+
# 设置的RPC授权令牌, v1.18.4新增功能, 取代 --rpc-user 和 --rpc-passwd 选项
68+
#rpc-secret=<TOKEN>
69+
# 设置的RPC访问用户名, 此选项新版已废弃, 建议改用 --rpc-secret 选项
70+
#rpc-user=<USER>
71+
# 设置的RPC访问密码, 此选项新版已废弃, 建议改用 --rpc-secret 选项
72+
#rpc-passwd=<PASSWD>
73+
# 是否启用 RPC 服务的 SSL/TLS 加密,
74+
# 启用加密后 RPC 服务需要使用 https 或者 wss 协议连接
75+
#rpc-secure=true
76+
# 在 RPC 服务中启用 SSL/TLS 加密时的证书文件,
77+
# 使用 PEM 格式时,您必须通过 --rpc-private-key 指定私钥
78+
#rpc-certificate=/path/to/certificate.pem
79+
# 在 RPC 服务中启用 SSL/TLS 加密时的私钥文件
80+
#rpc-private-key=/path/to/certificate.key
81+
82+
## BT/PT下载相关 ##
83+
84+
# 当下载的是一个种子(以.torrent结尾)时, 自动开始BT任务, 默认:true
85+
#follow-torrent=true
86+
# BT监听端口, 当端口被屏蔽时使用, 默认:6881-6999
87+
listen-port=51413
88+
# 单个种子最大连接数, 默认:55
89+
#bt-max-peers=55
90+
# 打开DHT功能, PT需要禁用, 默认:true
91+
enable-dht=false
92+
# 打开IPv6 DHT功能, PT需要禁用
93+
#enable-dht6=false
94+
# DHT网络监听端口, 默认:6881-6999
95+
#dht-listen-port=6881-6999
96+
# 本地节点查找, PT需要禁用, 默认:false
97+
#bt-enable-lpd=false
98+
# 种子交换, PT需要禁用, 默认:true
99+
enable-peer-exchange=false
100+
# 每个种子限速, 对少种的PT很有用, 默认:50K
101+
#bt-request-peer-speed-limit=50K
102+
# 客户端伪装, PT需要
103+
peer-id-prefix=-TR2770-
104+
user-agent=Transmission/2.77
105+
peer-agent=Transmission/2.77
106+
# 当种子的分享率达到这个数时, 自动停止做种, 0为一直做种, 默认:1.0
107+
seed-ratio=0
108+
# 强制保存会话, 即使任务已经完成, 默认:false
109+
# 较新的版本开启后会在任务完成后依然保留.aria2文件
110+
#force-save=false
111+
# BT校验相关, 默认:true
112+
#bt-hash-check-seed=true
113+
# 继续之前的BT任务时, 无需再次校验, 默认:false
114+
bt-seed-unverified=true
115+
# 保存磁力链接元数据为种子文件(.torrent文件), 默认:false
116+
bt-save-metadata=true

broker.conf

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
namesrvAddr=127.0.0.1:9876
2+
brokerClusterName = DefaultCluster
3+
brokerName = broker-a
4+
brokerId = 0
5+
deleteWhen = 04
6+
fileReservedTime = 48
7+
brokerRole = ASYNC_MASTER
8+
flushDiskType = ASYNC_FLUSH
9+
brokerIP1=127.0.0.1
10+
storePathRootDir=/Volumes/sm/repos/rocketmq/data/broker-a
11+
storePathCommitLog=/Volumes/sm/repos/rocketmq/data/broker-a/commitlog
12+
defaultTopicQueueNums=4
13+
autoCreateTopicEnable=true
14+
traceTopicEnable=true
15+
enablePropertyFilter=true
16+
transactionCheckInterval=1000
17+
transactionCheckMax=60

0 commit comments

Comments
 (0)