Skip to content

Instantly share code, notes, and snippets.

@endzyme
endzyme / 1_activemqconfig.pp
Last active December 14, 2015 20:49
concat use for active mq configuration file populating static clustered known hosts. -- Updated for better handling of filtering. -- This method of Exported Resources with multiple filters will require PuppetDB running.
# When you build your ERB files you should split them up into header and footer around
# the dynamic area. Which also sucks. Wish there was a better way of getting stored
# configs out of puppet upon runtime.. Like maybe into variables.
class activemq::activemqconfig () {
include concat::setup
concat {'/usr/local/activemq/apache-activemq-5.5.1/conf/activemq.xml':
owner => 'activemq',
group => 'activemq',
mode => '0644',
@endzyme
endzyme / NoMethodError
Created January 4, 2013 17:28
This was an error from using cancan and not using a column name
Started GET "/deployments/new" for 172.16.228.1 at 2013-01-03 09:17:13 -0700
Processing by DeploymentsController#new as HTML
User Load (0.1ms) SELECT `users`.* FROM `users` WHERE `users`.`id` = 1 LIMIT 1
Completed 500 Internal Server Error in 5ms
NoMethodError (undefined method `production?=' for #<Deployment:0x000000055e45e8>):
activemodel (3.2.8) lib/active_model/attribute_methods.rb:407:in `method_missing'
activerecord (3.2.8) lib/active_record/attribute_methods.rb:149:in `method_missing'
cancan (1.6.8) lib/cancan/controller_resource.rb:92:in `block in assign_attributes'
cancan (1.6.8) lib/cancan/controller_resource.rb:91:in `each'
@endzyme
endzyme / newdiff.diff
Created November 11, 2012 06:42
new changes
diff --git a/.project b/.project
new file mode 100644
index 0000000..414c3ac
--- /dev/null
+++ b/.project
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>fog</name>
+ <comment></comment>
@endzyme
endzyme / classes.rb
Created October 20, 2012 00:25 — forked from kalleth/classes.rb
hmm, polymorphism?
class DataCenter < ActiveRecord::Base
# has configuration_type, configuration_id attributes
def config
configuration_type.constantize.find(configuration_type)
end
def config=(config)
configuration_type = config.class.name
configuration_id = config.id
end