Mac init

user name
user: yufei

add shortcut
System Preference -> Keyboard - > Shortcut -> App Shortcuts -> (F10 Sleep), (F9 Shut Down...)

xcode
install Xcode from App Store

install command line tools
xcode-select --install

sudo without password
sudo su chmod +w /etc/sudoers USERNAME ALL=(ALL) NOPASSWD: ALL chmod -w /etc/sudoers exit
 * 1) add follow line

add ~/.bash_profile
touch ~/.bash_profile

ls show color
vim ~/.bash_profile alias ls='ls -G'
 * 1) add alias

crearte some dirs
>mkdir ~/dev >mkdir ~/work_notes >mkdir ~/books >sudo mkdir /rt >sudo chown yufei:staff /rt

ssh-keygen
ssh-keygen -t rsa -C "your_email@example.com"

ls -la -rw---  1 yufei  staff  1675 Jan 20 21:28 id_rsa -rw-r--r--  1 yufei  staff   400 Jan 20 21:28 id_rsa.pub
 * ls ~/.ssh, id_rsa is private key, id_rsa.pub is public key

ssh without password

 * id_rsa.pub is your public key, put it's content to the remote machine ~/.ssh/authorized_keys

install homebrew
brew -v
 * http://brew.sh

install wget
brew install wget

brew install memcached
brew update brew doctor brew install memcached

sudo gem install lunchy cp /usr/local/Cellar/memcached/$version/homebrew.mxcl.memcached.plist ~/Library/LaunchAgents/ lunchy start memcached lunchy stop memcached
 * install lunchy

install tree
brew install tree

install python
brew install python python --version
 * 1) check python version

install boto3
pip install boto3

install jinja2
pip install jinja2

install pyyaml
pip install pyyaml

install jdk
/usr/libexec/java_home -v 1.8 /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home JAVA_HOME=`/usr/libexec/java_home -v 1.8` export JAVA_HOME
 * download idk from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
 * find java home
 * 1) add JAVA_HOME to ~/.bash_profile

install eclipse
https://www.eclipse.org/downloads/

install idea

 * http://www.jetbrains.com/idea/

install atom

 * https://atom.io

install sougou pinyin

 * http://pinyin.sogou.com/mac/

install vpn and anyconnect
https://thehub.thomsonreuters.com/docs/DOC-739662
 * Request certificate

https://thehub.thomsonreuters.com/docs/DOC-1839280
 * Anyconnect download

install maven
~/dev/maven
 * location
 * add MAVEN_HOME to PATH

install tomcat
/opt/tomcat
 * location

install synergy

 * https://symless.com/

config python project in idea
File - Project Structure - Project - Project SDK, select /usr/local/bin/python (python installed by brew)

idea show empty string
Appearance - Editor - Appearance - Show whitespace

install nvm

 * https://github.com/creationix/nvm