Skip to content

Instantly share code, notes, and snippets.

Brian Akins bakins

Block or report user

Report or block bakins

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
gmcmillan / chef.rb
Created Jul 26, 2012
Simple Ruby class for manually querying the Chef REST API (using Net::HTTP instead of Chef's REST resources)
View chef.rb
require 'base64'
require 'time'
require 'digest/sha1'
require 'openssl'
require 'net/https'
require 'json'
class ChefAPI
# Public: Gets/Sets the http object.
adamhjk / file_provider_copy.rb
Created Aug 31, 2011
Stick this in a library file...
View file_provider_copy.rb
class Chef
class Provider
class File
class Copy << Chef::Provider::File
def compare_content
checksum(@current_resource.path) == checksum(@new_resource.content)
timdiggins / chef-roles-to-json-task.rb
Created Feb 19, 2011
rake task to convert existing ruby roles to json
View chef-roles-to-json-task.rb
# ADD this to Rakefile and run it by issuing rake roles.to_json
ROLE_DIR = File.expand_path(File.join(TOPDIR, "roles"))
namespace :roles do
desc "Convert ruby roles from ruby to json, creating/overwriting json files."
task :to_json do
Dir.glob(File.join(ROLE_DIR, '*.rb')) do |rb_file|
role =
json_file = rb_file.sub(/\.rb$/,'.json')
You can’t perform that action at this time.