Skip to content

Instantly share code, notes, and snippets.

View cheeseplus's full-sized avatar
🎯
Focusing

Seth Thomas cheeseplus

🎯
Focusing
View GitHub Profile
@btm
btm / gist:7cb421f5fe7d1003083a
Created March 18, 2015 22:00
Chef Postmortem Template
# INCIDENT DATE - INCIDENT TYPE
## Meeting
#### Waiving meetings
In some cases the IC might determine that a PM meeting for the incident isn't needed.
If the IC decides to waive the meeting please replace the `Meeting` section with a
note indicating the meeting has been waived (example: `Meeting waived: Paul Mooring`)
@pburkholder
pburkholder / gist:a9cdde0b33be8d5e3c08
Created February 20, 2015 02:00 — forked from tyler-ball/gist:f7c16e814265f34260e9
Shared examples in rspec/serverspec.....

Create the following folder structure in your cookbook:

test
└── integrationq
    ├── helpers
    │   ├── serverspec
    │   │   ├── shared_serverspec_tests
    │   │   │   └── shared_tests2.rb
    │   │   └── spec_helper.rb
@kwilczynski
kwilczynski / check.md
Last active July 6, 2023 08:35
Recipe / Role check in Chef

If you want to check whether a node run_list includes a specific role (upon expansion), then you could use role? method on the Node object:

node.role?('name')

Alternatively, you can see whether either would work for you:

node.roles.include?('name')

node.run_list?('role[name]')

@ipedrazas
ipedrazas / knife cheat
Last active December 13, 2021 11:50
Hello!
# knife cheat
## Search Examples
knife search "name:ip*"
knife search "platform:ubuntu*"
knife search "platform:*" -a macaddress
knife search "platform:ubuntu*" -a uptime
knife search "platform:ubuntu*" -a virtualization.system
knife search "platform:ubuntu*" -a network.default_gateway
@acolyer
acolyer / service-checklist.md
Last active January 30, 2024 17:39
Internet Scale Services Checklist

Internet Scale Services Checklist

A checklist for designing and developing internet scale services, inspired by James Hamilton's 2007 paper "On Desgining and Deploying Internet-Scale Services."

Basic tenets

  • Does the design expect failures to happen regularly and handle them gracefully?
  • Have we kept things as simple as possible?
@charlesjohnson
charlesjohnson / gemrc.erb
Last active August 29, 2015 14:05
Use a .gemrc file with Omnibus chef-client
:sources:
- http://<%= node['gem_file']['host'] %>:<%= node['gem_file']['port'] %>/
@vinyar
vinyar / rspec output.rb
Created August 21, 2014 23:04
rspec failing on windows against recipe with Multibyte chars
Test:
it "executes dummy command" do
expect(chef_run).to run_execute('random hiragana 料').with_command('puts 料理長')
end
Other notes:
Cookbook upload works fine with Japanese in all parts of the cookbook.
Failure:
@dragonai
dragonai / README.md
Last active July 15, 2019 18:48
GitHub Organization Open Pull Requests

##Preview

Description

Simple Dashing widget that displays all currently open pull requests across a GitHub organization.

##Usage

struct NPC
{
uint8_t activeScale; // higher => will execute more logic / TICK
void AdjustActivityScale(const float normalizedDistanceFromPC) // Clamped to 0...1
{
activeScale = normalizedDistanceFromPC * 10.0;
}
@kyledrake
kyledrake / ferengi-plan.txt
Last active April 6, 2024 00:30
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {