Skip to content

Instantly share code, notes, and snippets.

Avatar

joe miller joemiller

View GitHub Profile
View clusters.makefile
# Cluster management tools.
# See https://github.com/grampelberg/k8s-clusters for updates and documentation.
export CLUSTER_NAME ?= $(shell cat tmp/current 2>/dev/null || echo $$(whoami)-dev)
export MACHINE_TYPE ?= n1-standard-2
export DISK_SIZE ?= 100
export MAX_NODES ?= 10
export NETWORK ?= dev
export PROJECT ?= foobar
export VERSION ?= latest
@judas-christ
judas-christ / fix-refresh-rate.sh
Last active May 21, 2020
How to change refresh rate on an external display on macOS
View fix-refresh-rate.sh
# install homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# install cscreen
brew cask install cscreen
# list displays
cscreen -l
# find your external screen in the list and write the number (not the ID) down somewhere
# in the following instructions, use that number instead of <SCREEN>
@n0531m
n0531m / list_gcp_iprange.sh
Last active Sep 4, 2020
Google Cloud Platform : ip address range
View list_gcp_iprange.sh
#!/bin/bash
# https://cloud.google.com/compute/docs/faq#find_ip_range
# nslookup -q=TXT _cloud-netblocks.googleusercontent.com 8.8.8.8
myarray=()
for LINE in `dig txt _cloud-netblocks.googleusercontent.com +short | tr " " "\n" | grep include | cut -f 2 -d :`
do
myarray+=($LINE)
for LINE2 in `dig txt $LINE +short | tr " " "\n" | grep include | cut -f 2 -d :`
@phobos182
phobos182 / kafka_consumer.py
Created Oct 22, 2012
Kafka Graphite Consumer
View kafka_consumer.py
#!/usr/bin/env python
from optparse import OptionParser
from brod.zk import *
import pickle
import struct
import socket
import sys
import time
@nstielau
nstielau / client.sh
Created Sep 27, 2012
Sensu Push Example
View client.sh
echo '{
"handlers": ["debug"],
"name": "push_woot_test",
"output": "woot!",
"status": 0
}' | nc -w1 127.0.0.1 3030
View gist:992206
# Based on https://github.com/ripienaar/mcollective-plugins/blob/master/agent/urltest/urltest.rb
require 'net/http'
require 'socket'
req_url = "http://www.google.com"
url = URI.parse(req_url)
You can’t perform that action at this time.