Skip to content

Instantly share code, notes, and snippets.

View joemiller's full-sized avatar

joe miller joemiller

View GitHub Profile
import (
"encoding/json"
)
#Predicate: {
Data: string
Timestamp: string
}
#ExternalRefs: {
@djhaskin987
djhaskin987 / CANDL.md
Last active July 18, 2022 14:58
Convenient Arbitrarily Nestable Document Language

This Document Has Moved

This document is no longer being updated at this location. To see an up-to-date version, head over to its new home.

CANDL

Convenient
Arbitrarily
Nestable
@ZPascal
ZPascal / hoge.rb
Last active August 18, 2023 14:06 — forked from minamijoyo/hoge.rb
Using GitHubPrivateRepositoryReleaseDownloadStrategy removed in brew v2
require "formula"
require_relative "lib/private_strategy"
class Hoge < Formula
homepage "https://github.com/yourcompany/hoge"
url "https://github.com/yourcompany/hoge/releases/download/v0.1.0/hoge_v0.1.0_darwin_amd64.tar.gz", :using => GitHubPrivateRepositoryReleaseDownloadStrategy
sha256 "6de411ff3e4b1658a413dd6181fcXXXXXXXXXXXXXXXXXXXX"
head "https://github.com/yourcompany/hoge.git"
version "0.1.0"
# 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 November 6, 2023 15:15
How to change refresh rate on an external display on macOS
# 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>
@daveadams
daveadams / acl-vault-tests.sh
Created December 19, 2015 13:30
ACL policy and tests for Hashicorp Vault
#!/bin/bash
echo -n "Starting vault... "
vault server -dev &> vault-server.log &
vault_pid=$!
echo OK
shutdown() { trap "" EXIT; echo -n 'Shutting down... '; kill -9 $vault_pid; echo OK; exit $1; }
trap "shutdown 0" EXIT
trap "echo; echo 'Got interrupt signal!'; shutdown 255" INT
@n0531m
n0531m / list_gcp_iprange.sh
Last active January 16, 2024 22:26
Google Cloud Platform : ip address range
#!/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 October 22, 2012 15:07
Kafka Graphite Consumer
#!/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 September 27, 2012 23:22
Sensu Push Example
echo '{
"handlers": ["debug"],
"name": "push_woot_test",
"output": "woot!",
"status": 0
}' | nc -w1 127.0.0.1 3030
@vvuksan
vvuksan / gist:992206
Created May 25, 2011 23:03
URL Metrics
# 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)