Skip to content

Instantly share code, notes, and snippets.


John E. Vincent lusis

View GitHub Profile
lusis / dba-user.json
Created Jan 7, 2011
Managing MySQL user accounts with Chef
View dba-user.json
"comment":"DBA User",
"groups": [
"ssh_key": "XXXXXXXXXX"
View chef-rundeck.rb
# run with
# chef-apply chef-rundeck.rb
require 'chef'
require 'chef/node'
require 'chef/mixin/xml_escape'
require 'chef/rest'
require 'chef/role'
require 'chef/environment'
require 'chef/data_bag'
View python argparse subcommand
import argparse
from mock import Mock
m = Mock()
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers()
query_group = subparsers.add_parser('query')
add_group = subparsers.add_parser('add')
View alternate-foo.go
package fooservice
import (
idgen ""
pb ""
storer ""
lusis / iam-s3-policy.json
Created Jan 5, 2011
A sample AWS IAM json policy file with read-only access to certain S3 buckets
View iam-s3-policy.json
lusis /
Created Feb 26, 2013
Generate system packages with FPM as part of maven.
#!/usr/bin/env bash
if [ -z ${CURRENT_ITERATION} ]; then
case "${PKG_VERSION}" in
echo "Packaging a snapshot version!"
#CURRENT_SHA=`git rev-parse HEAD`
lusis /
Last active Sep 14, 2020
terraform template to generate serverspec properties

This uses terraform's template_file resource to generate a yaml properties file for serverspec to use.

  • create the Rakefile in your terraform project root
  • create a spec directory and put spec_helper.rb in it
  • create the templates/properties.tmpl.yml file
  • create the
  • terraform apply


Tests will be matched based on roles defined for a given node.

lusis / keytool.rb
Created Mar 26, 2012
recipe for adding certs to keytool
View keytool.rb
keystore = "/etc/java-6-sun/security/cacerts"
keystore_pass = "foobar"
# you'll need foo.cert et. al. in files/default
certs = %w{foo bar bang}
certs.each do |cert|
cookbook_file "#{Chef::Config[:file_cache_path]}/#{cert}.cert" do
source "#{cert}.cert"
lusis /
Created Oct 25, 2012
What happened here?

Random idea

I'm a big fan of the Ops School idea. I've struggled for years about how to "train up" someone coming into this field. So much of our skill set is forged in the fire of outages and troubleshooting.

One of the things that is both good and bad about system administration and operations is that we tend to see patterns. It's good in that we immediately see things that stand out. The downside is we tend to superimpose that pattern recognition in inappropriate ways.

We had an interesting issue happen yesterday at the dayjob. I won't go into exactly what it was here but I had an idea based on some graphs I was looking at. It's part social experiment but it's also part problem solving skills.

Given the following image with no context, what do you think happened? What are some of the key indicator points that jump out and what pattern do they call to mind?

_(Since it may not be clear simply from an image resolution perspective, there are 4 me

lusis / myorg.proto
Created Feb 13, 2020
View myorg.proto
syntax = "proto3"
package = "com.myorg.ptypes";
message User {
int64 id = 1;
UserStatus status = 2;
message Group {
int64 id = 1;