Skip to content

Instantly share code, notes, and snippets.

Why does GitHub need statuses?

Alice wheresalice

Why does GitHub need statuses?
View GitHub Profile
View devserver.rb do |global_config|
aptdir = (ENV['APTCACHE'] or "#{ENV['HOME']}/aptcache/")
checkout = (ENV['COOKBOOKS'] or "#{ENV['HOME']}/openstack-cookbooks")
ip_prefix = (ENV['IP_PREFIX'] or "192.168.76.")
mac_prefix = (ENV['MAC_PREFIX'] or "080027076")
fixed = (ENV['FIXED'] or "")
global_config.vm.define :chef do |config|
suffix = "100"
ip = "#{ip_prefix}#{suffix}" = "base"
# taken from
# generate server.pem with the following command:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# run as follows:
# python
# then in your browser, visit:
# https://localhost:8443
import BaseHTTPServer, SimpleHTTPServer
import ssl
View gist:c347e6b909d0bbc4256bb891e74c3191
#!/bin/bash -xe
# Parse to get Zookeeper hosts
ZK_HOST=$(grep 'zookeeper.connect=' /etc/kafka/ | cut -d'=' -f 2)
# Find the most newly created directory of Kafka in the /opt directory
KAFKA_PATH=$(find /opt/ -maxdepth 1 -name kafka-2* -print0 | xargs -0 ls -d -1 -t | head -n1)
# Manually configured list of brokers to rebalance across (zero-indexed)