Skip to content

Instantly share code, notes, and snippets.

View heathseals's full-sized avatar
🏠
Working from home

Heath Seals heathseals

🏠
Working from home
View GitHub Profile
@heathseals
heathseals / jameswhitemanifesto.txt
Created September 29, 2021 22:41 — forked from coliver/jameswhitemanifesto.txt
James White Manifesto
== Rules ==
On Infrastructure
-----------------
There is one system, not a collection of systems.
The desired state of the system should be a known quantity.
The "known quantity" must be machine parseable.
The actual state of the system must self-correct to the desired state.
The only authoritative source for the actual state of the system is the system.
The entire system must be deployable using source media and text files.
@heathseals
heathseals / show-vmware-host-usage.rb
Created January 12, 2016 18:27 — forked from sschneid/show-vmware-host-usage.rb
Realtime console-based vSphere cluster usage monitoring with Ruby
#!/usr/bin/ruby
require 'rubygems'
require 'yaml'
require 'rbvmomi'
require 'ruby-progressbar'
def getStats()
datacenter = $vim.serviceInstance.find_datacenter
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
@heathseals
heathseals / ssh.rb
Created August 6, 2014 15:00 — forked from crosson/ssh.rb
require 'rubygems'
require 'net/ssh'
require 'net/ssh/telnet'
class SSH
attr_accessor :errors
def initialize(creds)
begin
@ssh_session = Net::SSH.start(creds[:host], creds[:user], :password => creds[:password], :keys => [])
[ ! -d ~/.chef ] && mkdir -p ~/.chef
cat<<EOF > ~/.chef/knife.rb
knife[:vsphere_host] = "virtualcenter.eftdomain.net"
knife[:vsphere_user] = "${LOGNAME}"
knife[:vsphere_pass] = "${WINDOWS_PASSWORD}"
knife[:vsphere_dc] = "Nashville"
knife[:vsphere_insecure] = true
EOF
chmod 600 .chef/knife.rb
proxyon; export GEM_HOME=~/lib; gem install knife-vsphere --no-ri --no-rdoc
# Package Maintainer: Increment phusion_release to match latest release available
%define phusion_release 2011.03
Summary: Ruby Enterprise Edition (Release %{phusion_release})
Name: ruby-enterprise
Vendor: Phusion.nl <info@phusion.nl>
Packager: Adam Vollrath <hosting@endpoint.com>
Version: 1.8.7
Release: 8.%{dist}
License: Ruby or GPL v2