I hereby claim:
- I am DylanGraham on github.
- I am dylangraham (https://keybase.io/dylangraham) on keybase.
- I have a public key whose fingerprint is D6B9 E84A 7190 81A2 E172 2E68 274A 2722 8178 28DA
To claim this, I am signing this object:
| #! /usr/bin/env python3 | |
| import subprocess | |
| import json | |
| import sys | |
| configs = subprocess.run("gcloud config configurations list --format=json".split(), capture_output=True) | |
| configurations = json.loads(configs.stdout) | |
| for config in configurations: | |
| if not config["is_active"]: | |
| cmd = "gcloud config configurations activate " + config["name"] | 
| #!/bin/bash | |
| local_dir="/usr/local/bin" | |
| kctx_dir="/usr/local/Cellar/kubectx" | |
| cd $kctx_dir | |
| new_dir=$(find . -type d -d 1 -name "*\.*\.*" | sed 's/^\.\///') | |
| rm -f latest | |
| ln -s $new_dir latest | |
| rm $local_dir/{kubectx,kubens,kctx,kns} | |
| ln -s $kctx_dir/$new_dir/bin/kubectx $local_dir/kctx | 
| #!/usr/local/bin/bash | |
| for i in $(kctx); do kctx $i; kubectl version --short | grep Server; kubectl get node --no-headers | awk {'print "Node Version:\t" $5'} | sort | uniq; echo; done | 
| #!/bin/bash | |
| UNAME=$(uname -r) | |
| CUR_array=($(echo "$UNAME" | awk -F'[.-]' '{print $1 "\n" $2 "\n" $3 "\n" $4}')) | |
| CUR=$(echo ${CUR_array[@]} | tr -d ' ') | |
| FOUND=0 | |
| function compare { | |
| for J in {0..3}; do | |
| if (( "${THIS_array[J]}" > "${CUR_array[J]}" )); then break | |
| elif (( "${THIS_array[J]}" < "${CUR_array[J]}" )); then | 
| #!/bin/bash | |
| UNAME=$(uname -r) | |
| CUR=($(echo "$UNAME" | awk -F'[.-]' '{print $1 $2 $3 $4}')) | |
| CUR_1=($(echo "$UNAME" | awk -F'[.-]' '{print $1}')) | |
| CUR_2=($(echo "$UNAME" | awk -F'[.-]' '{print $2}')) | |
| CUR_3=($(echo "$UNAME" | awk -F'[.-]' '{print $3}')) | |
| CUR_V=($(echo "$UNAME" | awk -F'[.-]' '{print $4}')) | |
| FOUND=0 | 
I hereby claim:
To claim this, I am signing this object:
| ------------------------------------------------------------ | |
| ___ | |
| ____ _ _____ _.-| | |\__/,| (`\ | |
| __ __/ ___| / \|_ _| { | | |x x |__ _) ) | |
| \ \/ / | / _ \ | | "-.|___| _.( T ) ` / | |
| > <| |___ / ___ \| | .--'-`-. _((_ `^--' /_< \ | |
| /_/\_\\____/_/ \_\_| .+|______|__.-||__)`-'(((/ (((/ | |
| ------------------------------------------------------------ | 
| #!/bin/bash | |
| fail() { | |
| echo "Failed: $1" | |
| exit 1 | |
| } | |
| NODES=$(ssh mgt "diagnose -n | egrep '^comp[0-1][0-9][0-9].*Idle' | awk {'print \$1'}") | |
| WORDS=$(echo ${NODES} | wc -w) | |
| let "NUM_OF_NODES = $WORDS - 1" | 
| #!/bin/bash | |
| # extend_job | |
| # | |
| # extend the life of a PBS job | |
| # | |
| # Written by Brett Pemberton, [email protected] | |
| # Copyright (C) 2008 Victorian Partnership for Advanced Computing | |
| # This program is free software: you can redistribute it and/or modify | 
| #!/usr/bin/python2 | |
| import sys | |
| def get_hours(time): | |
| t = time.split(':') | |
| return int(t[0]) * 24 + int(t[1]) |