Skip to content

Instantly share code, notes, and snippets.

View alloydwhitlock's full-sized avatar

Adam Whitlock alloydwhitlock

View GitHub Profile
@alloydwhitlock
alloydwhitlock / consul_healthcheck.go
Created December 12, 2018 00:50
Consul Health Check
package main
import (
"encoding/json"
"fmt"
"github.com/urfave/cli"
"io/ioutil"
"log"
"net/http"
"os"
@alloydwhitlock
alloydwhitlock / hash_check.sh
Created December 12, 2018 01:06
Simple Git branch hash visualizer thing
#!/bin/bash
# This is a quick & dirty way of comparing a bunch of various repositories
# visually to understand divergence. Made this very relaxed so anyone with
# shell experience can modify it to their whim.
#
# Suggestions include having comparitive operations between branch names,
# maybe giving an error if ANY divergence is encountered, or maybe trying
# to automatically merge branches if doing something silly like Git flow.
@alloydwhitlock
alloydwhitlock / grafana_backup.sh
Created December 12, 2018 16:02
Simple Grafana backup script
#!/bin/bash
#
# Name: Grafana dashboard backup script
# Version: 0.1
# Requires: jq
display_usage() {
echo "Usage: $0 HOSTNAME KEY DIR"
echo "Backup all Grafana dashboards using Grafana API key"
echo "Requires 'jq' to parse JSON"
@alloydwhitlock
alloydwhitlock / airflow_virtenv.sh
Created January 3, 2019 22:22
Create a virtual environment for developers to use Airflow
#!/bin/bash
# Purpose: Setup local Airflow Python development environment
# Author: Adam Whitlock (adam@adamwhitlock.com)
# Version: 0.0.1
# Specify major version of Python used for Airflow
PYTHON_VERSION="2"
AIRFLOW_VERSION="1.10.1"
@alloydwhitlock
alloydwhitlock / nexartrel.sh
Created January 14, 2019 23:38
Retrieve a Maven artifact from Nexus without using Maven
#!/bin/bash
# Name: Nexus MVN Retrieval
# Script: nexartrel.sh
# Version: 0.0.3
# Author: Adam Whitlock [adam@adamwhitlock.com]
# Command line options to be passed
function options {