August 29, 2014

Update local feature branch to sync with master:

git rebase master

Squash last 4 commits:

git rebase -i HEAD~4
Opens an editor where you can enter commands (described below) for each commit to be rebased. These commands determine how individual commits will be transferred to the new base. You can also reorder the commit listing to change the order of the commits themselves.

Generate commits to cancel previous specific commit

git revert <sha>
Creates a new commit that cancels the changes made by the <sha> commit.

https://www.atlassian.com/git/tutorial/rewriting-git-history

August 28, 2014
#!/bin/bash
sendalert () {
    echo "[`date "+%y-%m-%d %H-%M"`] Replication ERROR $SERVER" >> replication.log
    ./sendmail.sh "$SERVER" "Replication error $SERVER"
}
testServer() {
    printf "$INSTANCE..."
    test=$(ssh -p$PORT root@$SERVER "mysql -e 'show slave status\G'")
    if [[ $test != *"Slave_IO_Running: Yes"* ]]; then
        printf " IO stopped \n"
        sendalert
        return
    fi
    if [[ $test != *"Slave_SQL_Running: Yes"* ]]; then
        printf " SQL slave stopped \n"
        sendalert
        return
    fi
    seconds=$(echo "$test" | grep "Seconds_Behind_Master" | cut -d ':' -f 2)
    printf " $seconds seconds behind master"
    if [[ $seconds -gt 20 ]]; then
        printf " $seconds seconds behind master \n"
        sendalert
        return
    fi
    printf " ...OK\n"
}
PORT=25
for INSTANCE in 2 3 4 5
do
    SERVER=host$INSTANCE.xxxx.com
    testServer
done 

August 27, 2014
Check that the option is checked in method call as well.
Also, check that it is set in the solution and project preferences.

August 25, 2014
In Monodevelop and Visual Studio capture groups and backreferences are used just like in C#. You can capture them with common parenthesis, and backreference them with $0, $1, etc. For example, find:
 GetValue\((\d*)\)
And replace:
 NewGetValue($0)
Sublime uses \1, \2, etc...

August 25, 2014
Create a patch for a specific commit:
git format-patch -1 <sha>
Apply patch:
git am xxx.patch
All patches:
git am *.patch
Resolve conflicts:
git am -3 < xxx.patch
the -3 will do a three-way merge if there are conflicts. At this point you can do a git mergetool To take a look at what changes are in the patch:
git apply --stat xxx.patch
To check if there is going to be any problem:
git apply --check xxx.patch