Skip to content

Instantly share code, notes, and snippets.

View karlkfi's full-sized avatar

Karl Isenberg karlkfi

View GitHub Profile
@karlkfi
karlkfi / form.bas
Created April 29, 2013 06:58
BAS action chain.
@page (domain = "domain.com")
(path = "/email-form/") {
status-code: 200;
input.email {
text: set("myemail@domain.com");
}
input.submit:click() {
@karlkfi
karlkfi / ports.go
Created June 3, 2015 20:42
Script to generate a list of ports given a range
package main
import (
"os"
"strings"
"strconv"
"fmt"
)
// go run ports.go 10-19
@karlkfi
karlkfi / mesos-warden.yml
Created July 30, 2015 23:48
mesos bosh deployment manifest for warden
---
name: mesos
director_uuid: 737bd8ee-f4f9-4aec-9b82-80f3d0be26f1
releases:
- name: mesos
version: latest
compilation:
workers: 8
@karlkfi
karlkfi / kubernetes-gitdm.md
Last active September 5, 2016 04:15
Top 25 Kubernetes Contributors (2015-09-02)

Kubernetes repo analyzed with gitm.

git log --numstat --no-merges | ~/workspace/gitdm/gitdm -u -s -a -n -o results -b ~/workspace/gitdm -l 25

Caveats

Source tree analysis includes generated, third-party, and vendored dependency files.

@karlkfi
karlkfi / add_key.sh
Created September 10, 2015 15:30
Temporarily authorize a Mac with an SSH key from a USB drive
#!/usr/bin/env bash
hours=$1
script_dir="$(cd "$(dirname "${BASH_SOURCE}")" && pwd)"
drive_mount="$(cd "${script_dir}/.." && pwd)"
key_path="${script_dir}/id_rsa"
if [ -z ${hours} ]; then
hours=1
fi
@karlkfi
karlkfi / compose.log
Created September 14, 2015 19:39
Error: docker-compose rm -f
$ docker-compose -f "${provider_root}/docker-compose.yml rm -f
Removing docker_scheduler_1...
Removing docker_mesosslave1_1...
Removing docker_mesosslave2_1...
Removing docker_controller_1...
Removing docker_keygen_1...
Removing docker_apiserver_1...
Removing docker_mesosmaster1_1...
Removing docker_etcd_1...
Removing docker_ambassador_1...
@karlkfi
karlkfi / aggregate-service-status.md
Created September 15, 2015 00:39
Aggregate Service Status Proposal

Aggregate Status (w/ Policy)

Status aggregation is complicated, but I guess we have to start with built-in policies.

I'm not sure what "alive" means to an Service tho, when there's "ready"... Does the policy apply to both?

type StatusPolicy string

const (
@karlkfi
karlkfi / test-smoke.log
Created September 23, 2015 20:24
Kubernetes Smoke Test against mesos/docker cluster
$ ./cluster/test-smoke.sh
Testing cluster with provider: mesos/docker
Running e2e tests:
./hack/ginkgo-e2e.sh -ginkgo.focus=Guestbook.application
Setting up for KUBERNETES_PROVIDER="mesos/docker".
TODO: prepare-e2e
KUBE_MASTER_IP: 172.17.0.17:6443
>>> testContext.KubeConfig: /Users/karl/.kube/config
Sep 23 13:20:08.027: INFO: Waiting up to 10m0s for all pods (need at least 0) in namespace 'kube-system' to be running and ready
Sep 23 13:20:13.059: INFO: 2 / 2 pods in namespace 'kube-system' are running and ready (5 seconds elapsed)
@karlkfi
karlkfi / oink-a-lot.sh
Created November 10, 2015 00:03
Populate Oinker with oinks
#!/usr/bin/env bash
set -e
set -o nounset
KUBE_UI=$(dcos kubectl cluster-info | grep "KubeUI" | cut -d " " -f 5 | sed -e 's,/api,/service/kubernetes/api,')
KUBE_UI=$(echo $KUBE_UI | sed $'s,\x1b\\[[0-9;]*[a-zA-Z],,g')
#echo $KUBE_UI
OINKER=$(echo $KUBE_UI | sed -e 's/kube-system/default/' | sed -e 's/kube-ui/oinker/')
#echo $OINKER
@karlkfi
karlkfi / cloud-surfing.txt
Last active January 15, 2016 21:36
Cloud Surfing: Kubernetes on Mesos Demo Script
0. Install DCOS & DCOS CLI
> Install DCOS Community Edition: https://mesosphere.com/product/
> Follow directions from DCOS dashboard to install dcos-cli
1. Install Frameworks w/ DCOS CLI
dcos config prepend package.sources https://github.com/mesosphere/multiverse/archive/version-1.x.zip
dcos package update --validate
cat >/tmp/cassandra.json <<EOF