Skip to content

Instantly share code, notes, and snippets.

View rberger's full-sized avatar

Robert J. Berger rberger

View GitHub Profile
@rberger
rberger / gist:9108181
Created February 20, 2014 06:38
Panic in fleetctl status
$ fleetctl status myapp.service
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x0 pc=0x4eb5fe]
goroutine 1 [running]:
runtime.panic(0x6cf360, 0xae0188)
/usr/lib/go/src/pkg/runtime/panic.c:266 +0xb6
github.com/coreos/fleet/third_party/code.google.com/p/go.crypto/ssh.clientWithAddress(0x7f530239e8d8, 0xc210000538, 0xc210000518, 0x3, 0x0, ...)
/build/amd64-generic/tmp/portage/app-admin/fleet-0.1.2/work/fleet-0.1.2/src/github.com/coreos/fleet/third_party/code.google.com/p/go.crypto/ssh/client.go:43 +0x2e
github.com/coreos/fleet/third_party/code.google.com/p/go.crypto/ssh.Dial(0x7380e0, 0x3, 0xc210000518, 0x3, 0x0, ...)
@rberger
rberger / berkshelf_config.json
Created March 3, 2014 05:55
Berkshelf Config for TDD with Chef
{
"vagrant": {
"vm": {
"box": "opscode-centos-6.4",
"box_url": "https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_centos-6.4_provisionerless.box",
"forward_port": {},
"network": {
"bridged": false
},
"provision": "chef_solo"
/* A table for myface users */
CREATE TABLE users(
id CHAR (32) NOT NULL,
PRIMARY KEY(id),
user_name VARCHAR(64),
url VARCHAR(256),
email VARCHAR(128),
neck_beard INTEGER
);
#
# Cookbook Name:: myface
# Recipe:: default
#
# Copyright (C) 2012 Sean OMeara
#
# Apache 2 license
#
user 'myface'
@rberger
rberger / default_test.rb
Created March 7, 2014 09:16
files/default/tests/minitest/default_test.rb for Slide 206
require File.expand_path('../support/helpers', __FILE__)
require File.expand_path('../../apache2/support/helpers', __FILE__)
describe 'myface::default' do
include Helpers::Myface
include Helpers::Apache
# Example spec tests can be found at http://git.io/Fahwsw
#
# Cookbook Name:: myface
# Recipe:: default
#
# Copyright (C) 2012 Sean OMeara
#
# Apache 2 license
#
user 'myface'
# Managed by Chef for <%= node['hostname'] %>
<VirtualHost *:80>
ServerAdmin <%= node['apache']['contact'] %>
DocumentRoot /srv/apache/myface
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /srv/apache/myface>
<!--
Copyright 2013, Opscode, 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,
#
# Cookbook Name:: myface
# Recipe:: database
#
# Copyright (C) 2013 Charles Johnson
#
# All rights reserved - Do Not Redistribute
#
include_recipe "mysql::server"
require File.expand_path('../support/helpers', __FILE__)
describe 'myface::database' do
include Helpers::Myface
# Example spec tests can be found at http://git.io/Fahwsw
# Verify that MySQL is installed & enabled:
it "Enables and starts the mysql daemon" do