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
gitFiles=$(git status --porcelain | grep "^[ADM\?][AMD] " | sed -e "s|^[ADM\?][AMD] ||") | |
if [[ -n "${gitFiles}" ]] ; then | |
for fname in $gitFiles ; do | |
git add --all -- "${fname}" | |
echo "Restaging ${fname}" | |
done | |
else | |
echo "No files changed" | |
fi |
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 elasticsearch = require('./src/elasticsearch'); | |
var async = require('async'); | |
var _ = require('lodash-node'); | |
var client = new elasticsearch.Client({ | |
host: 'localhost:9200' | |
}); | |
async.eachSeries(_.range(100), function (value, done) { | |
async.eachSeries(_.range(500), function (value, done) { | |
client.create({ index: 'tests', type: 'test', body: {something: true, value: value} }, 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
var elasticsearch = require('elasticsearch'); | |
var baseNodesToHostCallback = require('elasticsearch/src/lib/nodes_to_host'); | |
var client = new elasticsearch.Client({ | |
/* host seed list */ | |
hosts: [ ... ], | |
// sniff every 5 minutes | |
sniffInterval: 1000 * 60 * 5, | |
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
{ | |
"aggConfig": { | |
"type": "terms", | |
"schema": "split", | |
"params": { | |
"field": "agent.raw", | |
"size": 2, | |
"order": "desc", | |
"row": true | |
} |
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
{ "key": "value" } |
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
{"two": 2} |
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
{"two": 2} |
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
const url = require('url'); | |
const rison = require('rison'); | |
window.parseRison = function () { | |
var output = document.getElementById('risonOutput'); | |
var input = document.getElementById('risonInput').value; | |
var j = function (v) { | |
return JSON.stringify(v, null, ' '); | |
}; | |
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
#!/usr/bin/env bash | |
set -e | |
cd ~/apps/NzbDrone/UI; | |
all="handlebars.combined.js" | |
runtime="handlebars.runtime.js" | |
tmpl="templates.js" | |
##### |
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
parse_git_branch () | |
{ | |
if git rev-parse --git-dir >/dev/null 2>&1 | |
then | |
gitver=$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p') | |
else | |
return 0 | |
fi | |
echo -e ":$(branch_color)$gitver${c_plain}" | |
} |
OlderNewer