This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ps axc|awk "{if (\$5==\"$1\") print \$1}"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function zshaddhistory() { # {{{ | |
# http://mollifier.hatenablog.com/entry/20090728/p1 | |
local line cmd | |
line=${1%%$'\n'} | |
cmd=${line%% *} | |
# Add command to history if it meets the following conditions | |
[[ ${#line} -ge 5 | |
&& ${cmd} != (l|l[sal]) | |
&& ${cmd} != (c|cd) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /System/Library/Audio/UISounds | |
mv photoShutter.caf photoShutter.caf.bak |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if ! type tmux >/dev/null 2>&1; then | |
echo 'Error: tmux command not found' 2>&1 | |
exit 1 | |
fi | |
if [ -n "$TMUX" ]; then | |
echo "Error: tmux session has already been attached" 2>&1 | |
exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo gem install ronn | |
rbenv rehash | |
cd /usr/local/homebrew/Library/Contributions/cmd | |
HOMEBREW_REPOSITORY=/usr/local/homebrew HOMEBREW_PREFIX=/usr/local ./brew-man | |
cd /usr/local/homebrew/share/man/man1/ | |
ls | |
ln -s brew.1 /usr/local/share/man/man1/ | |
man brew |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install cmigemo | |
mkdir -p ~/.vim/bundle/manual/migemo/plugin | |
cd ~/.vim/bundle/manual/migemo/plugin | |
curl -L -O https://raw.github.com/koron/cmigemo/master/tools/migemo.vim | |
vi ~/.vimrc | |
NeoBundle 'migemo', {'type' : 'nosync', 'base' : '~/.vim/bundle/manual'} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mount -uw / | |
launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist | |
passwd <username> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# check latest file at https://code.google.com/p/iterm2/downloads/list | |
curl -L -O https://iterm2.googlecode.com/files/tmux-for-iTerm2-xxxxxxxx.tar.gz | |
tar zxvf tmux-for-iTerm2-xxxxxxxxx.tar.gz | |
cd tmux | |
sh autogen.sh | |
./configure | |
make clean && make | |
sudo make install | |