Categories

Mac 安装方法

操作系统的配置

  • 系统偏好设置/键盘/快捷键/Mission Control/ -> 取消Ctrl+UP和Ctrl+DOWN,它们会和ZSH历史命令搜索插件冲突

  • 系统偏好设置/键盘/按键重复 -> 快

  • 系统偏好设置/输入源 -> 设置“上一个输入源”和“输入菜单中的下一个输入源”为Windows键/Mac键+Space

  • Finder偏好设置/边栏,选择显示home

  • 显示资源库:chflags nohidden ~/Library

  • 隐藏资源库:chflags hidden ~/Library

  • 开启SSH Server:sudo systemsetup -setremotelogin on

iTerm 2 设置

Profile/Window/
透明
Style: Left of the Screen
Column: 160

安装的准备工作

  • 安装Xcode
  • Install Homebrew

安装Xcode

  • 打开 App Store 安装 xcode
  • 命令行执行:xcode-select --install

安装 Homebrew

  • /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  • 确保 /usr/local/bin$PATH

软件列表

brew install ruby
brew install python
brew cask install iterm2
brew cask install google-chrome
brew cask install dropbox
brew install zsh
brew cask install transmission
brew cask install java
brew cask install virtualbox vagrant
brew cask install virtualbox-extension-pack
brew install tmux
brew cask install vlc
brew install htop iftop axel ncdu tig pwgen
brew install git
brew install the_silver_searcher
brew install watchman
brew install ctags
brew install gettext && brew link gettext --force
brew install unrar
brew cask install gimp
brew install go
brew install mercurial
brew cask install liteide
brew cask install skype
brew install flac
#brew cask install xtrafinder
#brew cask install paragon-ntfs
brew install wget
brew cask install unetbootin
brew install git-flow
brew cask install istat-menus
#brew install p7zip
#brew install gpg
brew cask install sqlitebrowser
#brew cask install waltr
brew cask install flash-player
brew install arp-scan
brew cask install sublime-text
brew cask install keepassx
brew install md5deep
brew install md5sha1sum
brew cask install pgadmin3
brew install wget
brew cask install docker dockertoolbox
brew cask install visual-studio-code
brew cask install diskmaker-x

余下杂项

使用Docker

  • 第一次启动:docker-machine create -d virtualbox toolbox
  • 以后使用Docker前配置 Docker Machine 环境:eval "$(docker-machine env toolbox)"

安装Vim

  • brew install macvim --override-system-vim
  • 隐藏系统自带vim:sudo mv /usr/bin/vim /usr/bin/vim73

安装其它Python包

sudo pip install virtualenvwrapper
sudo pip install joe
sudo pip install youtube-dl
sudo pip install ansible
sudo pip install ipython
sudo pip install passlib

安装 oh-my-zsh

cd
curl -L http://install.ohmyz.sh | sh
a sh
chsh -s /bin/zsh (改变shell到zsh,oh-my-zsh安装的时候也有这个操作,但是似乎失败了)|

安装spf13

curl https://j.mp/spf13-vim3 -L>spf13-vim.sh&&sh spf13-vim.sh

Powerline

pip install psutil?
pip install git+git://github.com/Lokaltog/powerline
安装字体,在iTerm2中设置字体(包括非ASCII字体)
git clone https://github.com/powerline/fonts.git
cd fonts
./install.sh

窗口切换

.tmux.conf
bind -n M-left prev
bind -n M-right next

Cocoapods

sudo gem install cocoapods

CocoaPods是以Ruby gem包的形式被安装的。在安装执行的过程中,可能会问我们是不是更新rake,输入y即可。这是因为rake gem包会在安装的过程中检查更细,如果有可用的新版本就会出现刚才的选项。

Ruby Environment

Install RVM ( Ruby Version Manager )

curl -sSL https://get.rvm.io | bash
source /Users/user/.rvm/scripts/rvm
rvm -v
rvm osx-ssl-certs status all

Reference

Ruby on Rails

brew install rbenv ruby-build
rbenv install 2.1.5
rbenv global 2.1.5
echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile
gem install rails

Install Mac OS in Virtualbox

gem install iesd

Reference

前端开发

Install NVM

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash nvm install node npm install --global yarn cd 到前端开发目录:~/workspace/frontend npm install grunt-cli

Initialize New Project

nvm init
npm install grunt-contrib-watch grunt-contrib-sass grunt-image (是不是也应该加-g参数)
npm install -g bower grunt-cli
npm install --global imagemin-cli
npm install --global imageoptim

Reference

PostGIS

brew install postgis

Safari浏览器插件

https://zythum.github.io/mama2/
https://adblockplus.org/zh_CN/

Other Interesting Projects

Daily Reddit Wallpaper