A list of effective ways to use a Macbook
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew tap caskroom/cask
- oh-my-zsh
- GNU coreutils
- git
- openssl
- tree
- autojump
- dos2unix
- parquet-tools
- libcouchbase
- proxychains-ng
- jenv
- httpie
- unrar
- the silver searcher
- tabset
- nmap
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
brew install coreutils git openssl tree autojump dos2unix parquet-tools \
libcouchbase proxychains-ng jenv httpie unrar tabset the_silver_searcher \
nmap
We may make mistakes by running commands on an incorrent machine. Especially when you work on a multi-tab window.
- Open iterm2's preference(⌘ + i)
- Add a badge, this would help you distinguish tabs
Automatically add badges
Create a tabset config
#~/.tabset
{
"colors": {
"pro": "red"
}
}
Modify ssh config
#~/.ssh/config
PermitLocalCommand yes
Host pro-machine
hostname 10.1.1.1
user root
localcommand tabset pro
ssh pro-machine
# A badge added automatically
alias sha1='openssl sha1'
alias sha256='openssl sha1 -a 256'
mkdircd () {
mkdir -p "$@" && eval cd "\"\$$#\"";
}
alias pbc='pbcopy'
#eg. copy current path
pwd|pbc
alias pbp='pbpaste'
#eg. convert copied text to uppercase
pbp|sed "s/./\U&/g"
#eg. use pbc with pbp
pbp|sed "s/./\U&/g"|pbc
alias ..='cd ..'
alias ...='cd ../../'
alias _='cd -'
alias gitp='git pull --rebase'
alias gitst='git status'
alias gitcl='git clone'
alias git1diff='git diff HEAD~1 HEAD'
alias gitcmt='git commit'
alias gitpo='git push origin'
brew cask install quicklook-json quicklook-csv