我的开发环境

必备软件安装

  • Git
  • Source tree
  • Chrome
  • Visual Studio Code
  • item2
  • Docker
  • Postman

hosts

/etc/hosts
C:/⁨Windows⁩/System32⁩/drivers⁩/etc⁩/hosts
hosts
###
## curl -o hosts https://gist.githubusercontent.com/ryanlid/5de803fea79cd6dc123a69189e8f236b/raw/hosts && sudo mv /etc/hosts /etc/hosts.bak && sudo mv hosts /etc/hosts
###
# default
::1  localhost  ip6-localhost  ip6-loopback
127.0.0.1 l.oonnnoo.com

192.30.253.118 gist.github.com
192.30.253.119 gist.github.com
151.101.78.90 cdn.dribbble.com

47.240.113.45 deb.debian.org
47.240.113.45 archive.ubuntu.com
47.240.113.45 security.ubuntu.com
47.240.113.45 dl-cdn.alpinelinux.org

https://gist.github.com/ryanlid/5de803fea79cd6dc123a69189e8f236b

shell 相关

bash_profile

.bash_profile
.bash_profile
export PATH=/usr/local/bin:/usr/local/bin:/usr/local/sbin:~/bin:/usr/local/bin:/usr/local/sbin:~/bin:/usr/local/bin:/usr/local/bin:/Library/Frameworks/Python.framework/Versions/3.5/bin:/usr/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin

export JAVA_HOME=$(/usr/libexec/java_home)

# export ANDROID_HOME=/Users/ryan/Library/Android/sdk
export ANDROID_HOME=/Volumes/Extend/Library/Android/sdk
export PATH=$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/platform-tools:$PATH

export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles
export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node
export NVM_IOJS_ORG_MIRROR=https://npm.taobao.org/mirrors/iojs

# export PATH=$PATH:/Users/ryan/Library/Flutter/bin
export PATH=$PATH:/Volumes/Extend/Library/flutter/bin
export PUB_HOSTED_URL=https://pub.flutter-io.cn
export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn

export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
export NVM_DIR="/Users/ryan/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

alias subl="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
alias code="/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code"
alias yt='docker run --rm -u $(id -u):$(id -g) -v $PWD:/data vimagick/youtube-dl'
alias chrome="/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome"
alias ydl="youtube-dl -v --proxy socks5://127.0.0.1:1080"
alias rsdev="rsync -av --exclude=.git --exclude=Dropbox --exclude=Creative\ Cloud\ Files --exclude=Informal\ Art\ Portfolio --exclude=.idea --exclude=venv --exclude=node_modules --exclude=.sass-cache --exclude=.class --exclude=out --exclude=.DS_Store --exclude=.Trashes --exclude=.TemporaryItems --exclude=.cache --exclude=sass --exclude=flowboard.com --exclude=dist --exclude=.tmp --delete ~/Developer/ ~/Library/Mobile\ Documents/com\~apple\~CloudDocs/Developer/"
alias studio="open -a /Applications/Android\ Studio.app"

https://gist.github.com/ryanlid/f0251b3be95b7d0c51c26d13fc52986b

zshrc

~/.zshrc

vimrc

~/.vimrc
.vimrc
"引号为注释
"设置显示行号
set nu
"设置在命令行界面最下面显示当前模式
set showmode
"在右下角显示光标所在的行数等信息
set ruler
"设置每次单击Enter键后,光标移动到下一行时与上一行的起始字符对齐
set autoindent
"设置TAB宽4个空格
set ts=2
"设置语法检测
syntax on

https://gist.github.com/ryanlid/23e332bf1a707f1987db7737f0e69d69

ssh_config

~/.ssh/config
ssh_config
ServerAliveInterval 60

Host us1
    HostName 149.248.14.22
    ForwardAgent yes
    IdentityFile ~/.ssh/id_rsa
    User root

https://gist.github.com/ryanlid/814de0ac719680d248c0ad37a6915c78

Git 相关

gitconfig

~/.gitconfig
.gitconfig
# global .gitconfig
[user]
    name = dong.li
    email = 530555402@qq.com
[core]
# 配置方法
# https://www.cnblogs.com/flying_bat/p/3324769.html
# 禁用中文转义
    quotepath = false
# 禁用换行符自动转换
    autocrlf = false
# 拒绝提交包含混合换行符的文件
  safecrlf = true
# 忽略文件权限修改
    filemode = false
    excludesfile = C:\\Users\\wm007\\.gitignore
[difftool "sourcetree"]
    cmd = 'd:/Program Files/Beyond Compare 4/BComp.exe' \"$LOCAL\" \"$REMOTE\"
[alias]
    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
    lgld = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --author=dong.li
    s = status
    cm = commit
    mm = merge main
    pom = push origin main
    com = checkout main

https://gist.github.com/ryanlid/ac710f222bb345649edc099a29d1a504

gitignore

~/.gitignore
.gitignore
*~
.DS_Store
Thumbs.db
db.json
*.log
node_modules
.deploy*/
*.map
package-lock.json
yarn.lock
.vscode

https://gist.github.com/ryanlid/a60e1724ab6b2eae03be8fffcd52d17b

Nodejs 相关

npmrc

npm config set proxy=http://192.168.2.128:1082
npm config set https-proxy http://192.168.2.128:1082
npm config set sass_binary_site https://cdn.npm.taobao.org/dist/node-sass
npm config set phantomjs_cdnurl=http://cnpmjs.org/downloads
npm config set registry=https://registry.npm.taobao.org
~/.npmrc
.npmrc
registry=https://registry.npm.taobao.org
#registry=https://npmreg.mirrors.ustc.edu.cn
sass_binary_site=https://cdn.npm.taobao.org/dist/node-sass
phantomjs_cdnurl=http://cnpmjs.org/downloads

~/.cnpmrc
.cnpmrc
registry=https://registry.npm.taobao.org
#registry=https://npmreg.mirrors.ustc.edu.cn

https://gist.github.com/ryanlid/6cb14332a3759e247728b7755b5bea5d

Python 相关

pip.conf

~/.pip/pip.conf
pip.conf
# ~/.pip/pip.conf
[global]
index-url = https://mirrors.ustc.edu.cn/pypi/web/simple
# index-url = https://pypi.douban.com/simple
# index-url = https://mirrors.aliyun.com/pypi/simple

[install]
trusted-host=mirrors.aliyun.com

https://gist.github.com/ryanlid/8e46e2960f66a45b1e8e856f712c87f4

更新记录

  1. 2019-04-10 12:05:34 首次发布

本文链接 https://www.yidiankuaile.com/post/my-development-environment

最后更新
留言
0 条留言