Skip to content

Instantly share code, notes, and snippets.


John E. Vincent lusis

View GitHub Profile
lusis /
Last active Jun 6, 2017
Proxying puppetforge files with Artifactory

Proxying puppetforge requests with Artifactory and Nginx

We have two goals:

  • Ensure that we have local deterministic cache of puppet modules pulled from the forge
  • Force all server requests to go through artifactory where possible

Artifactory configuration

We're going to use a remote repo type of generic pointing to The json in this gist should provide the relevant information.

nginx configuration

lusis / acceptance_spec.rb
Created Sep 28, 2016
this won't ever work
View acceptance_spec.rb
require 'spec_helper_acceptance'
describe 'nginx' do
context 'default' do
pp = <<-EOS
include stdlib
include nginx
  • install gcalcli and connect it up to your account (gcalcli agenda after install should start the auth process)
  • write the python file above to somewhere (I use ~/.i3/
  • setup your ~/.i3/config with the status_command above
  • reload i3


I added the following cron entry to alert via notify-send and dunst gives me warnings */5 * * * * gcalcli remind

lusis /
Last active Jul 13, 2019
Docker "Best Practices"

This is a copy/paste from an internal wiki on how we should use docker

This guide is to serve as an outline of internal best practices to using Docker. The idea is to give enough information to allow engineers to create containers for new stack components while minimizing the cleanup required to make them production ready.


Before we get to the practices, it's important to understand WHY we are doing this. The key concepts we're concerned about with broad Docker usage are provenance, determinism, repeatability and auditability.


Provenance refers to knowing WHERE something comes from. Generally with the end use of software, this is easy:

  • Maven artifacts are pulled from central
output "s3.bucket_name" {
value = "${}"
lusis /
Last active Apr 8, 2016
Rundeck with Jump Hosts
aws ec2 describe-instances | jq -r '.Reservations[].Instances[] | select(.State.Name |contains("running")) | select(.Tags != null) | (.Tags | from_entries) as $tags | [.PrivateIpAddress,$tags.Name,.KeyName] | @tsv'
lusis /
Created Feb 4, 2016
RDS terraform stuffs
module "rds" {
	source = "<module-source containing with ref>"
	multi_az = "${var.rds_multi_az}"
	spath_db_instance_class = "${var.rds_instance_type}"
	spath_orgname = "${var.orgname}"
	iam_rds_user = "${var.iam_rds_user}"
	iam_rds_password = "${var.iam_rds_password}"
	spath_rds_sg_id = "${module.vpc.default_sg_id}"
	spath_rds_private_subnet_a_id = "${module.vpc.private_subnet_a_id}"
lusis / gpg-keyservers.txt
Created Dec 23, 2015
who cares if our keyservers are actually keyservers.
View gpg-keyservers.txt
» for i in `host | grep "has address" | awk -F" " '{ print $4 }'`; do printf -- "ip: $i is match? "; curl -L -q -s -H "Host:" http://$i | html2text | grep -q -i openpgp; if [[ $? -eq 0 ]]; then echo "yes"; else echo "no"; fi; done
ip: is match? no
ip: is match? yes
ip: is match? yes
ip: is match? no
ip: is match? yes
ip: is match? yes
ip: is match? yes
ip: is match? yes
ip: is match? no
lusis / loggly-model.json
Last active Dec 9, 2015
A few models for use with AWS API Gateway
View loggly-model.json
"$schema": "",
"title": "loggly-webhook-model",
"type": "object",
"properties": {
"alert_name": {"type":"string"},