- 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
using System.Collections.Generic; | |
namespace Andrey | |
{ | |
public enum Terrain | |
{ | |
Forest, | |
MountainForest, | |
Marsh, | |
Desert, |
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
diff --git a/src/grib_context.c b/src/grib_context.c | |
index d4f5a34..d59b7f3 100644 | |
--- a/src/grib_context.c | |
+++ b/src/grib_context.c | |
@@ -1018,8 +1018,12 @@ void codes_assertion_failed(const char* message, const char* file, int line) | |
/* Default behaviour is to abort | |
* unless user has supplied his own assertion routine */ | |
if (assertion == NULL) { | |
+ grib_context* c = NULL; | |
+ c = grib_context_get_default(); |
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
diff --git a/grib_api/src/grib_context.c b/grib_api/src/grib_context.c | |
index ecfd1a5..384f005 100644 | |
--- a/grib_api/src/grib_context.c | |
+++ b/grib_api/src/grib_context.c | |
@@ -341,6 +341,8 @@ static grib_context default_grib_context = { | |
0 /* classes */ | |
#if GRIB_PTHREADS | |
,PTHREAD_MUTEX_INITIALIZER /* mutex */ | |
+#elif GRIB_OMP_THREADS | |
+ ,0 /* omp_nest_lock_t */ |
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}" |
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
/// <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
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
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
// 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); | |
} | |
}; |
NewerOlder