Skip to content

Instantly share code, notes, and snippets.

View breu's full-sized avatar

Joe Breu breu

  • PlanetLabs
  • San Antonio, TX
View GitHub Profile
@breu
breu / ring-tester.py
Last active August 29, 2015 14:01
swift ring-tester.py
#!/usr/bin/env python
from swift.common.ring import Ring
from swift.common.utils import hash_path
import random
import locale
locale.setlocale(locale.LC_ALL, '')
ring_file = "/home/rack/object.ring.gz"
@breu
breu / gist:9920058
Created April 1, 2014 18:27
cinder fix
diff --git a/attributes/default.rb b/attributes/default.rb
index 06bae01..fb943ff 100644
--- a/attributes/default.rb
+++ b/attributes/default.rb
@@ -60,6 +60,7 @@ default["cinder"]["storage"]["lvm"]["mirrors"] = 0
default["cinder"]["storage"]["lvm"]["config"] = "/etc/lvm/lvm.conf" # Path of LVM config file
default["cinder"]["storage"]["lvm"]["pool_size"] = "None"
default["cinder"]["storage"]["lvm"]["volume_driver"] = "cinder.volume.drivers.lvm.LVMISCSIDriver"
+default["cinder"]["storage"]["lvm"]["volume_backend_name"] = "cinder"
@breu
breu / gist:9219114
Last active August 29, 2015 13:56
chef attribute precedence
Attribute Precedence
Attributes are always applied by the chef-client in the following order:
1. A default attribute located in a cookbook attribute file
2. A default attribute located in a recipe
3. A default attribute located in an environment
4. A default attribute located in role
5. A force_default attribute located in a cookbook attribute file
6. A force_default attribute located in a recipe
7. A normal attribute located in a cookbook attribute file
@breu
breu / gist:9051554
Last active August 29, 2015 13:56
swift disk prep
#
# setup the drives
#
wget breu.org/filedrop/MegaCli_Linux.zip
apt-get -y install unzip
unzip -L MegaCli_Linux.zip
dpkg -i megacli_linux/megacli_8.07.08-1_all.deb
# Get count of adapters
/opt/MegaRAID/MegaCli/MegaCli64 -adpCount
@breu
breu / gist:7492425
Created November 15, 2013 22:03
xmas beer
Better Not Pout Stout — Ben VanderMeer
(5 gallons/19 L, all-grain)
OG = 1.068 FG = 1.020
IBU = 21 ABV = 6.1%
Best of Show, Great Arizona Homebrew Competition 2010
(151 entries)
Ingredients
10.5 lbs. (4.9 kg) US 2-row malt
1.75 lbs (0.79 kg) crystal malt (80 °L)
@breu
breu / gist:7102318
Created October 22, 2013 15:03
v4.1.3rc environment
{
"name": "rh",
"description": "",
"cookbook_versions": {
},
"json_class": "Chef::Environment",
"chef_type": "environment",
"default_attributes": {
},
"override_attributes": {
@breu
breu / gist:7091304
Created October 21, 2013 21:26
radnom rpm centos xen kernel install stuff
rpm -Uvh http://mirror.centos.org/centos/6/xen4/x86_64/Packages/kernel-3.4.61-9.el6.centos.alt.x86_64.rpm http://mirror.centos.org/centos/6/xen4/x86_64/Packages/kernel-headers-3.4.61-9.el6.centos.alt.x86_64.rpm http://mirror.centos.org/centos/6/xen4/x86_64/Packages/kernel-firmware-3.4.61-9.el6.centos.alt.noarch.rpm
@breu
breu / gist:6925346
Created October 10, 2013 20:43
new version cut
# VERSION UPDATE
for i in $(grep -B1 rcbops .gitmodules | grep path | awk '{print $3}' | grep -v "rabbitmq$"); do
pushd $i
git fetch origin
git checkout master
git pull origin master
sed -i '' 's/^version.*$/version "4.1.3"/g' metadata.rb
git add metadata.rb
git commit -m "Version Bump to 4.1.3"
git push breu master
@breu
breu / gist:6810149
Created October 3, 2013 13:51
rabbit_hosts chef search gem
osops_search(search_string="rabbitmq-server",one_or_all=:all,include_me=true,order=[:role]).sort_by{|ip| IPAddr.new ip.rabbitmq.address}.map {|k| "#{k.rabbitmq.address}:#{k.rabbitmq.port}"}.join(",")
@breu
breu / gist:6432327
Created September 4, 2013 03:02
amazon review
We'll see if this gets published
http://www.amazon.com/Sims-Starter-Pack-Online-Game/dp/B00CQOG8MM/ref=dsvrt_myd_asin_block
There is a TL;DR way down at the bottom. Read that first then come back for the rest.
I purchased this for my daughter without reading any of the reviews because who, of course not me, reads reviews before they purchase something that can only be returned with a credit card dispute? I had purchased the Sims3 as a digital download for a PC way back in 2011 and the technology sure has gone downhill since. I mean we can launch a rocket and put a man on the moon with the computing power of an abacus but we can't reliably provide a method for downloading a digital item in the digital era with digital computers. If we keep this up we may as well turn our computers in for sticks and cave wall drawings.
So, after downloading the cheesy "Installer", opening it like I do any other .DMG file, and finding the Amazon Installer I am thinking that I have somehow bested the others that have tri