Skip to content

Instantly share code, notes, and snippets.

View treyd's full-sized avatar

Trey Duskin treyd

  • NVIDIA
  • Atlanta, GA
View GitHub Profile
@treyd
treyd / swift_api.sh
Last active July 16, 2020 15:23 — forked from simontraill/swift_api.sh
swift api checks in check_mk format
#!/usr/bin/env bash
# Openstack Swift Basic API tests for check_mk
# straill (SwiftStack) 2017/10/16
#
# Setup:
# - Ensure you have a swift account created - see SWIFT_USER below.
# - Then set the config varibles below for your endpoints and password.
# - Runs basic functional test set using some (ugly) cURL commands; returns status in check_mk format
# - Failures will cause us to immediately bail and return bad status
@treyd
treyd / vagrant.py
Last active May 15, 2018 13:25 — forked from lorin/vagrant.py
Vagrant dynamic inventory script for Ansible
#!/usr/bin/env python
# Adapted from Mark Mandel's implementation
# https://github.com/ansible/ansible/blob/devel/plugins/inventory/vagrant.py
import argparse
import json
import paramiko
import subprocess
import sys
@treyd
treyd / ssh-colorize
Last active March 31, 2017 23:27
set the background color of iTerm based on ssh-host
#!/bin/bash
#
# (1) copy to: ~/bin/ssh-colorize
# (2) set: alias ssh=~/bin/ssh-colorize
# (3) do: chmod +x ~/bin/ssh-colorize
#
# Forkd from https://gist.github.com/thomd/956095
set_term_bgcolor(){
local R=$1