Skip to content

Instantly share code, notes, and snippets.

@s2t2
s2t2 / NOTES.md
Created February 18, 2015 00:46
Notes on using Vagrant and Test Kitchen with Chef. From an "Ask a Chef Architect" session at the AWS Popup Loft.

Overview

Test Kitchen provides command line tools for interacting with one or more vagrant virtual machines, and can generate multiple vagrant configurations based on information provided in a .kitchen.ymlfile.

Vagrant configures a development environment based on information proved in the Vagrantfile.

Virtual Box is the default virtual machine provider used with the "vagrant" driver (see .kitchen.yml).

BATS is a simple BASH-based unit testing framework for testing the actions that have actually been performed on a virtual machine.

@s2t2
s2t2 / README.md
Last active July 19, 2016 16:04
Developerweek Accelerate Hackathon (view map live at http://bl.ocks.org/s2t2/raw/cd45dfd8007fcf83fef7/)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@s2t2
s2t2 / Citywide_Performance_Measures_FY14_Dataset.csv
Last active August 29, 2015 14:13
City of San Francisco Performance Metrics
We can't make this file beautiful and searchable because it's too large.
Dept,Department,Owner,Program,Goal,KPI_CODE,Performance_Measure,Description,Technical_Description,Performance_Pattern,Unit_of_Measure,FY_2012_Total_Actual_Data,FY_2013_Total_Actual_Data,FY_2014_June_Actual_Data,FY_2014_Total_Actual_Data,FY_2014_Total_Target_Data,FY_2014_Total_Projected_Data,FY_2015_Total_Target_Data,FY_2016_Total_Target_Data,FY_2014_Yr_End_Actual_Explanation,FY_2014_Yr_End_Dept_Comment,Major_Service_Area,Annual_Performance_Measure_Report,City_Survey_Report,CAFR_Report,Government_Barometer_Report,Mayors_Budget_Book,Performance_Appraisal_Report
AAM,ASIAN ART MUSEUM,"Trujillo, Adrian",ASIAN ART MUSEUM,Increase museum membership,AAM.EEI.01.1.1,Number of museum members,"Total number of AAM members: includes general membership up to levels of $3,000 and above, as of the last day of the period. ","Collection Method: Records are developed and maintained in our database: Raiser's Edge. This database houses individual membership records including a member's history, gift date history, gift date, membe
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@s2t2
s2t2 / my_recipe.md
Last active August 29, 2015 14:13
how to install rake via rbenv chef cookbook rbenv_gem

Attempt 1:

Follow the instructions

rbenv_gem "rake" do
  ruby_version node["ruby_version"]
  version "10.3.2"
end
@s2t2
s2t2 / eastcoast_cities.geojson
Created January 7, 2015 18:30
source: mapbox.com/mapbox.js/assets/data/eastcoast_cities.geojson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{"type":"FeatureCollection","features":[
{"type":"Feature","id":"01","properties":{"name":"Alabama","density":94.65},"geometry":{"type":"Polygon","coordinates":[[[-87.359296,35.00118],[-85.606675,34.984749],[-85.431413,34.124869],[-85.184951,32.859696],[-85.069935,32.580372],[-84.960397,32.421541],[-85.004212,32.322956],[-84.889196,32.262709],[-85.058981,32.13674],[-85.053504,32.01077],[-85.141136,31.840985],[-85.042551,31.539753],[-85.113751,31.27686],[-85.004212,31.003013],[-85.497137,30.997536],[-87.600282,30.997536],[-87.633143,30.86609],[-87.408589,30.674397],[-87.446927,30.510088],[-87.37025,30.427934],[-87.518128,30.280057],[-87.655051,30.247195],[-87.90699,30.411504],[-87.934375,30.657966],[-88.011052,30.685351],[-88.10416,30.499135],[-88.137022,30.318396],[-88.394438,30.367688],[-88.471115,31.895754],[-88.241084,33.796253],[-88.098683,34.891641],[-88.202745,34.995703],[-87.359296,35.00118]]]}},
{"type":"Feature","id":"02","properties":{"name":"Alaska","density":1.264},"geometry":{"type":"MultiPolygon
@s2t2
s2t2 / chef_cookbook_organization_alternatives.md
Last active August 29, 2015 14:12
Organizing a Chef cookbook, need to access node attributes across recipes, trying to avoid using `Chef::Recipe.send(:include, MyHelper)`

As-Is

# my_cookbook/recipes/default.rb
root_mysql_connection = {
  :host => "localhost",
  :username => "root",
  :password => node["mysql"]["server_root_password"]
}