Skip to content

Instantly share code, notes, and snippets.

View zipkid's full-sized avatar
💭
Eating 🍪

Stefan Goethals zipkid

💭
Eating 🍪
View GitHub Profile
@zipkid
zipkid / gist:763885
Created January 3, 2011 20:09
Mojolicious test
calling /customers (a protected path)
-> login
-> Use of uninitialized value in warn at script/../lib/Ds/Controllers/Auth.pm line 18.
(line 18 is the warn in the sub index)
#routes
$r->route('/')->to('index#welcome' )->name('index');
$r->route('/login')->to('auth#index' )->name('login');
$r->route('/logout')->to('auth#logout' )->name('logout');
@zipkid
zipkid / gist:764547
Created January 4, 2011 08:45
Mojolicious - redirect_to - flash issue...
Where does the flash disapear to!!!???
# Routes
my $r = $self->routes;
$r->namespace("Ds::Controllers");
# Normal route to controller
$r->route('/')->to('index#welcome' )->name('index');
$r->route('/login')->to('auth#index' )->name('login');
@zipkid
zipkid / gist:1779338
Created February 9, 2012 11:11
Jolokia 5 Minute Quickstart error when getting /jolokia/version
Feb 9, 2012 11:50:44 a.m. org.apache.catalina.core.ApplicationContext log
INFO: jolokia-agent: No access restrictor found at classpath:/jolokia-access.xml, access to all MBeans is allowed
Feb 9, 2012 11:50:44 a.m. org.apache.catalina.core.ApplicationContext log
SEVERE: StandardWrapper.Throwable
java.lang.ExceptionInInitializerError
at java.lang.Class.initializeClass(libgcj.so.10)
at java.lang.Class.newInstance(libgcj.so.10)
at org.jolokia.util.ServiceObjectFactory.createOrRemoveService(ServiceObjectFactory.java:137)
at org.jolokia.util.ServiceObjectFactory.readServiceDefinitionFromUrl(ServiceObjectFactory.java:96)
at org.jolokia.util.ServiceObjectFactory.readServiceDefinitions(ServiceObjectFactory.java:81)
@zipkid
zipkid / gist:2215319
Created March 27, 2012 12:02
Vagrant - postinstall.sh
#http://chrisadams.me.uk/2010/05/10/setting-up-a-centos-base-box-for-development-and-testing-with-vagrant/
date > /etc/vagrant_box_build_time
cat > /etc/yum.repos.d/puppetlabs.repo << EOM
[puppetlabs]
name=puppetlabs
baseurl=http://stahnma.fedorapeople.org/puppetlabs/6/products/\$basearch
enabled=1
gpgcheck=0
@zipkid
zipkid / welcome.md
Created April 20, 2012 21:52
Drift intro

Welcome to Drift!

Drift is an always-already versioned, cloud-backed text editor. You can use it to take notes, and save them in the GitHub cloud.

Your gists are always saved locally, and any changes you make will get pushed to GitHub's servers.

To name a gist, touch its name in the toolbar.

You can use the share button at the top-right to copy a link to one of your gists, or view it on the web in Safari.

@zipkid
zipkid / init.pp
Created May 21, 2012 13:12
Chaining resources - locking / ordering
class ntp
{
# http://docs.puppetlabs.com/guides/language_guide.html#chaining-resources
# anchor is in https://github.com/puppetlabs/puppetlabs-stdlib
anchor { 'ntp::start': }->
class { 'ntp::package': }->
class { 'ntp::config': }~>
class { 'ntp::service': }->
@zipkid
zipkid / hiera.yaml
Created May 29, 2012 13:45
Hiera default data in puppet modules
:hierarchy:
- Nodes/%{fqdn}
- common
:backends:
- yaml
- puppet
:yaml:
:datadir: '/etc/puppet/hieradata'
@zipkid
zipkid / gist:2841626
Created May 31, 2012 07:19
Rake - puppet-lint problem (OS X)
android18:puppet-modules zipkid$ rake lint
(in /Volumes/Source/Eclipse-workspace/Super-Visions/puppet-modules)
rake aborted!
Cannot load puppet-lint, please install gem : # gem install puppet-lint
/Volumes/Source/Eclipse-workspace/Super-Visions/puppet-modules/Rakefile:7
(See full trace by running task with --trace)
android18:puppet-modules zipkid$ cat Rakefile
# Rakefile
desc "Run puppet-lint."
task :lint do |t, args|
@zipkid
zipkid / commandline
Created May 31, 2012 08:30
puppet audited resource report
[root@pm1 puppet]# puppet agent -t
info: Retrieving plugin
info: Loading facts in /etc/puppet-modules/puppet/lib/facter/facter_dot_d.rb
info: Loading facts in /etc/puppet-modules/puppet/lib/facter/puppet_vardir.rb
info: Loading facts in /etc/puppet-modules/puppet/lib/facter/root_home.rb
info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
info: Caching catalog for pm1.lan.super-visions.com
info: Applying configuration version '1338452803'
:hierarchy:
- Perimeter/%{perimeter}
- DC/%{datacenter}
- OS/%{operatingsystem}
- common
- ${environment}
:backends:
- yaml
- puppet