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
$ docker run k8s.gcr.io/cluster-autoscaler:v1.2.2 /cluster-autoscaler -h | |
Usage of /cluster-autoscaler: | |
pflag: help requested | |
--address string The address to expose prometheus metrics. (default ":8085") | |
--alsologtostderr log to standard error as well as files | |
--application-metrics-count-limit int Max number of application metrics to store (per container) (default 100) | |
--azure-container-registry-config string Path to the file containing Azure container registry configuration information. | |
--balance-similar-node-groups Detect similar node groups and balance the number of nodes between them | |
--boot-id-file string Comma-separated list of files to check for boot-id. Use the first one that exists. (default "/proc/sys/kernel/random/boot_id" |
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
varnishlog -g request -q 'ReqMethod eq "PURGE"' |
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 | |
# file: ttfb.sh | |
# curl command to check the time to first byte | |
# ** usage ** | |
# 1. ./ttfb.sh "https://google.com" | |
# 2. seq 10 | xargs -Iz ./ttfb.sh "https://google.com" | |
curl -o /dev/null \ | |
-H 'Cache-Control: no-cache' \ | |
-s \ |
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 | |
#### | |
# Split MySQL dump SQL file into one file per table | |
# based on http://blog.tty.nl/2011/12/28/splitting-a-database-dump | |
#### | |
if [ $# -lt 1 ] ; then | |
echo "USAGE $0 DUMP_FILE [TABLE]" | |
exit |
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
<?php | |
// CONFIG | |
$servers = array( | |
array('Local', '127.0.0.1', 6379), | |
); | |
// END CONFIG | |
$server = 0; | |
if (isset($_GET['s']) && intval($_GET['s']) < count($servers)) { | |
$server = intval($_GET['s']); |
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 | |
mybasename=`basename $0` | |
if [ ! -e .git/hooks/${mybasename} ] ; then | |
ln -s ../../git-hooks/${mybasename} .git/hooks/${mybasename} | |
fi | |
set_traces=`git diff --cached -Gpdb\.set_trace\(\) | grep '^\+'` | |
if [ ! -z "$set_traces" ] ; then |
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 | |
# Authorize TCP, SSH & ICMP for default Security Group | |
#ec2-authorize default -P icmp -t -1:-1 -s 0.0.0.0/0 | |
#ec2-authorize default -P tcp -p 22 -s 0.0.0.0/0 | |
# The Static IP Address for this instance: | |
IP_ADDRESS=$(cat ~/.ec2/ip_address) | |
# Create new t1.micro instance using ami-cef405a7 (64 bit Ubuntu Server 10.10 Maverick Meerkat) |
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/python -u | |
""" | |
Python port of PHP serialize() and unserialize() | |
by Samuel Cochran <sj26@sj26.com> | |
I couldn't find a nice, fairly efficient implementation of serialize/unserialize for Python... so I wrote one. I didn't use str().partition because I wanted Python <2.5 compatibility. | |
TODO: Performance review. There's an awful lot of string copying. >.> |