Skip to content

Instantly share code, notes, and snippets.

View spheromak's full-sized avatar
🕵️‍♂️

Jesse Nelson spheromak

🕵️‍♂️
View GitHub Profile
type Lock struct {
Name string `json:"name"`
RevisionId string `json:"revision_id"`
RunList []string `json:"run_list"`
CookBooks map[string]CookLock
}
type CookLock struct {
CacheKey string `json:"cache_key"`
DottedDecimalIdentifier string `json:"dotted_decimal_identifier"`
{
"name": "testnode",
"chef_environment": "_default",
"json_class": "Chef::Node",
"automatic": {
},
"normal": {
},
"chef_type": "node",
"default": {
@spheromak
spheromak / ossh.pub
Created February 5, 2015 21:52
SSH pubkey
ssh-dss AAAAB3NzaC1kc3MAAAIBAO0ysgu5YFoZyH+9p2ogrfAihKXMn4DbiaPxySeauePpW9mxdcGaVFRNF7Edf8JEe6ciYpt4egQ5Lyzlw+Yk1vf3qLwK4+NC0NeTVhYlmE6EtNYE/gf9wbIcKWOE3UdVOlI98NNnVxDCAw2p5J8sID2cDHZIjBoZkE42t3pkQOnZsXz9yys9lqoq6ekKlHtI9sgcjzB6Nu3XlVekAEGSryBekTl5jgmh7BBa77CXF+7jbYEdXRugPlxut2Bu2U2m1gdMCNJn08BQVrBKtZmvLjcFoi0n2yck81iT/eY8zHc1G3AgTtLUxAm0zpTdpZL7WvFNK1wU27K55FWsXH2ObV+9JhkYPB2w3zplzF8PeAB2XR5NtV1SOpzQUChYkpEbVOIqqhCzHImDjoJczIgj0KA6OhWWm9sKtLSbZ6gI2w7fC6er2yl9jk4NnMWMBZiVphTXh8tVueIl2bTCiYb7gE9hB4x154tIE3jOED+DSunMcMcJ022TggfS/wnwiZzqP1t79Q74Vxr577MtU4hActqcAFpdCAArgRs8LadoaS5dm0hqA+/Q73PinLtzA8FwFfw/aX93WTW8OYL+Es3i1l1uk83/v/zESNxD26ua5liBmxbtBCi44ecRrTKlLuZxt3ncceVFYtXQrS8dtNsuZPuMimQ5wFN+zWN9ZgY12LrRAAAAFQCx56r9ahEX+UdPTMDgOYCYypoj4QAAAgEAmfbhXtD29QqNZFD2YYb0gJoP+w8zDGObbcAtgS6pR6DQXztk/FreZDuhbkq4NbtrGKJwoiH77Wpew2q8+zHcXykF5URJ1yBeKGH31Bs0jkW9sgxiG+tMoh8mMBHujtic+0khvWcLLR03eoJ3xaHVzWu7SqSU/5GQcP4b+treNgjgKjFd9tXY3KJlRJ8GgBmslgOt1ZJzYAcew2dY95PeTLMzJxBReXtnssmLGiroGHwg7Yf1rKkDQK6Fjk1KziJx/jigI3CzlpTswe+6
# create_service builds a service resource we can notify in the given context
def create_service(ctx = nil)
ctx ||= @run_context
begin # this avoids resource cloning/recreation
ctx.resource_collection.find("service[#{new_resource.name}]")
rescue Chef::Exceptions::ResourceNotFound
Chef::Log.info "Creating 'service[#{new_resource.name}]' resource in context"
# define the service
# create_service builds a service resource we can notify in the given context
def create_service(context=nil)
ctx ||= @run_context
begin # this avoids resource cloning/recreation
ctx.resource_collection.find( "service[#{new_resource.name}]" )
rescue Chef::Exceptions::ResourceNotFound
Chef::Log.info 'Creating service resource'
s = Chef::Resource::Service.new(new_resource.name, ctx)
s.action :nothing
# this is so fucking ugly
case platform_family
when "debian"
package_options = '--force-yes -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew"'
include_recipe "apt"
apt_repository "sensu" do
uri node.sensu.apt_repo_url
key "#{node.sensu.apt_repo_url}/pubkey.gpg"
"
" Jesse Nelson <[email protected]>
" ab
"-------------------------------------------------------------------------------
"
"
set nocompatible " be iMproved
set t_Co=256
---
driver:
name: docker
use_sudo: false
socket: <%= ENV['DOCKER_HOST'] %>
# may have to set this
# privileged: true
run_command: /sbin/init
# this is here as an example of using environments
@spheromak
spheromak / .gemrc
Created October 22, 2014 01:13 — forked from jch/.gemrc
---
gem: --no-ri --no-rdoc
benchmark: false
verbose: true
update_sources: true
sources:
- http://rubygems.org/
backtrace: true
bulk_threshold: 1000
package main
import (
"log"
"net/http"
"github.com/elazarl/go-bindata-assetfs"
)
// staticHanlder handles all requessts by returning the index.html