Instantly share code, notes, and snippets.

View doc_tester.rb
require 'redcarpet'
require 'inspec'
require 'tempfile'
# TODO: eventually you would want to change the glob to all docs file
# doc_files = 'docs/resources/*.md.erb'
doc_files = 'docs/resources/'
class TestRenderer < Redcarpet::Render::Base
def block_code(code, language)
View learn-chef-rally.js
// ==UserScript==
// @name Learn Chef Rally Presentation
// @namespace
// @version 0.1
// @description Present only the code windows
// @author Franklin Webber
// @match*
// @grant none
// @require
// ==/UserScript==
#!/usr/bin/env bash
hab-get() {
local download_url=""
local tmpdir=$(mktemp -d)
pushd $tmpdir
echo "Moving to tmpdir $tmpdir"
echo "Downloading and extracting hab binary"
wget -qO- $download_url | tar xz --strip-components=1
View gist:89dc7d025d1ab484c2468740aadbe87e
# run pkg_name HEAD
# run pkg_name HEAD~1
function run() {
local pkg_name=$1
local pkg_position=$2
local found_pkgs=( ./results/$HAB_ORIGIN-$pkg_name-*.hart )
local pkg_count=${#found_pkgs[@]}
declare -A indexed_pkgs
View .studiorc
# Usage
# run pkg_name # Run the latest
# run pkg_name HEAD # Run the latest
# run pkg_name HEAD~1 # Run the second to last
# run pkg_name ~1 # Run the second to last
function run() {
local pkg_name=$1
local pkg_position=$2
View census.json
"changed": true,
"census_groups": {
"haproxy.default": {
"service_group": "haproxy.default",
"election_status": "None",
"update_election_status": "None",
"leader_id": null,
"service_config": null,
"local_member_id": "67e892170b80482d98bb259389ce951d",
View failure
[ec2-user@ip-10-0-0-10 delivery-cluster-master]$ rake setup:cluster
-bash: rake: command not found
[ec2-user@ip-10-0-0-10 delivery-cluster-master]$ chef exec rake setup:cluster
Verifying ChefDK version
Running ChefDK version 0.10.0
Configuring the provisioner node
View Rakefile
namespace :gsub do
desc 'populate a configuration'
task :populate do
content ='config.yml')
puts content
View son_lint.rb
require 'json'
Dir["**/*.json"].each do |json_file|
View gist:488e950f5a3a7645b227
name: vagrant
name: chef_zero
- name: centos-6.5