Skip to content

Instantly share code, notes, and snippets.

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/apimachinery@v0.0.0-20181127025237-2b1284ed4c93/pkg/util/runtime/runtime.go:76
/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20181127025237-2b1284ed4c93/pkg/util/runtime/runtime.go:65
/go/pkg/mod/k8s.io/apimachinery@v0.0.0-20181127025237-2b1284ed4c93/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/klog@v0.3.0/klogr/klogr.go:87
/go/pkg/mod/k8s.io/klog@v0.3.0/klogr/klogr.go:163
@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
@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 / capa-test.sh
Created January 22, 2019 19:52
Testing machine deployment script
#!/usr/bin/env bash
set -o xtrace
set -o errexit
set -o nounset
cleanup() {
source envfile
aws ec2 describe-instances --query "Reservations[*].Instances[*].[InstanceId]" | jq '.[][0][0]' --raw-output | xargs aws ec2 terminate-instances --instance-ids
}
---
apiVersion: v1
kind: Namespace
metadata:
name: heptio-sonobuoy
---
apiVersion: v1
kind: ServiceAccount
metadata:
labels:
all tests
[k8s.io] Cluster size autoscaler scalability [Slow] CA ignores unschedulable pods while scheduling schedulable pods [Feature:ClusterAutoscalerScalability6]
[k8s.io] Cluster size autoscaler scalability [Slow] should scale down empty nodes [Feature:ClusterAutoscalerScalability3]
[k8s.io] Cluster size autoscaler scalability [Slow] should scale down underutilized nodes [Feature:ClusterAutoscalerScalability4]
[k8s.io] Cluster size autoscaler scalability [Slow] should scale up at all [Feature:ClusterAutoscalerScalability1]
[k8s.io] Cluster size autoscaler scalability [Slow] should scale up twice [Feature:ClusterAutoscalerScalability2]
[k8s.io] Cluster size autoscaler scalability [Slow] shouldn't scale down with underutilized nodes due to host port conflicts [Feature:ClusterAutoscalerScalability5]
[k8s.io] Docker Containers should be able to override the image's default arguments (docker cmd) [Conformance]
[k8s.io] Docker Containers should be able to override the image's default command and arguments [Co
apiVersion: apps/v1beta1 # for versions before 1.6.0 use extensions/v1beta1
kind: Deployment
metadata:
name: nginx-deployment
spec:
replicas: 3
template:
metadata:
labels:
app: nginx
#!/bin/bash
# Check that the environment variable has been set correctly
if [ -z "$SECRETS_BUCKET_NAME" ]; then
echo >&2 'error: missing SECRETS_BUCKET_NAME environment variable'
exit 1
fi
# Load the S3 secrets file contents into the environment variables
eval $(aws s3 cp s3://${SECRETS_BUCKET_NAME}/db_credentials.txt - | sed 's/^/export /')
diff --git a/app/controllers/maps_controller.rb b/app/controllers/maps_controller.rb
index 0ca8b08..6a832d2 100644
--- a/app/controllers/maps_controller.rb
+++ b/app/controllers/maps_controller.rb
@@ -86,7 +86,8 @@ class MapsController < ApplicationController
@tracks = []
expeditions.each do |exp|
- if exp.style['simplify'] == true
+
class ICanDoAnything
def initialize args
args.each do |k,v|
instance_variable_set("@#{k}", v) unless v.nil?
end
end
end