Skip to content

Instantly share code, notes, and snippets.

View bunchc's full-sized avatar

Cody Bunch bunchc

View GitHub Profile
@bunchc
bunchc / ubuntu-14.04.json
Created March 8, 2017 16:52
packer template for ubuntu
{
"variables": {
"vsphere_host": "vcenter65-1.vghetto.local",
"vsphere_user": "administrator@vghetto.local",
"vsphere_pass": "VMware1!",
"vsphere_datacenter": "Datacenter",
"vsphere_cluster": "\"VSAN-Cluster\"",
"vsphere_datastore": "virtual_machines",
"vsphere_network": "\"VM Network\""
},
@bunchc
bunchc / names.sh
Created March 8, 2017 13:44
Names for Noller
#!/bin/bash -
# For our random naming
export ADJS=(autumn hidden bitter misty silent empty dry dark summer icy delicate quiet white cool spring winter patient twilight dawn crimson wispy weathered blue billowing broken cold damp falling frosty green long late lingering bold little morning muddy old red rough still small sparkling shy wandering withered wild black young holy solitary fragrant aged snowy proud floral restless divine)
export NOUNS=(waterfall river breeze moon rain wind sea morning snow lake sunset pine shadow leaf dawn glitter forest hill cloud meadow sun glade bird brook butterfly bush dew dust field fire flower firefly feather grass haze mountain night pond darkness snowflake silence sound sky shape surf thunder violet water wildflower wave water resonance sun wood dream cherry tree fog frost voice paper)
sample() {
# Generate random name
eval "echo \${$1[\$RANDOM%\${#$1[@]}]}"
@bunchc
bunchc / logger.sh
Created February 28, 2017 16:40
Bash Color Logging
# EasyColors
if [ ${libout_color:-1} -eq 1 ]; then
DEF_COLOR="\x1b[0m"
BLUE="\x1b[34;01m"
CYAN="\x1b[36;01m"
GREEN="\x1b[32;01m"
RED="\x1b[31;01m"
GRAY="\x1b[37;01m"
YELLOW="\x1b[33;01m"
fi
@bunchc
bunchc / screen_ssh.sh
Created February 22, 2017 16:34 — forked from res0nat0r/screen_ssh.sh
Set screen window title to remote host.
#!/bin/bash
# screen_ssh.sh by Chris Jones <cmsj@tenshu.net>
# Released under the GPL v2 licence.
# Set the title of the current screen to the hostname being ssh'd to
#
# usage: screen_ssh.sh $PPID hostname
#
# This is intended to be called by ssh(1) as a LocalCommand.
# For example, put this in ~/.ssh/config:
#
oc login -u system:admin
cat <<-EOF > /tmp/pv.yaml
apiVersion: v1
kind: PersistentVolume
metadata:
name: pv0001
spec:
capacity:
storage: 1Gi
@bunchc
bunchc / console.out
Created December 26, 2016 14:57
Console output after rm -rf ~/.vagrant.d/
[bunchc@arngeir:~/.vagrant.d]
[08:52:13] $ rm -rf *
[bunchc@arngeir:~/.vagrant.d]
[08:52:23] $ vagrant plugin list
vagrant-share (1.1.6, system)
[bunchc@arngeir:~/.vagrant.d]
[08:53:24] $ vagrant plugin install vagrant-cumulus
Installing the 'vagrant-cumulus' plugin. This can take a few minutes...
@bunchc
bunchc / docker-compose up -d
Created December 11, 2016 18:14
docker-compose against swarm
ERROR: compose.cli.main.main: Unable to find a node that satisfies the following conditions
[port 5000 (Bridge mode)]
[available container slots]
[--link=rpidockerelk_elasticsearch_1:elasticsearch --link=rpidockerelk_elasticsearch_1:elasticsearch_1 --link=rpidockerelk_elasticsearch_1:rpidockerelk_elasticsearch_1]
[image==rpidockerelk_logstash (soft=false)]
@bunchc
bunchc / virt-addr.sh
Created October 11, 2016 16:06 — forked from kevteljeur/virt-addr.sh
Get a KVM guest's IP address
#!/bin/bash
# Returns the IP address of a running KVM guest VM
# Assumes a working KVM/libvirt environment
#
# Install:
# Add this bash function to your ~/.bashrc and `source ~/.bashrc`.
# Usage:
# $ virt-addr vm-name
# 192.0.2.16
#
@bunchc
bunchc / skypecall.py
Created August 9, 2016 20:50 — forked from pwc3/skypecall.py
Python script for Mac OS X to call a number in Skype then send an arbitrary DTMF string.
#!/usr/bin/env python
# Idea taken from:
# http://community.skype.com/t5/Mac/Re-Pause-option-when-dialing/td-p/731820
import argparse
import codecs
import re
import subprocess
import sys
@bunchc
bunchc / DointItWrong.md
Last active June 17, 2016 15:03
Boston VMUG Speaker Notes

Automation - You're doing it wrong

Automation has been a major topic at IT conferences more or less forever. Be it batch files, PowerShell, VCO (you know, before they renamed it). We've even had movements towards automating IT workloads at scale... DevOps, etc. In this talk, we aim, not to cover whatever is the latest and greatest in tactical tools for automation. Rather, our aim is to equip you with the mental models to help resolve some of the underlying issues that prevent IT teams from achieving the goal of having a more automated system, by approaching the problem with a different mindset.

  • Introductions
    • Who is Cody
    • About the space
  • Processes
    • The Credit Union
  • Standard Operating Procedure(s)