Skip to content

Instantly share code, notes, and snippets.

View dougireton's full-sized avatar

Doug Ireton dougireton

View GitHub Profile
# include Windows::Helper from Opscode Windows Cookbook
::Chef::Recipe.send(:include, Windows::Helper)
# now you can call helper methods like win_friendly_path directly
my_batch_file = win_friendly_path(
::File.join( node['cookbook']['batch_dir'],'foo.bat'))
execute "My batch file" do
command my_batch_file
creates "e:/logs/my_batch_file.log"
locate_sysnative_cmd("dism.exe")
# include Windows::Helper from Opscode Windows Cookbook
::Chef::Recipe.send(:include, Windows::Helper)
# now you can call helper methods like win_friendly_path directly
my_batch_file = win_friendly_path(
::File.join( node['cookbook']['batch_dir'],'foo.bat'))
execute "My batch file" do
command my_batch_file
creates "e:/logs/my_batch_file.log"
# https://github.com/opscode-cookbooks/windows
# create a printer
windows_printer 'HP LaserJet 5th Floor' do
driver_name 'HP LaserJet 4100 Series PCL6'
ipv4_address '10.4.64.38'
end
@dougireton
dougireton / recruiter_response.md
Last active January 11, 2020 22:52
I've started responding to recruiters with this list of requirements

Company Requirements

I'm definitely not looking for work. However to provide some helpful guidance for hiring like-minded engineers, I would only consider working for a company if it met these requirements:

  1. Fewer than 250 employees.
  2. Concrete, measurable plan to increase the number of women and minorities in engineering roles.
  3. Commitment to using and contributing to open source.
  4. Collaborative, friendly atmosphere where pair programming is encouraged.
  5. Meaningful work with clear linkage between work and company goals.
  6. Demonstrated commitment to ethical business practices, e.g. B corp certification.
@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
@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 / knife.rb
Last active November 4, 2018 02:41
Flexible knife.rb to support switching between multiple Chef orgs - ~/.chef/knife.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 / 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,