Skip to content

Instantly share code, notes, and snippets.

@dhoss
dhoss / puppet NFS
Created December 24, 2010 04:56 — forked from eqhmcow/puppet NFS
# modules/nfs/manifests/init.pp
class nfs_server {
file { "destroy_exports":
path => "/etc/exports.puppet",
ensure => present,
source => "puppet://$servername/modules/nfs/empty",
}
package { "portmap":
@dhoss
dhoss / check_postgres_replication.py
Created September 6, 2011 17:57 — forked from jacobian/check_postgres_replication.py
Nagios plugin to check PostgreSQL 9 streaming replication lag.
#!/usr/bin/env python
"""
Nagios plugin to check PostgreSQL 9 streaming replication lag.
Requires psycopg2 and nagiosplugin (both installable with pip/easy_install).
MIT licensed:
Copyright (c) 2010 Jacob Kaplan-Moss. All rights reserved.
@dhoss
dhoss / gist:1223383
Created September 16, 2011 23:12 — forked from jshirley/gist:1223273
package MyApp::Web::Model::DataManager;
use Moose;
use Email::Valid;
extends 'Catalyst::Model';
with 'Catalyst::Component::InstancePerContext';
my $email_filter = sub {
@dhoss
dhoss / Model
Created September 19, 2011 18:36 — forked from anonymous/gist:1227212
package PerlFu::Web::Model::Validator;
use Moose;
use namespace::autoclean;
use Data::Manager;
use Data::Verifier;
use Data::Dumper;
use Carp qw( croak );
extends 'Catalyst::Model';
with 'Catalyst::Component::InstancePerContext';
package PerlFu::Web::Model::Validator::Post;
use Moose;
use namespace::autoclean;
extends 'PerlFu::Web::Model::Validator';
sub _build_profiles {
my $self = shift;
return {
title => {
Resume/CV
Devin Austin
devin.austin@gmail.com
970-290-6669
Summary: I am a web software developer.
package MyApp::DataManager;
use Moose;
extends 'Data::Manager';
has 'scope_to_resultsource' => (
is => 'ro',
isa => 'HashRef',
required => 1,
package MyApp::DataManager;
use Moose;
extends 'Data::Manager';
has 'scope_to_resultsource' => (
is => 'ro',
isa => 'HashRef',
required => 1,
package Worker;
use Moose;
use Try::Tiny;
with qw(MooseX::Workers);
use POE qw(Filter::Reference Filter::Line);
sub run {
my $self = shift;
my @jobs = @{$self->get_jobs("jobs.txt")};
for my $job ( @jobs ) {