Skip to content

Instantly share code, notes, and snippets.

View drewandersonnz's full-sized avatar

Drew Anderson drewandersonnz

View GitHub Profile
@drewandersonnz
drewandersonnz / ROSA.md
Created November 30, 2023 02:43
ROSA 4.14 nodes pods
[~ {production} ]$ oc get pods -A -o wide; oc get nodes;
NAMESPACE                                          NAME                                                         READY   STATUS             RESTARTS        AGE     IP            NODE                         NOMINATED NODE   READINESS GATES
kube-system                                        konnectivity-agent-ddtjd                                     1/1     Running            0               16m     10.0.1.131    ip-10-0-1-131.ec2.internal   <none>           <none>
kube-system                                        konnectivity-agent-ghrk6                                     1/1     Running            0               10m     10.0.1.21     ip-10-0-1-21.ec2.internal    <none>           <none>
kube-system                                        kube-apiserver-proxy-ip-10-0-1-131.ec2.internal              1/1     Running            0               16m     10.0.1.131    ip-10-0-1-131.ec2.internal   <none>           <none>
kube-system                       
@drewandersonnz
drewandersonnz / playlist-clear.js
Created April 13, 2020 10:40
Remove youtube videos from playlist from logged in account
/*
Thanks to https://gist.github.com/timothyarmstrong/10501804
Finding the target in firefox:
Developer console (F12) -> object selector -> playlist delete button
Right-click -> Copy -> CSS Selector -> paste to document.querySelector()
To use:
copy
Developer console (F12)
@drewandersonnz
drewandersonnz / units.py
Last active March 24, 2017 00:06
convert OpenShift text data to numbers in single unit
#!/usr/bin/python
import re
def convert_to_bytes(data):
(number, unit) = re.search("([0-9]+)([A-Za-z]+)", data.strip()).groups()
if unit.lower() == 'bi':
return int(number)
elif unit.lower() == 'ki':