Skip to content

Instantly share code, notes, and snippets.

# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "base"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.define :master do |master_config|
master_config.vm.hostname = "puppetmaster"
#!/usr/bin/env ruby
message_file = ARGV[0]
message = File.read(message_file)
$regex = /^name:\s\w+$/
if !$regex.match(message)
puts "[POLICY] Commit message requires: name: <your name>"
exit 1
end

How to bake decent bagels

I basically follow this recipe with a few exceptions.

homestyle bagels

Instead of malt syrup, I substitute molasses.

For a standard batch of 8-10 decent sized plain bagels, here's the ingredient list:

@rockpapergoat
rockpapergoat / shoulders.txt
Created April 25, 2013 18:11
shoulder workouts
- 3 or 4x sets of each
1. dumbbell shoulder presses or military press + stretching
2. dumbbell lateral raises + posterior raises + shrugs (superset)
3. cable anterior + lateral raises (superset)
* optional: front plate raises (45 lbs) to failure or just before
@rockpapergoat
rockpapergoat / activemq.log
Last active December 15, 2015 19:29
mcollective issues
2013-04-04 12:32:13,023 | INFO | Transport failed: java.io.EOFException | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///192.0.43.10:44870
2013-04-04 12:32:41,304 | WARN | Exception occurred processing:
null
: org.apache.activemq.transport.stomp.ProtocolException: Unable to parser header line [����] | org.apache.activemq.transport.stomp.ProtocolConverter | ActiveMQ Transport: tcp:///192.0.43.10:44872
2013-04-04 12:32:41,327 | INFO | Transport failed: org.apache.activemq.transport.stomp.ProtocolException: Unable to parser header line [����] | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///192.0.43.10:44872
2013-04-04 12:56:40,537 | INFO | ActiveMQ Message Broker (localhost, ID:master.example.com-52274-1364411045912-0:1) is shutting down | org.apache.activemq.broker.BrokerService | Thread-4
2013-04-04 12:56:40,537 | INFO | ActiveMQ Message Broker (localhost, ID:master.example.com-52274-1364411045912-0:1) is shutting down | org.
@rockpapergoat
rockpapergoat / purge_old_kernels.rb
Last active November 3, 2016 13:46
script to provide some kernel purging routines for ubuntu/debian. this is a first pass at a maintenance script.
#!/usr/bin/env ruby
# 130306, nate
# automate purging old kernels from /boot and updating/upgrading
require 'optparse'
def get_installed_kernels
installed = %x(/usr/bin/dpkg --get-selections).split("\n").map! {|e| e.sub!(/\t+install/,"")}
kernels = installed.select {|pkg| pkg =~ %r[linux-image]}
end
@rockpapergoat
rockpapergoat / puppet_example_classification.txt
Last active December 12, 2015 09:09
dynamic node definition with hiera. not sure if this will work as intended.
/etc/puppet/hiera.yaml:
---
:backends:
- yaml
:yaml:
:datadir: /etc/puppet/hieradata
:hierarchy:
- %{::clientcert}
- %{::role}
@rockpapergoat
rockpapergoat / plato_republic_book1_gangsta.markdown
Last active June 13, 2017 15:49
plato's first book of "the republic," as translated by gizoogle

Book 1

I went down yesterdizzle ta tha Piraeus wit Glaucon tha lil hustla of Ariston, dat I might offer up mah lyrics ta tha goddess (Bendis, tha Thracian Artemis.); n' also cuz I wanted ta peep up in what tha fuck manner they would big-up tha festival, which was a freshly smoked up thang. I was delighted wit tha procession of tha inhabitants; but dat of tha Thracians was equally, if not more, dope. When our crazy-ass asses had finished our lyrics n' viewed tha spectacle, our crazy-ass asses turned up in tha direction of tha hood; n' at dat instant Polemarchus tha lil hustla of Cephalus chizzled ta catch sight of our asses from a thugged-out distizzle as our crazy-ass asses was startin on our way home, n' busted some lyrics ta his servant ta run n' bid our asses wait fo' his muthafuckin ass. Da servant took hold of mah crazy ass by tha cloak behind, n' holla'd: Polemarchus desires you ta wait.

I turned round, n' axed his ass where his crazy-ass masta was.

There he is, holla'd tha youth, comin afta y

@rockpapergoat
rockpapergoat / config.ru
Created November 13, 2012 23:52
puppet config files
# located here on the master:
# /etc/puppet/rack/puppetmasterd/public/config.ru
# a config.ru, for use with every rack-compatible webserver.
# SSL needs to be handled outside this, though.
# if puppet is not in your RUBYLIB:
# $LOAD_PATH.unshift('/opt/puppet/lib')
$0 = "master"