Skip to content

Instantly share code, notes, and snippets.

View andrew-blake's full-sized avatar

Andrew Blake andrew-blake

View GitHub Profile
@andrew-blake
andrew-blake / haproxy.conf
Created November 23, 2018 09:38 — forked from thpham/haproxy.conf
test config haproxy for gRPC loadbalancing
global
tune.ssl.default-dh-param 1024
defaults
timeout connect 10000ms
timeout client 60000ms
timeout server 60000ms
frontend fe_http
mode http
@andrew-blake
andrew-blake / PyDataRangeQueries.ipynb
Created March 29, 2018 15:38 — forked from dice89/PyDataRangeQueries.ipynb
The Code for my Talk at PyData in Berlin September 2017
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andrew-blake
andrew-blake / xerces-c.rb
Last active October 23, 2022 05:18
Legacy homebrew xerces-c.rb @ 3.1
# brew install https://xxx/xerces-c.rb
require 'formula'
class XercesC <Formula
url 'https://archive.apache.org/dist/xerces/c/3/sources/xerces-c-3.1.0.tar.gz'
homepage 'http://xerces.apache.org/xerces-c/'
def install
system "./configure", "--prefix=#{prefix}", "--disable-debug", "--disable-dependency-tracking"
@andrew-blake
andrew-blake / singleton.py
Created November 23, 2015 19:53 — forked from werediver/singleton.py
A thread safe implementation of singleton pattern in Python. Based on tornado.ioloop.IOLoop.instance() approach.
import threading
# Based on tornado.ioloop.IOLoop.instance() approach.
# See https://github.com/facebook/tornado
class SingletonMixin(object):
__singleton_lock = threading.Lock()
__singleton_instance = None
@classmethod
#!/bin/bash -ue
#
# this script will attempt to detect any ephemeral drives on an EC2 node and create a RAID-0 stripe.
# It should be run once to setup the RAID, and automatically mount on reboot without further intervention.
#
# Beware, This script is NOT fully idempotent.
#
mount_point=${1:-"/mnt"}
METADATA_URL_BASE="http://169.254.169.254/latest"