Skip to content

Instantly share code, notes, and snippets.

View furlongm's full-sized avatar

Marcus Furlong furlongm

View GitHub Profile
#!/usr/bin/env python
# Marcus Furlong <furlongm@vpac.org> 4/4/2012
# Pin vcpus on xen
import sys
sys.path.insert(1, '/usr/lib/xen-4.0/lib/python')
sys.path.insert(1, '/usr/lib/xen-4.0/lib/python/xen/xm')
import os
#!/bin/bash -e
PATH=/usr/bin:/usr/sbin:/bin:/sbin
hostname=`hostname -f`
# /var/lib/backups can be e.g. NFS mounted
backup_dir=/var/lib/backups/etc/${hostname}/
if [ ! -d /etc/.git ] ; then
#!/bin/bash -e
PATH=/usr/bin:/usr/sbin:/bin:/sbin
date=`date +"%Y-%m-%d"`
hostname=`hostname -f`
dump=/usr/bin/mysqldump
dump_options="--ignore-table=mysql.event --single-transaction --quick"
show=/usr/bin/mysqlshow
#!/bin/bash -e
if [ ${EUID} -ne 0 ] ; then
echo "Usage: Please run this script as root, e.g. sudo ${0} [--create-admin-domain]"
exit 0
else
cd /root
fi
if [ "${1}" == "--create-admin-domain" ] ; then
@furlongm
furlongm / cygwin-auto-update.bat
Created December 8, 2016 06:13
cygwin-auto-update.bat
cd %USERPROFILE%\Downloads
c:\cygwin64\bin\curl.exe http://cygwin.com/setup-x86_64.exe > setup-x86_64.exe
setup-x86_64.exe --no-desktop --no-shortcuts --no-startmenu --quiet-mode --verbose --force-current --delete-orphans --upgrade-also --no-admin
sed -i -e s/aarnet.edu.au/internode.on.net/g /etc/yum.repos.d/*.repo
#!/bin/bash
if [ -f /etc/redhat-release ] ; then
pssh=pssh
else
pssh=parallel-ssh
fi
if [ ! -d ~/nodes ] ; then
mkdir ~/nodes
#!/bin/bash
systemctl daemon-reexec
common="dbus systemd-journald systemd-udevd systemd-machined systemd-logind \
polkit rpcbind chronyd rsyslog crond sshd lvm2-lvmetad irqbalance \
ipmievd haveged fail2ban postfix auditd"
openstack_compute="libvirtd virtlockd openstack-nova-compute openvswitch \
neutron-openvswitch-agent openstack-ceilometer-polling"
openstack_control="nova glance cinder neutron ceilometer heat aodh magnum gnocchi"
#!/bin/bash
for i in $(virsh list ${1} | head -n -1 | tail -n +3 | awk {'print $2'}) ; do
virsh dumpxml ${i}
done
#!/bin/bash
find /etc -name "*.rpmnew" -exec sh -c 'mv {} $(dirname {})/$(basename {} .rpmnew)' \;
puppet agent -t