Skip to content

Instantly share code, notes, and snippets.

View GeorgeMac's full-sized avatar
🏴‍☠️

George GeorgeMac

🏴‍☠️
View GitHub Profile
@GeorgeMac
GeorgeMac / kube-context-ohmyzsh.sh
Created August 2, 2019 10:26
Right prompt for kubernetes context in zsh (requires oh-my-zsh)
local kube_cluster_color="yellow"
local kube_namespace_color="blue"
kube_ctx(){
kubectl config get-contexts --no-headers $(kubectl config current-context)
}
kube_cluster() {
kube_ctx | awk '{ print $3 }'
}
@GeorgeMac
GeorgeMac / keybase.md
Created June 7, 2018 14:04
Keybase Stuff

Keybase proof

I hereby claim:

  • I am georgemac on github.
  • I am georgemac (https://keybase.io/georgemac) on keybase.
  • I have a public key ASBGtAROdZvP_58jIuUwUHZrldW3QtthrjBj10uCPP03Wgo

To claim this, I am signing this object:

@GeorgeMac
GeorgeMac / crowd-mondo.sh
Created February 29, 2016 14:51
Come back Mondo on Crowdcube (Mac Users)
#! /bin/bash
while [ "$(curl -Iv https://www.crowdcube.com/investment/mondo-20857 2>&1 | grep -oe "HTTP/1.1 [0-9][0-9][0-9]" | head -n 1)" = "HTTP/1.1 302" ]; do sleep 1 && echo "still redirecting"; done && osascript -e 'display notification "go go go!" with title "Get Dem Mondos"'
@GeorgeMac
GeorgeMac / compress.rb
Created January 8, 2016 13:16
Im Sorry
def compress(str)
_c = ->(u, r, head, tail, count, accum) do
tail==[] ? r[accum,head,count] : ((h, t = u[tail]); (_ = _c.curry[u,r,h,t]); (h == head ? _[count+1, accum] : _[1, r[accum, head, count]]))
end
(u=->(a){[a[0], a[1..-1]]}); str == '' ? str : _c[u, ->(a,h,c){(r=->(l,n){(n>1)?"#{l}#{n}":l});"#{a}#{r[h,c]}"}, *u[str.split('')], 1, '']
end

Keybase proof

I hereby claim:

  • I am GeorgeMac on github.
  • I am georgemac (https://keybase.io/georgemac) on keybase.
  • I have a public key whose fingerprint is C108 FA7E 35A8 CEA0 2A52 5479 CE2B 8F7B F7A9 88F2

To claim this, I am signing this object: