Skip to content

Instantly share code, notes, and snippets.

use warnings;
use Data::Dumper;
use DMEApiClient;
use App::Rad;
App::Rad->run();
my $client = DMEApiClient->new(
base_url => 'http://api.dnsmadeeasy.com/V1.2/domains/ctsandbox.com'
API REQUEST: GET http://api.dnsmadeeasy.com/V1.2/domains/ctsandbox.com/records, RESPONSE: 200 OK$VAR1 = [
{
'ttl' => 300,
'gtdLocation' => 'DEFAULT',
'name' => '',
'data' => '55.55.55.55',
'type' => 'A',
'id' => 8191847
},
{
use POE;
use POE::Component::MessageQueue;
use POE::Component::MessageQueue::Storage::DBI;
use strict;
# For mysql:
my $DB_DSN = 'DBI:Pg:database=pocomq;hostname=127.0.0.1';
my $DB_USERNAME = 'pocomq';
my $DB_PASSWORD = '12345';
my $DB_OPTIONS = undef;
#!/usr/bin/perl
use strict;
use warnings;
my $usage = <<END;
Usage: $0 [options]
-p, --package name of package (REQUIRED)
-s, --source_dir directory containing source files (defaults to ./..)
-a, --all build binary and source packages
-h, --help display this help and exit
Name: TestPkg
Version: 0.0.0
Release: trunk
BuildArch: noarch
Summary: TestPkg
License: MIT
Group: Applications/Utilities
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release})
Source0: %{name}.tar.gz
Packager: Matt Williams <matt.williams@crowdtilt.com>
echo "Hello World"
node $id="41fbb604-386f-448a-b9c1-63aee4bdb89f" staging-lb1
node $id="4b4347e5-69c2-4bf7-8e6f-7c1f3ca0ba5f" staging-lb2
primitive EIP ocf:aws:elastic_ip \
op start interval="0" timeout="60" \
op stop interval="0" timeout="60" \
op monitor interval="60" timeout="30" \
meta is-managed="true" target-role="Started" failure-timeout="60"
location cli-prefer-EIP EIP \
rule $id="cli-prefer-rule-EIP" inf: #uname eq staging-lb1
property $id="cib-bootstrap-options" \
chef_gem "pony"
chef_handler "Chef::Handler::Mail" do
source "#{node[:chef_handler][:handler_path]}/mail"
arguments :to_address => node[:chef_handler][:mail][:to_address]
action :nothing
end.run_action(:enable)
require 'rubygems'
require 'chef'
require 'chef/handler'
require 'erubis'
require 'pony'
require 'pp'
class MailHandler < Chef::Handler
attr_reader :options
def initialize(opts = {})
git "/tmp" do
repository "git://github.com/blah.git"
branch "master"
user "root"
action :sync
end