Skip to content

Instantly share code, notes, and snippets.

View ilyam8's full-sized avatar
👉
Don't Use The ELSE Keyword

Ilya Mashchenko ilyam8

👉
Don't Use The ELSE Keyword
View GitHub Profile
@ilyam8
ilyam8 / Calisthenics.md
Created January 9, 2020 16:11 — forked from bobuss/Calisthenics.md
The 9 Rules of Object Calisthenics

Object Calisthenics outlines 9 basic rules to apply when performing the exercise:

  • One level of indentation per method.
  • Don't use the ELSE keyword.
  • Wrap all primitives and Strings in classes.
  • First class collections.
  • One dot per line.
  • Don't abbreviate.
  • Keep all classes less than 50 lines.
  • No classes with more than two instance variables.
@ilyam8
ilyam8 / kubedf
Created March 23, 2023 10:36 — forked from redmcg/kubedf
Bash script to show k8s PVC usage
#!/usr/bin/env bash
NODESAPI=/api/v1/nodes
function getNodes() {
kubectl get --raw $NODESAPI | jq -r '.items[].metadata.name'
}
function getPVCs() {
jq -s '[flatten | .[].pods[].volume[]? | select(has("pvcRef")) | '\