mac 初始化工具

mac 初始化工具

安装iterm2:

https://iterm2.com/

安装命令行工具

xcode-select --install

安装brew

 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)

替换brew源

替换brew.git:

cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git

替换homebrew-core.git:

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc

安装Git

brew install git 
$ cat ~/.gitconfig
# This is Git's per-user configuration file.
[alias]
  st = status
  co = checkout
  ci = commit
  br = branch
  last = log -1
  lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
	dsf = "!f() { [ -z \"$GIT_PREFIX\" ] || cd \"$GIT_PREFIX\" && git diff --color \"$@\" | diff-so-fancy  | less --tabs=4 -RFX; }; f"

[core]
	pager = diff-so-fancy | less --tabs=4 -RFX

安装oh-my-zsh

sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

安装docker

wget  https://download.docker.com/mac/stable/Docker.dmg
brew install docker-compose 

ssh连接不断

vim .ssh/config

Host *
    Protocol 2
    ServerAliveInterval 30
    ServerAliveInterval 60
    Compression yes
    ControlPersist yes
    ControlMaster auto
    ControlPath ~/.ssh/master-%r@%h:%p

vim 简易配置

vim ~/.vimrc

set nu
set tabstop=4
set smartindent
set expandtab
set shiftwidth=4
set softtabstop=4

pycharm

GVM安装

xcode-select --install
brew update
brew install mercurial
# 安装gvm
bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)

# 加入.zshrc中
source /Users/user/.gvm/scripts/gvm

nvm 安装

brew install nvm
mkdir ~/.nvm
echo '
export NVM_DIR="$HOME/.nvm"
[ -s "/opt/homebrew/opt/nvm/nvm.sh" ] && . "/opt/homebrew/opt/nvm/nvm.sh"  # This loads nvm
[ -s "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm" ] && . "/opt/homebrew/opt/nvm/etc/bash_completion.d/nvm"  # This loads nvm bash_completion
' >> ~/.zshrc
nvm install --lts
npm install --global yarn

应用程序

Typora: https://download.typora.io/mac/Typora-0.11.18.dmg

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值