Skip to content

Instantly share code, notes, and snippets.

View fieldju's full-sized avatar

Justin Field fieldju

View GitHub Profile
"clouddriver.clouddriver.authorization.missingApplication_count",
"clouddriver.clouddriver.authorization_count",
"clouddriver.clouddriver.aws.request.httpClientGetConnectionTime_count",
"clouddriver.clouddriver.aws.request.httpClientGetConnectionTime_max",
"clouddriver.clouddriver.aws.request.httpClientGetConnectionTime_total",
"clouddriver.clouddriver.cats.redisCache.evict.delOperations_count",
"clouddriver.clouddriver.cats.redisCache.evict.hashesDeleted_count",
"clouddriver.clouddriver.cats.redisCache.evict.hdelOperations_count",
"clouddriver.clouddriver.cats.redisCache.evict.itemCount_count",
"clouddriver.clouddriver.cats.redisCache.evict.keysDeleted_count",
#! /bin/bash
BUNDLE_HOME=${HOME}/minikube-config-bundle
rm -fr ${BUNDLE_HOME}
mkdir -p ${BUNDLE_HOME}
cp ${HOME}/.minikube/ca.crt ${BUNDLE_HOME}/ca.crt
cp ${HOME}/.minikube/profiles/minikube/client.crt ${BUNDLE_HOME}/client.crt.crt
cp ${HOME}/.minikube/profiles/minikube/client.key ${BUNDLE_HOME}/client.key
#! /bin/bash
sudo sysctl fs.protected_regular=0
sudo minikube
sudo minikube delete
sudo minikube start --driver none
rm -fr $HOME/.kube $HOME/.minikube
sudo cp -r /root/.kube /root/.minikube $HOME
sudo chown -R $USER $HOME/.kube $HOME/.minikube
apiVersion: batch/v1
kind: Job
metadata:
name: pi
namespace: fieldju-dev
spec:
template:
spec:
containers:
- name: pi
@fieldju
fieldju / example.groovy
Created May 6, 2020 22:53
lazy evaluation of property
def version = project.getObjects().property(String.class)
version.set(project.provider({ subProj.configurations.compileClasspath.resolvedConfiguration.firstLevelModuleDependencies.find( { module ->
return module.moduleName == "clouddriver-web"
}).moduleVersion}))
def ossVersion = "${ -> version.get()}"
@fieldju
fieldju / typescript-script-template.ts
Created March 19, 2020 16:07
typescript script template
import * as winston from 'winston'
const LOGGER = winston.createLogger({
transports: new winston.transports.Console({
format: winston.format.combine(
winston.format.timestamp(),
winston.format.colorize(),
winston.format.printf(msg => {
return `${msg.timestamp} - ${msg.level}: ${msg.message}`
})
@fieldju
fieldju / nebula-release.sh
Last active March 6, 2020 05:21
Gist for determining if should be patch or minor
#! /bin/bash
TAGS=$(git tag -l)
BRANCH=$(git rev-parse --abbrev-ref HEAD)
BRANCH_WITH_RELEASE_TRIMMED=${BRANCH//release-/}
BRANCH_WITH_X_SUFFIX_TRIMMED=${BRANCH_WITH_RELEASE_TRIMMED//.x/}
VERSION_PREFIX=$BRANCH_WITH_X_SUFFIX_TRIMMED
PATTERN="v${VERSION_PREFIX}"
echo "Searching for tags that start with: ${PATTERN}"
git tag -l | grep ${PATTERN}
@fieldju
fieldju / justin-preonic-rev3
Last active February 29, 2020 21:26
Preonic Rev3 WIP
{"keyboard":"preonic/rev3","keymap":"default_97b8ade","layout":"LAYOUT_preonic_1x2uC","layers":[["KC_ESC","KC_1","KC_2","KC_3","KC_4","KC_5","KC_6","KC_7","KC_8","KC_9","KC_0","KC_BSPC","KC_TAB","KC_Q","KC_W","KC_E","KC_R","KC_T","KC_Y","KC_U","KC_I","KC_O","KC_P","KC_DEL","KC_GRV","KC_A","KC_S","KC_D","KC_F","KC_G","KC_H","KC_J","KC_K","KC_L","KC_SCLN","KC_QUOT","KC_LSFT","KC_Z","KC_X","KC_C","KC_V","KC_B","KC_N","KC_M","KC_COMM","KC_DOT","KC_SLSH","KC_ENT","KC_LCTL","KC_LGUI","KC_LALT","MO(5)","MO(1)","KC_SPC","KC_TRNS","KC_LEFT","KC_RGHT","KC_UP","KC_DOWN"],["KC_ESC","KC_F1","KC_F2","KC_F3","KC_F4","KC_F5","KC_F6","KC_F7","KC_F8","KC_F9","KC_F10","KC_F11","KC_TILD","KC_EXLM","KC_AT","KC_HASH","KC_DLR","KC_PERC","KC_CIRC","KC_AMPR","KC_ASTR","KC_LPRN","KC_RPRN","KC_BSPC","KC_TILD","KC_UNDS","KC_EQL","KC_PLUS","KC_MINS","KC_LBRC","KC_RBRC","KC_LCBR","KC_RCBR","KC_BSLS","KC_INS","KC_PIPE","KC_LSFT","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_NO","KC_ENT","KC_LCTL","KC_LGUI","KC
package com.nike.cerberus.cache;
import org.apache.ibatis.builder.InitializingObject;
import org.apache.ibatis.cache.Cache;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.ReadWriteLock;
#!/bin/bash
echo 'This scripts downloads and installs the latest Cerberus API CLI'
echo 'This script requires curl and jq'
# Fetch the url for the latest linux version
ASSET_URL=$(curl -s https://api.github.com/repos/Nike-Inc/cerberus-cli/releases/latest | \
jq -r '.assets[] | select(.name=="cerberus-cli-linux-amd64") | .browser_download_url')
echo "Found latest release at ${ASSET_URL}, downloading ..."