Skip to content

Instantly share code, notes, and snippets.

View curtismitchell's full-sized avatar

Curtis Mitchell curtismitchell

View GitHub Profile
@curtismitchell
curtismitchell / cadvisor-fedora.sh
Created February 18, 2016 00:14
Get CAdvisor running on Fedora
#!/bin/bash
sudo docker run \
--volume=/:/rootfs:ro \
--volume=/var/run:/var/run:rw \
--volume=/sys:/sys:ro \
--volume=/var/lib/docker/:/var/lib/docker:ro \
--volume=/cgroup:/cgroup:ro \
--publish=8080:8080 \
--detach=true \
@curtismitchell
curtismitchell / BRD.md
Created May 22, 2015 03:06
Build Release Deploy

Project structure for continuous deployment

- Dockerfile
- packer.json
- docs/
  - ...
- src/
 - ...
@curtismitchell
curtismitchell / chef-server.sh
Created April 16, 2015 20:19
chef server 12 install from yum
#!bin/sh
sudo yum -y update
wget -O https://web-dl.packagecloud.io/chef/stable/packages/el/6/chef-server-core-12.0.7-1.el6.x86_64.rpm
sudo rpm -Uvh chef-server-core-12.0.7-1.el6.x86_64.rpm
sudo chef-server-ctl reconfigure
sudo chef-server-ctl user-create curtismitchell Curtis Mitchell curtis.mitchell@peoplefluent.com 5iveL!fe --filename /vagrant/userkey.pem
sudo chef-server-ctl org-create pf PeopleFluent --association_user curtismitchell --filename /vagrant/chef-validator.pem
sudo chef-server-ctl install opscode-manage
sudo chef-server-ctl reconfigure
# pulls metrics using aws cli
input {
exec {
command => "@powershell $start=([DateTime]::Today).ToUniversalTime().ToString(\"O\");$end=([DateTime]::Today).AddDays(1).ToUniversalTime().ToString(\"O\");aws cloudwatch get-metric-statistics --metric-name EstimatedCharges --start-time $start --end-time $end --period 1440 --namespace AWS/Billing --statistics Sum --dimensions Name=Currency`,Value=USD"
interval => 3600
codec => json
}
}
@curtismitchell
curtismitchell / what-is-devops.md
Created February 25, 2015 21:48
What is DevOps?

What is DevOps?

DevOps, the word, is a mash-up of the words: development and operations. Traditionally, development teams are responsible for producing software systems. And, operations teams are responsible for deploying and managing software systems.

DevOps combines those traditionally separate functions into one delivery team that has a single goal of delivering value to customers.

DevOps is Lean

Gene Kim, an author on DevOps topics and founder of Tripwire, suggest DevOps is the "result of implementing Lean principles to the IT value stream".

Consider the five lean principles:

@curtismitchell
curtismitchell / Vagrantfile
Last active August 29, 2015 14:13
StatsD and Graphite with Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
$scriptInflux = <<SCRIPT
#!/bin/bash
sudo apt-get update
sudo apt-get -y upgrade

Testing "Units"

This is a post about unit testing. I will describe some methods of automating unit tests after I have described the process of defining units.

According to Martin Fowler, an author on agile development methodologies, the definition of a "unit" has been vague since the very beginning.

There were definitional concerns about XP's use of unit testing right from the early days. I have a distinct memory of a discussion on a usenet discussion group where us XPers were berated by a testing expert for misusing the term "unit test."

In the same article, Fowler details some differences in what people consider to be a "unit".

@curtismitchell
curtismitchell / Apple WWDC 2014.md
Last active August 29, 2015 14:02
Apple WWDC 2014

#Notes from the keynote

##OS X Yosemite

  • Master salesmanship of Windows 7 Aero-like effect on the windows
  • Great new layouts for included apps like Calendar and iMessages
  • Spotlight takes the utility out of tools like QuickSilver and Alfred
  • Spotlight is "Google Search on the desktop" leaving the user less of a reason to launch a web browser
  • Spotlight is a user-behavior-changing-feature in that users will use the web browser less (as a starting point for research)

##iCloud

@curtismitchell
curtismitchell / Gherkin.md
Created March 13, 2014 23:09
Feature, User Story, Scenario authoring guidelines

#Gherkin Guidelines to documenting features, user stories, and scenarios using Gherkin, a business specification language.

In some projects, we will use Gherkin to communicate about features. Gherkin is a business-friendly language that is intended to ease communication between technical resources and project stakeholders.

##Feature A feature is a description of a key system function that delivers value to one or more stakeholders and/or end users.

##User Story A user story is a standard way of describing a feature in a matter that:

@curtismitchell
curtismitchell / Constraint for workspaces
Last active December 19, 2015 10:29
MVC route constraint that does not match a set of words (with help from http://stackoverflow.com/questions/6277022/regex-not-matching-a-list-of-words)
/* must come before the default route (if still being used)
allows for routes like .../mycompany/projects/index/1
uses the constraint to make sure system controller names can co-exist with workspace names
*/
routes.MapRoute(
"Workspace",
"{workspace}/{controller}/{action}/{id}",