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
export CLICOLOR=1 | |
export LSCOLORS=ExFxCxDxBxegedabagacad | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
PS1="\[\033[0;32m\]\w\[\033[00m\]\$(parse_git_branch)\\$ " | |
alias ll='ls -la' | |
alias l='ls -CF' |
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
[user] | |
name = Sebastian Kim | |
email = [email protected] | |
[color] | |
status = auto | |
branch = auto | |
diff = auto | |
ui = auto | |
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 imagemagick | |
brew install imagick | |
cd /usr/lib/php/extensions/no-debug-non-zts-20090626 | |
sudo ln -s /usr/local/Cellar/imagick/3.0.1/lib/php/extensions/imagick.so imagick.so | |
echo "extension='/usr/lib/php/extensions/no-debug-non-zts-20090626/imagick.so'" >> /usr/local/etc/php.ini |
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
# ssh -f -N -L 3306:127.0.0.1:3306 [email protected] | |
Host dev | |
HostName dev.example.com | |
LocalForward 3306 127.0.0.1:3306 | |
User skim |
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
# first sphinx | |
brew install sphinx | |
# the formula does not install libsphinxclient :/ | |
wget http://sphinxsearch.com/files/sphinx-2.0.4-release.tar.gz | |
tar xzf sphinx-2.0.4-release.tar.gz | |
cd sphinx-2.0.4-release/api/libsphinxclient/ | |
CXXCPP="gcc -E" ./configure --prefix=/usr/local | |
make | |
make install |
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 | |
(( ${#} > 0 )) || { | |
echo 'DISCLAIMER: USE THIS SCRIPT AT YOUR OWN RISK!' | |
echo 'THE AUTHOR TAKES NO RESPONSIBILITY FOR THE RESULTS OF THIS SCRIPT.' | |
echo "Disclaimer aside, this worked for the author, for what that's worth." | |
echo 'Press Control-C to quit now.' | |
read | |
echo 'Re-running the script with sudo.' | |
echo 'You may be prompted for a password.' | |
sudo ${0} sudo |
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
Status Code Status Message Symbol | |
1xx Informational | |
100 Continue :continue | |
101 Switching Protocols :switching_protocols | |
102 Processing :processing | |
2xx Success | |
200 OK :ok | |
201 Created :created | |
202 Accepted :accepted |
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
ActiveRecord::Base.connection.execute('EXPLAIN QUERY PLAN SELECT * FROM users where id = 10') | |
= User.find(10).explain | |
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
# Remove all Thumbs.db files reculsively from current directory | |
find ./ -name "Thumbs.db" -exec rm '{}' \; |
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
# Remove all Thumbs.db files reculsively from current directory | |
find ./ -name "Thumbs.db" -exec rm '{}' \; | |
# Restore default permissions | |
chmod 755 $(find ./ -type d) && chmod 644 $(find ./ -type f) |
OlderNewer