Skip to content

Instantly share code, notes, and snippets.

View jamtur01's full-sized avatar
💭
I may be slow to respond.

James Turnbull jamtur01

💭
I may be slow to respond.
View GitHub Profile
@jamtur01
jamtur01 / gist:1248295
Created September 28, 2011 15:49 — forked from geemus/gist:1248281
2012 Fukuoka Ruby Award Competition
  1. Outline Explain briefly functions and feature.

fog provides a consistent, simple interface to many cloud services. The simple interface helps new users get started fast with Cloud services. The consistent approach allows users to undertake arbitrage to find the best provider for their needs and helps them to migrate to another provider should their needs change. fog's open source license has also created a community around the product that greatly reduces the time needed to extend the interface when a Cloud new product or feature is released.

  1. Purpose and Aim Describe the purpose of development, aim and market targeted.

Cloud services are complicated and widely disparate. Evaluating your Cloud options, getting started in the Cloud, and migrating your data and workloads can all be very difficult and expensive activities. fog seeks to alleviate this by providing a simple interoperable on ramp to a wide selection of Cloud services. In doing so it opens up Cloud computing for everyone instead of the sele

#! /usr/bin/env ruby
require 'socket'
action = ARGV[0]
alert = ARGV[1]
irccat_server = "localhost"
irccat_port = "12345"
irccat_channel = "#plops"
@jamtur01
jamtur01 / puppetral.ddl
Created April 17, 2012 20:39
Updated PuppetRAL agent
metadata :name => "Agent for Puppet RAL interaction",
:description => "Agent to inspect and act on the RAL",
:author => "R.I.Pienaar, Max Martin",
:license => "ASL2",
:version => "0.2",
:url => "http://mcollective-plugins.googlecode.com/",
:timeout => 180
action "create", :description => "Add a resource to the RAL" do
display :always
t update "I'm tweeting from the command line. Isn't that special?"
/Library/Ruby/Gems/1.8/gems/twitter-2.2.1/lib/twitter/response/parse_json.rb:17:in `parse': private method `load' called for MultiJson:Module (NoMethodError)
from /Library/Ruby/Gems/1.8/gems/twitter-2.2.1/lib/twitter/response/parse_json.rb:23:in `on_complete'
from /Library/Ruby/Gems/1.8/gems/faraday-0.7.6/lib/faraday/response.rb:9:in `call'
from /Library/Ruby/Gems/1.8/gems/faraday-0.7.6/lib/faraday/response.rb:62:in `on_complete'
from /Library/Ruby/Gems/1.8/gems/faraday-0.7.6/lib/faraday/response.rb:8:in `call'
from /Library/Ruby/Gems/1.8/gems/faraday-0.7.6/lib/faraday/response.rb:8:in `call'
from /Library/Ruby/Gems/1.8/gems/faraday-0.7.6/lib/faraday/request/url_encoded.rb:14:in `call'
from /Library/Ruby/Gems/1.8/gems/faraday-0.7.6/lib/faraday/request/multipart.rb:13:in `call'
from /Library/Ruby/Gems/1.8/gems/twitter-2.2.1/lib/twitter/request/oauth.rb:17:in `call'
require 'jekyll'
LINK = "http://www.example.com"
desc 'Notify Twitter of a new post'
task :tweet do
puts '* Pinging Twitter about the latest post'
options = {}
options = Jekyll.configuration(options)
site = Jekyll::Site.new(options)
#
# Copyright 2011, James Turnbull
#
# 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
@jamtur01
jamtur01 / generate_navigation.rb
Created May 20, 2012 21:28
Auto-generates navigation menu for Jekyll sites using pages based on subdirectories and contents
# Auto-generates navigation
# {% generate_navigation %}
#
require 'pathname'
module Jekyll
class Page
def source_path
File.join(@dir, @name).sub(%r{^/*},'')
#!/usr/bin/env ruby
$:.unshift(File.expand_path(File.join(File.dirname(__FILE__), "lib")))
require 'project_razor'
require 'rubygems'
require 'sinatra/base'
require 'json'
require 'pp'
stolen:~ root# puppet help
Usage: puppet <subcommand> [options] <action> [options]
Available subcommands, from Puppet Faces:
ca Local Puppet Certificate Authority management.
catalog Compile, save, view, and convert catalogs.
certificate Provide access to the CA for certificate management.
certificate_request Manage certificate requests.
certificate_revocation_list Manage the list of revoked certificates.
config Interact with Puppet's configuration options.
@jamtur01
jamtur01 / gist:3016110
Created June 29, 2012 05:57
puppet-lint trace
/Library/Ruby/Gems/1.8/gems/puppet-lint-0.1.13/lib/puppet-lint.rb:48:in `%'
/Library/Ruby/Gems/1.8/gems/puppet-lint-0.1.13/lib/puppet-lint.rb:48:in `call'
/Library/Ruby/Gems/1.8/gems/puppet-lint-0.1.13/lib/puppet-lint.rb:48:in `%'
/Library/Ruby/Gems/1.8/gems/rack-1.4.1/lib/rack/backports/uri/common_18.rb:55:in `decode_www_form_component'
/Library/Ruby/Gems/1.8/gems/rack-1.4.1/lib/rack/backports/uri/common_18.rb:53:in `times'
/Library/Ruby/Gems/1.8/gems/rack-1.4.1/lib/rack/backports/uri/common_18.rb:53:in `decode_www_form_component'
/Library/Ruby/Gems/1.8/gems/rack-1.4.1/lib/rack/utils.rb:43:in `unescape'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:847:in `static!'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:884:in `dispatch!'
/Library/Ruby/Gems/1.8/gems/sinatra-1.3.2/lib/sinatra/base.rb:719:in `call!'