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
files: | |
"/opt/elasticbeanstalk/#etc#nginx#optimized-nginx.conf": | |
mode: "000644" | |
owner: root | |
group: root | |
encoding: plain | |
content: | | |
# Elastic Beanstalk Managed | |
# Elastic Beanstalk managed configuration file |
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 python2.7 | |
# Copyright (C) 2017 Amazon.com, Inc. or its affiliates. | |
# All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"). | |
# You may not use this file except in compliance with the License. | |
# A copy of the License is located at | |
# | |
# http://aws.amazon.com/apache2.0/ |
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/bash -xe | |
# requires jq and 3 brokers to start | |
which jq || echo 'no jq found, bye!' && exit 1 | |
ZK_HOST=zkhost1:2181/kafka | |
# record all topics | |
/usr/local/kafka/bin/kafka-topics.sh --zookeeper $ZK_HOST --list > all_topics | |
# generate json for listing which topics to reassign |
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/ruby | |
require 'net/ssh' | |
require 'pp' | |
def fetch(host) | |
data = [] | |
Net::SSH.start(host, 'virool') do |ssh| | |
index_folders = ssh.exec!("ls -d /var/lib/kafka/*").split("\n") | |
data = index_folders.flat_map do |ifolder| |
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/bash | |
################################################################################ | |
# | |
# Delete least used files | |
# | |
################################################################################ | |
PROGNAME=${0##*/} | |
PROGDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
VERSION="0.1" |
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
<!DOCTYPE html> | |
<html> | |
<!-- ZevRoss Spatial Analysis, www.zevross.com --> | |
<!-- A note: if you're not seeing the elements in the custom | |
infowindow look at the cartodb dashboard and make sure they're | |
turned on | |
--> |
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
// derived from http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Parallel_algorithm | |
function map() { | |
emit(1, // Or put a GROUP BY key here | |
{sum: this.value, // the field you want stats for | |
min: this.value, | |
max: this.value, | |
count:1, | |
diff: 0, // M2,n: sum((val-mean)^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
#!/bin/bash | |
# vars | |
PHP_VERSION="5.3.6" | |
NGINX_VERSION="1.0.4" | |
MONGO_VERSION="1.8.1" | |
MEMCACHED_VERSION="1.4.5" | |
DIRECTORY=$(cd `dirname $0` && pwd) | |
PHP_DIR=$DIRECTORY/lib/php/$PHP_VERSION/ |