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
alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".split("") | |
base = alphabet.length | |
exports.encode = (i) -> | |
return alphabet[0] if i is 0 | |
s = "" | |
while i > 0 | |
s += alphabet[i % base] | |
i = parseInt(i / base, 10) |
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
{ | |
"ok" : true, | |
"_shards" : { | |
"total" : 10, | |
"successful" : 10, | |
"failed" : 0 | |
}, | |
"indices" : { | |
"components_usages" : { | |
"shards" : { |
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
{ | |
"ok" : true, | |
"_shards" : { | |
"total" : 10, | |
"successful" : 10, | |
"failed" : 0 | |
}, | |
"indices" : { | |
"components_usages" : { | |
"shards" : { |
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
{"cluster_name":"toolbarAnalyticsProd","master_node":"3zmlEF3QTwmROixx81va9w","blocks":{},"nodes":{"mn9lHY_BSRKfxBzB4WKarw":{"name":"Ectokid","transport_address":"inet[/10.28.131.75:9300]","attributes":{}},"6TWnXu-EREmN3xYTnvN8Mg":{"name":"Pixie","transport_address":"inet[/10.28.89.101:9300]","attributes":{}},"FkhJV3H1Sw-VX0KI4uiMvw":{"name":"Moondragon","transport_address":"inet[/10.28.89.99:9300]","attributes":{}},"pIfpHSbhRDqGqbSOst1Oyw":{"name":"Atom Bob","transport_address":"inet[/10.28.89.112:9300]","attributes":{}},"3zmlEF3QTwmROixx81va9w":{"name":"Blowhard","transport_address":"inet[/10.28.89.85:9300]","attributes":{}},"UDgVYC75TSqp8vGeuX41MA":{"name":"Vulcan","transport_address":"inet[/10.28.89.153:9300]","attributes":{}}},"metadata":{"templates":{},"indices":{"key_facts":{"state":"open","settings":{"index.number_of_replicas":"1","index.number_of_shards":"2","index.version.created":"190099","index.search.slowlog.threshold.query.warn":"4s","index.search.slowlog.level":"TRACE","index.routing.allocation |
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
namespace :release do | |
desc "get current commit in remote server" | |
task :before do | |
begin | |
remote_sha = capture("cd #{current_path}; git rev-parse --verify HEAD") | |
set :remote_before_commit, remote_sha.strip | |
# first time deploy can throw exception | |
rescue | |
end | |
end |