This document is no longer being updated at this location. To see an up-to-date version, head over to its new home.
Convenient
Arbitrarily
Nestable
| import ( | |
| "encoding/json" | |
| ) | |
| #Predicate: { | |
| Data: string | |
| Timestamp: string | |
| } | |
| #ExternalRefs: { | 
This document is no longer being updated at this location. To see an up-to-date version, head over to its new home.
Convenient
Arbitrarily
Nestable
| 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 | 
| #!/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 | 
| #!/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 :` | 
| #!/usr/bin/env python | |
| from optparse import OptionParser | |
| from brod.zk import * | |
| import pickle | |
| import struct | |
| import socket | |
| import sys | |
| import time | 
| echo '{ | |
| "handlers": ["debug"], | |
| "name": "push_woot_test", | |
| "output": "woot!", | |
| "status": 0 | |
| }' | nc -w1 127.0.0.1 3030 | 
| # 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) |