Skip to content

Instantly share code, notes, and snippets.

View jdutton's full-sized avatar

Jeff Dutton jdutton

  • Ultimate Software
  • Weston, FL
View GitHub Profile
@jdutton
jdutton / .bash_profile
Last active August 29, 2015 13:55
Jeff's Mac .bash_profile
export EDITOR=emacs
export GOPATH=~/Workspace/go
export PATH=$PATH:$GOPATH/bin
eval "$(rbenv init -)"
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_55.jdk/Contents/Home
alias ll='ls -l'
@jdutton
jdutton / os-hypervisor-network-interfaces
Created October 22, 2013 21:06
Ubuntu 12.04 network interface configuration for Hypervisor
# The loopback network interface
auto lo
iface lo inet loopback
dns-nameservers 192.168.81.17 134.111.201.54
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.81.61
@jdutton
jdutton / os-controller-network-interfaces
Last active December 25, 2015 19:09
Network config file for full service single controller running Quantum/Neutron over vlans
# This is the network configuration for a single OpenStack Controller
# with all services (including quantum).
# The loopback network interface
auto lo
iface lo inet loopback
dns-nameservers 192.168.81.17 134.111.201.54
# The primary network interface
@jdutton
jdutton / fault-iscsi-access
Created October 9, 2013 16:25
Fault iSCSI network access to an iSCSI target
#!/bin/bash
# Fault iSCSI access to the given $ISCSI_IP and $ISCSI_PORT
# Faults indefinitely (until CTRL-C or SIGTERM) if no arguments are given, otherwise faults for the
# given number of seconds:
#
# E.g. fault for 10 seconds
# > ISCSI_IP=10.200.11.70 fault-ip-access 10
#
# E.g. fault indefinitely
@jdutton
jdutton / init.el
Last active February 16, 2016 16:52
My emacs init.el file
(require 'package)
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/") t)
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
(package-initialize)
(when (not package-archive-contents) (package-refresh-contents))
;; Whatever packages you want
(defvar my-packages '(starter-kit
starter-kit-lisp
@jdutton
jdutton / rsyslog-to-logstash.conf
Created April 2, 2013 19:33
Rsyslog conf file to send rsyslog output to logstash as a native json logstash event. For more info - see blog post at http://untergeek.com/2012/10/11/using-rsyslog-to-send-pre-formatted-json-to-logstash/
# Send a native logstash json event to the logstash server
$template ls_json,"{%timestamp:::date-rfc3339,jsonf:@timestamp%,\"@message\":\"%msg:::json%\",\"@fields\":{%fromhost:::jsonf:host%,%syslogfacility-text:::jsonf:syslog_facility%,%syslogfacility:::jsonf:syslog_facility_code%,%syslogseverity-text:::jsonf:syslog_severity%,%syslogseverity:::jsonf:syslog_severity_code%,%app-name:::jsonf:program%,%procid:::jsonf:pid%}}"
*.* @@mylogstashhost:5543;ls_json
@jdutton
jdutton / nginx-jenkins.conf
Created January 11, 2013 21:34
nginx conf to host jenkins on port 80
upstream jenkins {
server 127.0.0.1:8080;
}
server {
listen 80;
server_name jenkins.sn.stratus.com;
location / {
proxy_pass http://jenkins;
@jdutton
jdutton / vagrant-chef-solo-command-line
Created October 26, 2012 14:03
Run chef-solo manually in vagrant VM
vagrant@vagrant-vm:~$ sudo chef-solo -c /tmp/vagrant-chef-1/solo.rb -j /tmp/vagrant-chef-1/dna.json
vagrant@vagrant-vm:~$ sudo chef-solo -c /tmp/vagrant-chef-1/solo.rb -j /tmp/vagrant-chef-1/dna.json --why-run > /tmp/why-run.out
@jdutton
jdutton / enable_arp_notify.sh
Created September 14, 2012 16:15
Demo script to set arp notify after restoration of network link
#!/bin/bash
#
# This script ensures that the correct sysctl is configured on the
# installed guest. This is needed to fix case 20602.
# Reboot the guest regardless of whether we take any action here.
GARP_ENABLE="net.ipv4.conf.default.arp_notify = 1"
SYSCTL_FILE="/etc/sysctl.conf"
if [ -e $SYSCTL_FILE ]