This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class JsonExtractor: | |
""" | |
Computationally poor json string search. Searches through a string to find valid JSON(s) and returns any found in a list. | |
""" | |
def __init__(self,toBeParsed): | |
if type(toBeParsed) != str: | |
raise TypeError | |
self.data = toBeParsed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying my Blockstack ID is secured with the address 1Ew1PKMPh78TEdMUmGqDzDtFuurLsSppsk https://explorer.blockstack.org/address/1Ew1PKMPh78TEdMUmGqDzDtFuurLsSppsk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -x | |
# tested on ubuntu 18.04 | |
# 11/11/19 | |
set -e | |
curdir="$(pwd)" | |
cd /tmp | |
tempdir=$(mktemp -d) | |
cd $tempdir | |
wget -q https://github.com/git-lfs/git-lfs/releases/download/v2.9.0/git-lfs-linux-amd64-v2.9.0.tar.gz | |
tar -xf git-lfs-linux-amd64-v2.9.0.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I was having trouble auto logging into irc channels that required a user to login to the network the channel was attached to so I added commands to delay the joining to these channels to give time for authentication to complete. | |
-> Edit the network you wish to join | |
-> Switch to the 'Connect commands' tab | |
-> First command should be: 'msg NickServ identify %p' | |
-> For each channel you wish to auto join add command: 'timer repeat -1 9 join #openstack-cinder' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A great function for generating latest kernel doc or man page for bpf helper functions | |
> ./scripts/bpf_helpers_doc.py --filename include/uapi/linux/bpf.h > /tmp/bpf_helpers_docs.rst | |
> rst2man.py /tmp/bpf_helpers_docs.rst > /tmp/bpf_helpers_docs.man | |
> man /tmp/bpf_helpers_docs.man |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# output all ovn-kubernetes components logs to file from a must-gather output | |
# set --location flag to must-gather output location | |
set -eo pipefail | |
location="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eo pipefail | |
if [ "$#" -ne 2 ]; then | |
echo "you need to pass two arguments - $0 LOCAL_FILE_PATH TARGET_FILE_PATH" | |
exit 1 | |
fi | |
if ! [ -x "$(command -v oc)" ]; then | |
echo "you need oc installed" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NAMESPACE="openshift-ovn-kubernetes" | |
KUBE_NODE_CONTAINERS=("ovn-acl-logging" "ovn-controller" "ovnkube-node") | |
KUBE_MASTER_CONTAINERS=("kube-rbac-proxy" "nbdb" "northd" "ovn-dbchecker" "ovnkube-master" "sbdb") | |
dir=$(mktemp -d) | |
sleep_duration=${SLEEP_DURATION:-20} | |
i=1 | |
echo "log base temp directory: '$dir'" | |
read -n 1 -p "hit enter when ready to record pods logs contineously until interupt every $sleep_duration seconds: " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# OVN Controller | |
Enable JSON RPC debug logs: ovn-appctl -t ovn-controller vlog/set jsonrpc:dbg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Claim OVS port IF all conditions true: | |
1. iface-id and iface-id-ver is set on the OVS interface | |
2. OVS interface has ofport > 0 | |
3. ovn-controller has seen the port_binding for pod logical port in SB DB | |
Release OVS port IF any of conditions true: | |
1. iface-id / iface-id-ver is deleted or updated to a different value | |
2. port_binding row is deleted in SB DB |
OlderNewer