This is a vimdiff cheat sheet as a git mergetool.
]c - go to next difference
chrome_ev: | |
gcc -o chrome_ev chrome_ev.cc |
worker_processes 1; | |
error_log /dev/stderr debug; | |
events { | |
worker_connections 256; | |
} | |
http { | |
server { |
# This is a general-purpose function to ask Yes/No questions in Bash, either | |
# with or without a default answer. It keeps repeating the question until it | |
# gets a valid answer. | |
ask() { | |
# http://djm.me/ask | |
local prompt default REPLY | |
while true; do |
<?php | |
// Use in the "Post-Receive URLs" section of your Bitbucket repo. | |
if ( $_POST['payload'] ) { | |
$data = json_decode($_POST['payload']); | |
$commits = $data->{"commits"}; | |
<?php | |
// Use in the "Post-Receive URLs" section of your GitHub repo. | |
$path = "/var/www/html/abc"; | |
if ( $_POST['payload'] ) { | |
shell_exec( 'cd '.$path.' && git reset --hard HEAD && git pull 2>&1' ); | |
} |
# GIT / GIT FLOW ALIASES | |
# https://gist.github.com/kujiy/c6afe3a8577e37af6566e1699bfc6f51 | |
# alias gs="git status" # Unfortunately Ghost Script used `gs` already. | |
alias gss="git status" | |
alias gd="git diff" | |
alias gdc="git diff --cached" | |
gdn() { git diff --no-index -- $1 $2; } | |
alias gb="git branch" | |
alias gbr="git branch -r" |
diff --git a/Smarty.tmPreferences b/Smarty.tmPreferences | |
index bf6a0ea..f4117e0 100644 | |
--- a/Smarty.tmPreferences | |
+++ b/Smarty.tmPreferences | |
@@ -14,13 +14,13 @@ | |
<key>name</key> | |
<string>SMARTY_LDELIM</string> | |
<key>value</key> | |
- <string><![CDATA[{]]></string> | |
+ <string><![CDATA[<{ ]]></string> |
{ | |
// The command to execute for the terminal, leave blank for the OS default | |
// On OS X the terminal can be set to iTerm.sh to execute iTerm | |
"terminal": "C:\\Program Files\\Git\\git-bash.exe", | |
// A list of default parameters to pass to the terminal, this can be | |
// overridden by passing the "parameters" key with a list value to the args | |
// dict when calling the "open_terminal" or "open_terminal_project_folder" | |
// commands | |
"parameters": ["-c", "cd \"%CWD%\" && \"C:\\Program Files\\Git\\bin\\sh.exe\" -i -l"] |
#!/usr/bin/php | |
<?php | |
/** | |
* .git/hooks/pre-commit | |
* original -> https://gist.github.com/mardix/3623562 | |
*/ | |
/** | |
* collect all files which have been added, copied or | |
* modified and store them in an array called output |