Skip to content

Instantly share code, notes, and snippets.

View devynspencer's full-sized avatar

Devyn Spencer devynspencer

View GitHub Profile
@devynspencer
devynspencer / README.md
Last active December 23, 2015 19:05
Demo of using vagrant-libvirt with libvirt on Fedora

vagrant-libvirt demo

# install dependencies
sudo dnf install -y libxslt-devel libxml2-devel libvirt-devel libguestfs-tools-c

# install vagrant plugin
vagrant plugin install vagrant-libvirt
@devynspencer
devynspencer / cute_commands.sh
Last active December 12, 2023 05:44
A quaint collection of bash commands detailing the inner struggle of mankind.
# list all attached usb devices
lsblk --nodeps --noheadings --list --scsi --paths --output name,vendor,model,tran | grep ' usb'
# restart a fuckload of services at once
services=('api backup scheduler volume'); for service in $services; do systemctl restart openstack-cinder-$service; done
# display concise ip / network interface info
ip addr show | sed -nE "s/inet\s(.*)\/[0-9]+.*\s(\w+)/\2 \1/p" | column -to ' => '
# lo => 127.0.0.1
alias tr='tree -C -L 3'
alias ydl='youtube-dl --rate-limit=1M --external-downloader=aria2c'
# not sure how to structure this for now, but may as well start listing core packages
brew_packages=(
ansible
aria2
chrome-cli
gdbm # ?
gettext # ?
gist
glib # ?
gmp # ?
@devynspencer
devynspencer / packstack_multi.sh
Created January 8, 2016 00:47
Deploy OpenStack using the RDO Packstack tool. Environment includes 1 controller node and 1 compute node.
#!/bin/bash
CONTROLLER_IP='10.107.1.210'
COMPUTE_HOSTS='10.107.1.101,10.107.1.96'
# handle yum's bullshit
yum update -y
# install packstack
yum install -y https://www.rdoproject.org/repos/rdo-release.rpm
@devynspencer
devynspencer / openstack.ks.cfg
Last active January 8, 2016 01:45
OpenStack Kickstart config
# installation settings
install
cdrom
lang en_US.UTF-8
keyboard us
timezone UTC
text
skipx
firstboot --disabled
selinux --permissive
# installation settings
install
cdrom
lang en_US.UTF-8
keyboard us
timezone UTC
text
skipx
firstboot --disabled
selinux --permissive
@devynspencer
devynspencer / minimal.ks.cfg
Last active October 24, 2022 03:05
Minimal Kickstart template for Centos 7.x
#
# configure installation settings
install
cdrom
lang en_US.UTF-8
keyboard us
timezone UTC
unsupported_hardware
text
@devynspencer
devynspencer / troubleshooting.sh
Created January 9, 2016 06:49
Snippets useful to troubleshooting and/or staying out of prison due to troubleshooting-related shenanigans.
# compare two files diff ala `git diff`
diff -Nau /root/answers.txt{.orig,}
@devynspencer
devynspencer / makefile_vagrant
Last active January 14, 2016 00:46
Makefile to streamline common Vagrant workflows.
#
all: up provision
up:
@vagrant up --no-provision
provision:
@vagrant provision controller