- copy the file
commit-msg
to.git/hooks/commit-msg
- make sure your delete the sample file
.git/hooks/commit-msg.sample
- Make commit msg executable.
chmod +x .git/hooks/commit-msg
- Edit
commit-msg
to better fit your development branch, commit regex and error message - Profit $$
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
// Eric Millin (c) 2014 | |
// MIT X11 license (http://opensource.org/licenses/MIT) | |
// | |
// C# and Python inspired string templating. Target tokens must be numbered with the index of the | |
// replacement string and surrounded by curly brackets; e.g: | |
// | |
// "{0} {1} {0}".format("foo", "bar"); // "foo bar foo" | |
// |
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
The files will make the most sense if you read them in this order: | |
device.js | |
android-base-device.js | |
android-uiautomator.js | |
others.js | |
I hate how gist doesn't give you the ability to keep the files in the original order. |
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
it('should hide keyboard using bad key', function (done) { | |
driver | |
.elementByClassName('UIATextField').sendKeys("1") | |
.elementByClassName('UIASwitch').isDisplayed() | |
.should.become(false) | |
.hideKeyboard("f") | |
.elementByClassName('UIASwitch').isDisplayed() | |
.should.become(true) | |
.nodeify(done); |
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 helpers.js | |
Object.prototype.forOf = function(iterateFunc) { | |
var keys = Object.keys(this), | |
continueLoop = true; | |
var breakLoop = () => continueLoop = false; | |
for(var counter = 0; counter < keys.length && continueLoop; counter++) { | |
iterateFunc(this, keys[counter], breakLoop); | |
} | |
}; |
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
var net = require("net"); | |
var exec = require('child_process').exec; | |
var ADB = require('appium-adb'); | |
//var adb = new ADB(); | |
var template = '{"action":"Prepare", "cmd":"foo"}'; | |
// var args = process.argv.slice(2).join(' '); | |
// adb.getConnectedDevices(function(err, devices) { |
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
apt-get update | |
apt-get install -qy git clang | |
mkdir ~/chromium | |
cd ~/chromium | |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
echo "export DEPOT_TOOLS=\"\$HOME/chromium/depot_tools\"" >> ~/.bashrc | |
echo "export PATH=\"\$PATH:$DEPOT_TOOLS\"" >> ~/.bashrc |
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
/// <summary> | |
/// Generator that allows lazy access to paginated resources. | |
/// </summary> | |
/// <typeparam name="TValue"></typeparam> | |
/// <param name="overrideUrl"></param> | |
/// <param name="pageLen"></param> | |
/// <returns></returns> | |
protected IEnumerable<List<TValue>> IteratePages<TValue> (string overrideUrl, int pageLen = DEFAULT_PAGE_LEN) { | |
Debug.Assert(!String.IsNullOrEmpty(overrideUrl)); | |
Debug.Assert(!overrideUrl.Contains("?")); |
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/sh | |
# Called by "git push" after it has checked the remote status, | |
# but before anything has been pushed. | |
# | |
# If this script exits with a non-zero status nothing will be pushed. | |
# | |
# Steps to install, from the root directory of your repo... | |
# 1. Copy the file into your repo at `.git/hooks/pre-push` | |
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push` |
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
function getBranch { | |
git symbolic-ref --short HEAD 2> /dev/null | |
if [ $? == 0 ] && [ `git rev-parse --is-inside-work-tree`==true ]; then | |
echo "(`git symbolic-ref --short HEAD`)" | |
fi | |
} | |
function setPrompt { | |
GIT_EXEC_PATH=/c/tools/cmder/vendor/git-for-windows/mingw64/ | |
COMPLETION_PATH="${GIT_EXEC_PATH%/libexec/git-core}" |
OlderNewer