Skip to content

Instantly share code, notes, and snippets.

View josephholsten's full-sized avatar

Joseph Anthony Pasquale Holsten josephholsten

View GitHub Profile
2013-10-21 18:33:10,257 [188006096@qtp-1522234469-0] ERROR org.codehaus.groovy.grails.web.servlet.view.GroovyPageView - Error processing GroovyPageView: Error executing tag <g:expander>: Error creating bean with name 'UtilityTagLib': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [UtilityTagLib]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: UtilityTagLib$_closure1 at /WEB-INF/grails-app/views/error.gsp:39
org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <g:expander>: Error creating bean with name 'UtilityTagLib': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [UtilityTagLib]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: UtilityTagLib$_closure1 at /WEB-INF/grails-app/views/error.gsp:39
at gsp_rundeckerror_gsp$_run_closure
<products>
<product
product_id="227307351"
name="Sam Edelman Women's Ximon"
sku_number="227307351"
manufacturer_name="Sam Edelman"
part_number="00736701885362">
<category>
<primary>Apparel~~Footwear</primary>
<secondary></secondary>
@josephholsten
josephholsten / nolo-json-format.md
Created March 12, 2013 21:36
Nolo to JSON impedence: who wins?

Nolo to JSON impedence: who wins?

A typical sort of plugin I'd like nolo to support would work like this:

% ./app_plugin
connections_open 216 time=1200928930 type=uint16 host=darkstar
requests 153 release=2.24.2.4271 type=uint8 host=darkstar

While I'm interesting in writing pure adapters for things like collectd

@josephholsten
josephholsten / gist:5016869
Created February 22, 2013 21:58
rake tasks
task :upload_all do
sh 'knife environment from file environments/*.rb'
sh 'knife role from file roles/*.rb'
sh 'knife data_bag from file -a'
sh 'knife cookbook upload -a'
end
desc "Runs foodcritic linter"
task :foodcritic do
if Gem::Version.new("1.9.2") <= Gem::Version.new(RUBY_VERSION.dup)
@josephholsten
josephholsten / fakify.rb
Last active December 10, 2015 13:28
because creating fake data is annoying
class Date
def self.random(from=Date.new(1970), to=Time.now.to_date)
rand(from..to)
end
end
module ActiveRecord
class Base
def self.fake_attributes(use_nulls=false)
Hash[self.columns.map {|c| c.random_record(use_nulls) }]
@josephholsten
josephholsten / Cheffile
Created November 16, 2012 04:45
Librarian failing
#!/usr/bin/env ruby
#^syntax detection
site 'http://community.opscode.com/api/v1'
#
# cookbooks only on github
cookbook 'ruby_build',
git: 'https://github.com/fnichol/chef-ruby_build',
ref: 'v0.6.0'
cookbook 'rbenv',
@josephholsten
josephholsten / gist:4075283
Created November 14, 2012 22:23
logstash upstart
description "logstash"
author "[email protected]"
start on startup
stop on shutdown
script
cd /opt/logstash/server/
exec 2>&1
# Need to set LOGSTASH_HOME and HOME so sincedb will work
¿ knife cookbook site install git -VV
DEBUG: Using configuration from /Users/josephholsten/Developer/chef/.chef/knife.rb
Installing git to cookbooks
DEBUG: sh(git branch --no-color)
chef-vendor-git
* master
DEBUG: sh(git status --porcelain)
?? typescript
Checking out the master branch.
DEBUG: sh(git checkout master)
@josephholsten
josephholsten / fix_ovf.rb
Created November 1, 2011 23:34
Because no one actually implements a standard
#!/usr/bin/env ruby -w
# fix_ovf: convert virtualbox ovf documents to work with vmware
# Usage: fix_ovf < vbox.ovf > vmware.ovf
require 'nokogiri'
class OVFDocument < Nokogiri::XML::Document
XMLNS = {
'rasd' => "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData",
'vssd' => "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData",