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
git show $COMMIT | |
# OR | |
git diff HEAD^ HEAD | |
# OR | |
git diff --cached <file_name> |
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
git branch -m <old_branch> <new_branch> |
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
+ Ctrl + V to go into column mode | |
+ Select the columns and rows where you want to enter your text | |
+ Shift + i to go into insert mode in column mode | |
+ Type in the text you want to enter. Dont be discouraged by the fact that only the first row is changed. | |
+ Esc to apply your change (or alternately Ctrl+C) | |
http://pivotallabs.com/column-edit-mode-in-vi/ |
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
$ git reset --hard origin/master |
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
$(document).ready(function() { | |
// put all your jQuery goodness in here. | |
}); | |
// OR | |
$(function() { | |
// put all your jQuery goodness in here. | |
}); |
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
find . -name "*.ext" -type f -exec grep -i "text" {} + |
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
# Deploy and run migrations | |
$ cap <environment> deploy:migrations | |
# Run migrations | |
$ cap <environment> deploy:migrate |
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
$ git remote show origin |
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
def friendly_filename(filename) | |
filename.gsub(/[^\w\s_-]+/, '') | |
.gsub(/(^|\b\s)\s+($|\s?\b)/, '\\1\\2') | |
.gsub(/\s+/, '_') | |
end |
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
git checkout <commit> <path/to/file> |
OlderNewer