Skip to content

Instantly share code, notes, and snippets.

@w10t
w10t / script.js
Created February 20, 2019 10:00
humps decamelizeKeys split by numbers (e.g. someField11 -> some_field_11)
function decamelize(string) {
return humps.decamelizeKeys(string, {
process: string2 => string2.split(/(?=[A-Z])/).join('_').toLowerCase().replace(/(\d+)/g, '_$1') });
}
@w10t
w10t / kubectl.md
Created October 11, 2017 20:10 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'