This file contains 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 PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH" | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function | |
# @terminal: | |
# curl -o ~/.git-prompt.sh \ | |
# https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh | |
source ~/.git-prompt.sh |
This file contains 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
/* | |
* fragment.html | |
* <ul class="fragment"> | |
* <li>Add some data.</li> | |
* </ul> | |
*/ | |
/* | |
* read, set (also have sandbox for your convienience, loadFixtures | |
*/ |
This file contains 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
/* in root/public/javascripts/scripts.js */ | |
var myObj = { | |
someMethod: function(){ | |
$.get('someFile.html', function(data){ | |
return data; | |
}); | |
} | |
}; | |
/* in root/spec/javascripts/spiesSpec.js */ |
This file contains 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/bash | |
SRC="/Users/chungkang/MASTER/" | |
VRENAME="UH GUIDE" | |
if [ -d /Volumes/NO\ NAME ] | |
then | |
for USB in /Volumes/NO\ NAME* | |
do | |
echo "$USB: Starting" | |
rm -rf "$USB" 2> /dev/null |
This file contains 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
rsync -azv --rsh=ssh user@example.org:/home/user/www ~/backups/example.org_user/ | |
#The preceding command uses SSH to copy the files in /home/user/www on example.org to a backup directory in your home directory #on your local machine. |
This file contains 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
# get all process with name of 'chrome' | |
ps -ef | grep chrome | |
# output something like: 501 13161 2006 0 7:46AM ttys001 0:00.00 grep chrome | |
# Now Kill it! | |
kill -9 13161 |
This file contains 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
replace design with dezine.... in all *.htm.. | |
In current directory. | |
perl -pi -e 's/design/dezine/g' *.htm | |
ex: | |
perl -pi -e 's/uhmap.displayShortNames\(this\)\;/ /g' *.php |
This file contains 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
http://stackoverflow.com/questions/12712865/use-a-different-email-config-during-unit-testing-in-cakephp |
This file contains 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
// In Preferences: Set to true to removing trailing white space on save | |
"trim_trailing_white_space_on_save": true, | |
JSlint | |
CSSLint | |
JSONLint | |
PHPUnit | |
Stylus | |
CakePHP | |
Color Highlighter |
This file contains 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
# Easier to read | |
git log --graph --oneline | |
git config --global core.editor "subl -n -w" | |
git config --global push.default upstream | |
git config --global merge.conflictstyle diff3 | |
# Have different colors when using git | |
git config --global color.ui auto |
OlderNewer