Mac OS X tricks
How can I make auto-hide/show for the dock faster? (from here)
defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock
open command can let you open file and url in terminal
open . # will open the current folder in finder open ./XXX.md # will open the markdown file with the default editor open http://www.baidu.com open -a dash # open a application of dash oepn *.png # open all the png images
say command
You can let your Mac speaking,
say "Hello world" say -f <file>
Setting iterm2
This setting will let you use the Emacs keybindings.
Change the keyboard behavior:
left option ⇒ +ESC
How to “Quit” the Finder in OS X Using those commands will be ok:
defaults write com.apple.finder QuitMenuItem -bool true killall Finder
To reverse this action, enter the following command:
defaults write com.apple.finder QuitMenuItem -bool false killall Finder
Configure bash and/or vim to execute source ~/.bashrc everytime I finish editing it
The direct way to do it:
vim ~/.bashrc && source $_
You can make an alias:
alias vimbashrc='vim ~/.bashrc && source $_'
This works in bash or zsh. In other shell, you must explicit name .bashrc to source to make it work:
alias vimbashrc='vim ~/.bashrc && source ~/.bashrc'
Force reload all resources(css, js..) of Chrome
Just press the key of :
Shift + Command + R