Skip to content

Instantly share code, notes, and snippets.

View WadeBarnes's full-sized avatar

Wade Barnes WadeBarnes

View GitHub Profile
@WadeBarnes
WadeBarnes / ShellIconOverlayIdentifiers_Fix.reg
Created February 4, 2018 20:43
Registry script to fix Windows Explorer overlay icon priority issues with Tortoise and Dropbox.
Windows Registry Editor Version 5.00
; ==============================================================================================================================
; Registry script to fix Windows Explorer overlay icon priority issues with Tortoise and Dropbox.
;
; Priority is given to the Tortoise and Dropbox overlays. All others are ordered but are beyond the 15 overlays that
; Windows will use (Window will only use 11 from this list).
;
; Refer to the references for additional details.
;
; Open RegEdit as an administrator.
@WadeBarnes
WadeBarnes / oc-ListNewOrPendingBuilds.sh
Last active March 14, 2018 14:55
List `New` or `Pending` builds in OpenShift
oc get builds | grep 'New\|Pending' | awk '{print $1;}'
@WadeBarnes
WadeBarnes / oc-DeleteNewOrPendingBuilds.sh
Created March 14, 2018 14:56
Delete `New` or `Pending` builds in OpenShift
oc delete builds $(oc get builds | grep 'New\|Pending' | awk '{print $1;}')
@WadeBarnes
WadeBarnes / TestConnection.sh
Last active November 21, 2019 15:09
A bash script for testing whether or not a port is open.
#!/bin/bash
OCTOOLSBIN=$(dirname $0)
# =================================================================================================================
# Usage:
# -----------------------------------------------------------------------------------------------------------------
usage() {
cat <<-EOF
Tests to see if a port is open.
@WadeBarnes
WadeBarnes / listPodsAndNodes.sh
Last active October 17, 2023 13:40
OpenShift - Rough script to find out where (which node) all your pods are running (this can take some time to run if you have access to lots of namespaces).
# Examples:
#
# - List all pods in an 'Unknown' state:
# oc projects -q | xargs -I {} sh -c "oc get -n {} pod -o wide 2>/dev/null | grep Unknown | awk '{print \"{},\"\$1\",\"\$3\",\"\$7}' | column -t -s , -N Namespace,Pod,Status,Node"
#
# - Delete all pods in an 'Unknown' state:
# oc projects -q | xargs -I {} sh -c "oc get -n {} pod -o wide 2>/dev/null | grep Unknown | \$(awk '{print \"oc -n {} delete --force --grace-period=0 pod \" \$1}')"
#
# - List pods on a given node:
# oc projects -q | xargs -I {} sh -c 'echo -e "\n{}:" && oc get -n {} pod -o wide 2>/dev/null | grep Running | grep ociopf-p-195.dmz' | awk '{print $1","$7}' | column -t -s ,
oc get -n devex-von-bc-registries-agent-tools pod -o wide 2>/dev/null | grep Error | awk '{print $1}' | xargs oc -n devex-von-bc-registries-agent-tools delete pod {}
@WadeBarnes
WadeBarnes / gist:f2ec8ef1ebfec49d6f13f89b30ee2d2a
Last active November 25, 2019 00:56
SchemaSpy command line for MS SQL Database
# Dependancies:
# - Java
# - sqljdbc42.jar downloaded to local directory; http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774
# - Graphviz; https://www.graphviz.org/download/
# - use `-vizjs` in place of installing Graphviz; very slow and creates a larger output then Graphviz set to `-lq`
# - use `-hq` and `-lq` to control image quality
java -jar schemaspy-6.1.0.jar -lq -degree 1 -t mssql05 -host <host> -db <database> -o outDir -u <username> -p <password> -dp ./sqljdbc42.jar
@WadeBarnes
WadeBarnes / settings.json
Created December 20, 2020 20:34
Windows Terminal Profile
// This file was initially generated by Windows Terminal 1.4.3243.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@WadeBarnes
WadeBarnes / Dockerfile.indy.ubuntu1804
Created February 4, 2022 14:25
Install libindy on Ubuntu 18.04
FROM ubuntu:18.04
RUN apt-get update -y && apt-get install -y \
gnupg \
ca-certificates
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88
RUN echo "deb https://repo.sovrin.org/sdk/deb bionic stable" >> /etc/apt/sources.list
RUN apt-get update -y && apt-get install -y \
libindy
@WadeBarnes
WadeBarnes / gist:96a82751b0f5bfe5ac130a972e1edd60
Created February 4, 2022 14:27
Install libindy on Ubuntu 20.04
FROM ubuntu:20.04
RUN apt-get update -y && apt-get install -y \
gnupg \
ca-certificates
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CE7709D068DB5E88
RUN echo "deb https://repo.sovrin.org/sdk/deb bionic stable" >> /etc/apt/sources.list
RUN apt-get update -y && apt-get install -y \
libindy