Skip to content

Instantly share code, notes, and snippets.

View dougireton's full-sized avatar

Doug Ireton dougireton

View GitHub Profile
@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 / pre-commit
Created December 11, 2012 05:22
git pre-commit hook for linting Chef cookbooks
#!/usr/bin/env ruby
# check for whitespace errors
git_ws_check = `git diff-index --check --cached HEAD --`
unless $?.success?
puts git_ws_check
exit 1
end
COOKBOOK_PATH = File.split `git rev-parse --show-toplevel`
@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 / boxstarter.ps1
Last active January 10, 2018 01:15 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2017-09-11
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@dougireton
dougireton / ServerlessDeployBot.yml
Created December 21, 2017 00:33 — forked from ncloward/ServerlessDeployBot.yml
Serverless Deploy Bot Permissions
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'Cloudformation stack to manage permission to deploy a serverless service'
Parameters:
ServiceName:
Description: Name of the Service you want to deploy
Type: String
Resources:
@dougireton
dougireton / Getting started with Chef - Recommendations
Last active February 7, 2017 16:52
We met with an app team today. Here's the advice we gave them on getting started with Chef...
Per our discussion today we have the following recommendations:
1. Pick a single easy server “role” to automate, e.g. my_web_server.
Get that cookbook installing a single package a single Windows Feature, across all of your environments, including Prod.
2. Then rapidly iterate on that cookbook adding features and deploying through all environments, including Prod.
Build a regular habit of code review. Every change should be reviewed by another engineer.
Feel free to include Chef team engineers on Pull Requests.
3. Ideally you start writing simple tests with the cookbook, which our Cookbook Pipeline will execute on every Git push and merge.
{
"chefdk_bootstrap" : {
"package" : {
"atom" : false,
"git" : false,
"iterm2" : false,
"vagrant" : false,
"chefdk_julia" : false
}
}
# 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
# 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")