Skip to content

Instantly share code, notes, and snippets.

View dougireton's full-sized avatar

Doug Ireton dougireton

View GitHub Profile
@dougireton
dougireton / Heirloom tomato margarita recipe
Created August 27, 2015 18:10
Heirloom tomato margarita recipe
Margarita “mix”
--------------------
5 limes, juiced
1 lemon, juiced
¾ cup simple syrup
1 heirloom tomato
½ local peach (optional)
1. Make simple syrup by heating ¾ cup sugar and ¾ water and whisking until the sugar dissolves. Set aside to cool a bit.
2. Juice the limes and lemon. Reserve one lime half to run around the rim of each glass so the salt sticks to the rim.
@dougireton
dougireton / devops_questions.md
Last active August 29, 2015 14:19
CoffeeOps 04/24 questions from Adam's ChefConf 2015 keynote

Questions from ChefConf 2015 Keynote

Start at the 11:00 min mark

Are we trying to create a high-velocity organization? Why and how?

Safety is defined as "the ability for individuals to act without fear of unintended consequences". How should we improve how we build systems to make them safer?

@dougireton
dougireton / notes_2015_05_22.md
Last active August 29, 2015 14:21
Seattle CoffeeOps 05/22/2015
#djDebug *{color:#888;float:none;margin:0;padding:0;position:static;text-align:left;}
#djDebug code{color:#333;}
#djDebug h3 code{color:#fff;}
#djDebug a{color:#ccc;}
#djDebug a:hover{color:#aaa;}
#djDebugToolbar{background:#333;height:30px;z-index:100000000;border-bottom:2px solid #222;position:absolute;top:0;left:0;right:0;}
#djDebugToolbarHandle{background:#555;height:30px;z-index:100000000;position:absolute;top:0;left:0;right:0;width:16px;}
#djDebugToolbarHandle ul li{padding:3px 0px 0px 3px;}
#djDebugToolbarHandle ul li a{font-size:16px;font-weight:bold;}
#djDebugToolbar ul{margin:0;padding:0;list-style:none;}
<%= flash.each do |key, msg| %>
<%= content_tag :div, msg, :class => key %>
<% end %>
class ApplicationController < ActionController::Base
protect_from_forgery
require 'rack/mobile-detect'
use Rack::MobileDetect
# set the Rails request.format (MIME type) to :iphone for iPhone/iPod Touch
# This allows us to serve separate layouts/views for iPhone/iPod
case request.headers['X_MOBILE_DEVICE']
@dougireton
dougireton / knife_override.rb
Last active September 16, 2015 00:25
~/chef/orgs/my_org/knife_override.rb
# Copyright 2015 Nordstrom, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@dougireton
dougireton / gist:2023820
Created March 12, 2012 18:32
Chef cookbook
# stop and delete the default site
iis_site 'Default Web Site' do
action [:stop, :delete]
end
# create and start a new site that maps to
# the physical location C:\inetpub\wwwroot\testfu
iis_site 'Testfu Site' do
protocol :http
port 80
@dougireton
dougireton / chefspec_windows_rights_attributes
Created October 1, 2012 20:56
Chefspec doesn't seem to support Windows 'rights' attributes
When I run this spec, I get errors saying undefined method `rights' for Chef::Resource::CookbookFile since I'm using the [Windows 'rights' attribute](http://wiki.opscode.com/display/chef/Improved+Windows+File+Security)
Does chefspec support the Windows 'rights' attribute?
```ruby
require 'chefspec'
describe 'hosts_file::windows' do
@dougireton
dougireton / chef.vim
Created February 8, 2013 06:25
(Broken) chef Syntastic syntax checker
function! SyntaxCheckers_chef_IsAvailable()
return executable('foodcritic')
endfunction
function! SyntaxCheckers_chef_GetLocList()
" let exe = expand(g:syntastic_ruby_exec)
" if !has('win32')
" let exe = 'RUBYOPT= ' . exe
" endif