Skip to content

Instantly share code, notes, and snippets.

View bnferguson's full-sized avatar

Brandon Ferguson bnferguson

View GitHub Profile
~/chef-repo(master) $ knife bootstrap 192.168.0.132
Bootstrapping Chef on 192.168.0.132
Failed to authenticate root - trying password auth
Enter your password:
192.168.0.132 [Wed, 23 Jun 2010 04:08:48 -0400] INFO: Client key /etc/chef/client.pem is not present - registering
192.168.0.132 [Wed, 23 Jun 2010 04:08:49 -0400] WARN: HTTP Request Returned 401 Unauthorized: Failed the authorization check
192.168.0.132 /usr/lib/ruby/1.8/net/http.rb:2101:in `error!': 401 "Unauthorized" (Net::HTTPServerException)
192.168.0.132 from /usr/lib/ruby/gems/1.8/gems/chef-0.9.0/bin/../lib/chef/rest.rb:216:in `api_request'
192.168.0.132 from /usr/lib/ruby/gems/1.8/gems/chef-0.9.0/bin/../lib/chef/rest.rb:267:in `retriable_rest_request'
192.168.0.132 from /usr/lib/ruby/gems/1.8/gems/chef-0.9.0/bin/../lib/chef/rest.rb:197:in `api_request'
@bnferguson
bnferguson / gist:887256
Created March 25, 2011 17:47
Daniel Shiffman's initial example in his PVector + Processing Tutorial re-written in clojure as an exercise.
; Daniel Shiffman's initial example in his PVector + Processing Tutorial
; re-written in clojure
(ns example1
(:use [rosado.processing]
[rosado.processing.applet]))
(set! *warn-on-reflection* true)
(defn bounced?
# unicorn_rails -c /data/github/current/config/unicorn.rb -E production -D
rails_env = ENV['RAILS_ENV'] || 'production'
# 16 workers and 1 master
worker_processes (rails_env == 'production' ? 16 : 4)
# Load rails+github.git into the master before forking workers
# for super-fast worker spawn times
preload_app true
# For rvm had to add the lines to Capistrano:
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path.
require "rvm/capistrano"
set :rvm_ruby_string, '1.9.2@community'
@bnferguson
bnferguson / gist:974430
Created May 16, 2011 13:21
janus Hammer Crashes
[master][~/dev/CommunityReboot] ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.3]
[master][~/dev/CommunityReboot] gem list
*** LOCAL GEMS ***
aaronh-chronic (0.3.9)
actionmailer (2.3.11)
actionpack (2.3.11)
activerecord (2.3.11)
@bnferguson
bnferguson / solo_data_bags.rb
Created June 30, 2011 17:19 — forked from rcreasey/solo_data_bags.rb
Using data bags with chef-solo
From: Brian Akins < brian@akins.org>
To: chef < chef@lists.opscode.com>
Subject: [chef] Data bag implementation for chef-solo
Date: Tue, 1 Feb 2011 10:42:05 -0500
We often use chef-solo for quick testing, etc. This is our extremely simple implementation of data bags for chef-solo. Add "data_bag_path /some/dir/data_bags" to your solo.rb and add this into your libraries:
if Chef::Config[:solo]
class Chef
module Mixin
module Language
import processing.serial.*;
import cc.arduino.*;
Arduino arduino;
void setup() {
arduino = new Arduino(this, Arduino.list()[0], 115200);
}
void draw() {
import processing.serial.*;
import cc.arduino.*;
Arduino arduino;
int ledPin = 13;
void setup()
{
//println(Arduino.list());
arduino = new Arduino(this, Arduino.list()[0], 57600);
.carousel.carousel-fade .item {
-webkit-transition: opacity 2s ease-in-out;
-moz-transition: opacity 2s ease-in-out;
-ms-transition: opacity 2s ease-in-out;
-o-transition: opacity 2s ease-in-out;
transition: opacity 2s ease-in-out;
}
.carousel.carousel-fade .active.left,
.carousel.carousel-fade .active.right {
left: 0;
import processing.opengl.*;
import SimpleOpenNI.*;
SimpleOpenNI kinect;
void setup() {
size(1028, 768, OPENGL);
kinect = new SimpleOpenNI(this);
kinect.enableDepth();
kinect.enableUser(SimpleOpenNI.SKEL_PROFILE_ALL);