Skip to content

Instantly share code, notes, and snippets.

View binarytemple's full-sized avatar

Bryan Hunt binarytemple

  • The mountains of mourne
View GitHub Profile

brew install docker docker-compose docker-machine docker-swarm

systemctl status docker.service -l

vim /usr/lib/**/docker*(.)


ls -la /dev/docker/

@binarytemple
binarytemple / gist:0e05a8e2575b144e5c2d
Created February 5, 2016 09:58 — forked from tnolet/gist:7361441
Install collectd 5.4 on Centos 6.x and make it spit out cool metrics. Copied from http://linuxdrops.com/install-collectd-statistics-collecter-on-centos-rhel-ubuntu-debian/ and tweaked for your and my pleasure. For all other cool options, check the provided link.
#!/bin/bash
# Perform installation as root
# Install prereqs
yum -y install libcurl libcurl-devel rrdtool rrdtool-devel rrdtool-prel libgcrypt-devel gcc make gcc-c++
# Get Collectd, untar it, make it and install
wget http://collectd.org/files/collectd-5.4.0.tar.gz
tar zxvf collectd-5.4.0.tar.gz

CentOS 6.7 - configuring networking where the gateway is on a different subnet

If I were to have configured routing from the command line (or an init script) I would have entered the following:

route add -net 172.27.209.0/24 eth0
route add -net 172.27.211.0/24 eth0
route add default gw 172.27.211.254
@binarytemple
binarytemple / setup.vmware.fusion.with.non-routed.private.network.markdown
Created February 2, 2016 17:58
setup vmware with non-routed private network (172.27.209.0)

Set the configuration file:

cat <<END | sudo tee "/Library/Preferences/VMware Fusion/networking" > /dev/null
VERSION=1,0
answer VNET_2_HOSTONLY_NETMASK 255.255.255.0
answer VNET_2_HOSTONLY_SUBNET 172.27.209.0
answer VNET_2_NAT no
answer VNET_8_DHCP yes
@binarytemple
binarytemple / Vagrantfile
Last active February 2, 2016 15:45
Vagrantfile which for each file in the directory configs creates and provisions a corresponding host
#########################################################
# Usage:
# * Create a sub-directory 'configs'
# * Within that directory:
# ** Create one shell script per-host
# ** Each script must have a '.sh' suffix
# ** The script prefix will correspond with the hostname
#########################################################
Vagrant.configure(2) do |config|
cat /Library/Preferences/VMware\ Fusion/networking

VERSION=1,0
answer VNET_1_DHCP no
answer VNET_1_DHCP_CFG_HASH 94C7DBE1652600E11F176EB31E5DF6517EFD8EDC
answer VNET_1_HOSTONLY_NETMASK 255.255.255.0
answer VNET_1_HOSTONLY_SUBNET 192.168.108.0
answer VNET_1_VIRTUAL_ADAPTER yes
answer VNET_8_DHCP yes
@binarytemple
binarytemple / fixing.vmware.markdown
Last active February 1, 2016 17:30
Quick disable VMWare DHCP on vmnet1

Quick disable VMWare DHCP on vmnet1

Problem - VMWare Fusion (Pro) DHCP is a mess and almost impossible to configure, lets just do without it altogether.

Disable DHCP on vmnet1 (the VMWare private network).

sudo sed -i '' -e 's/answer VNET_1_DHCP yes/answer VNET_1_DHCP no/' \
/Library/Preferences/VMware\ Fusion/networking
@binarytemple
binarytemple / wip.py
Created February 1, 2016 10:23
VMware Fusion Ansible dynamic inventory
#!/usr/bin/env python
import sys
import subprocess
import re
import string
try:
import json
except:
import simplejson as json