Skip to content

Instantly share code, notes, and snippets.

@chuckha
chuckha / auto-advance.js
Created January 26, 2019 20:25
auto advance instagram on a timer
// ==UserScript==
// @name InstaAutoAdvance
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Automatically advance instagram photos on a timer
// @author You
// @match https://www.instagram.com/*
// @grant none
// ==/UserScript==
@chuckha
chuckha / kind.sh
Created February 11, 2019 17:00
testing machine set
#!/usr/bin/env bash
# Copyright 2018 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Initializing cluster
E0715 18:26:16.846592 1 runtime.go:69] Observed a panic: "hash of unhashable type []interface {}" (runtime error: hash of unhashable type []interface {})
/go/pkg/mod/k8s.io/[email protected]/pkg/util/runtime/runtime.go:76
/go/pkg/mod/k8s.io/[email protected]/pkg/util/runtime/runtime.go:65
/go/pkg/mod/k8s.io/[email protected]/pkg/util/runtime/runtime.go:51
/usr/local/go/src/runtime/panic.go:522
/usr/local/go/src/runtime/alg.go:166
/usr/local/go/src/runtime/map.go:467
/go/pkg/mod/k8s.io/[email protected]/klogr/klogr.go:87
/go/pkg/mod/k8s.io/[email protected]/klogr/klogr.go:163
@chuckha
chuckha / Tiltfile
Last active July 26, 2019 16:38
tilt file for github.com/kubernetes-sigs/cluster-api-provider-docker
project = str(local('gcloud config get-value project')).strip()
read_file(str(local('which capdctl')).rstrip('\n'))
k8s_yaml(local('capdctl platform -capi-image gcr.io/kubernetes1-226021/cluster-api-controller-amd64:dev -bp-image gcr.io/kubernetes1-226021/cluster-api-bootstrap-provider-kubeadm:dev -bp-ref master'))
docker_build('gcr.io/' + project +'/manager', '.')
@chuckha
chuckha / Tiltfile
Created July 29, 2019 19:53
Cluster API Tiltfile
# Define the name of the gcr project
project = str(local('gcloud config get-value project')).strip()
# Watch capdctl (depends on https://github.com/kubernetes-sigs/cluster-api-provider-docker/pull/124) merging
read_file(str(local('which capdctl')).rstrip('\n'))
# A command that generates YAML for your system
k8s_yaml(local('capdctl platform -capi-image gcr.io/kubernetes1-226021/cluster-api-controller-amd64:dev -bp-image gcr.io/kubernetes1-226021/cluster-api-bootstrap-provider-kubeadm:dev -bp-ref master'))
# docker_build commands for each image used in the above YAML that you want tilt to be aware of
apiVersion: "cluster.k8s.io/v1alpha1"
kind: Cluster
metadata:
name: ${CLUSTER_NAME}
spec:
clusterNetwork:
services:
cidrBlocks: ["10.96.0.0/12"]
pods:
cidrBlocks: ["192.168.0.0/16"]
# Copyright 2019 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@chuckha
chuckha / repro-failed-multi-node-cp.yaml
Created October 2, 2019 14:11
YAML used to reproduce issue
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: AWSCluster
metadata:
creationTimestamp: null
name: my-cluster
namespace: default
spec:
region: us-west-2
sshKeyName: work-laptop
---
apiVersion: infrastructure.cluster.x-k8s.io/v1alpha2
kind: DockerCluster
metadata:
creationTimestamp: null
name: my-cluster
namespace: default
spec: {}
---
apiVersion: cluster.x-k8s.io/v1alpha2
@chuckha
chuckha / client.go
Created October 25, 2019 14:43
client test
package main
import (
"context"
"fmt"
"os"
"time"
"k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"