分类
linux

ssh设置心跳 防止自动超时

Server Side:

vim /etc/ssh/sshd_config
ClientAliveInterval 30
ClientAliveCountMax 60
systemctl restart sshd

Client Side:

vim /etc/ssh/ssh_config
Host *
ServerAliveInterval 30
ServerAliveCountMax 60
分类
linux

在公司和个人项目中自动切换git commiter信息

代码目录 ~/Code
公司项目目录 ~/Code/Work

.gitconfig

[includeIf "gitdir:~/Code/"]
  path = .gitconfig-personal
[includeIf "gitdir:~/Code/Work/"]
  path = .gitconfig-work

.gitconfig-personal

[user]
name = solarhell
email = songjiaxin2008@gmail.com

.gitconfig-work

[user]
name = 程序员
email = 程序员@公司.com