Skip to content

Instantly share code, notes, and snippets.

@encoreshao
Last active April 11, 2017 00:48
Show Gist options
  • Save encoreshao/7cb63a165ca414c3cf95b1492a955811 to your computer and use it in GitHub Desktop.
Save encoreshao/7cb63a165ca414c3cf95b1492a955811 to your computer and use it in GitHub Desktop.
setup the Mac development environment
# Setting sublime line 3
### 下载链接 - https://www.sublimetext.com/3
### 创建别名 `subl`
sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
### Install package control
source link:https://packagecontrol.io/installation
open sublime - show console
copy into console
> import urllib.request,os,hashlib; h = 'df21e130d211cfc94d9b0905775a7c0f' + '1e3d39e33b79698005270310898eea76'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
# 更新gem源
查看源: gem source
*** CURRENT SOURCES ***
https://rubygems.org/
1. gem sources -r https://rubygems.org/ 删除原来的资源库位置
2. gem sources -a https://ruby.taobao.org/ 添加新的资源库位置
3. gem sources -u 更新资源库
# Iterm2 配色方案
### 先要修改 ~/.bash_profile. 添加代码如下:
# enables colorin the terminal bash shell export
export CLICOLOR=1
# sets up thecolor scheme for list export
export LSCOLORS=gxfxcxdxbxegedabagacad
# sets up theprompt color (currently a green similar to linux terminal)
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]\$ '
# enables colorfor iTerm
export TERM=xterm-256color
### 选择喜欢的配色方案。
在Preferences->Profiles->Colors的load presets可以选择某个配色方案。也可以自己下载。在网站http://iterm2colorschemes.com/,几乎可以找到所有可用的配色方案。
### 小写敏感 - 对于目录中经常有大写字母的情况,取消大小写敏感。代码如下:
echo "set completion-ignore-case On" >> ~/.inputrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment