This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use 5.010; | |
use strict; | |
use warnings; | |
BEGIN { | |
eval { | |
require 'lib/Foo.pm'; | |
}; | |
print $@; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Foo::Bar; | |
use strict; | |
use warnings; | |
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Install all packages, including nodejs and npm (I always install build essential on dev machines, I've included it here for accuracy) | |
2) install grunt and compass | |
3) set environment variables | |
4) checkout calamari to /opt/workspace | |
5) create virtualenv | |
6) activate virtualenv (very important step I was missing on my first run through, it's implied but I'm not well versed in Python so it was definitely an "Ah ha!" moment) | |
7) use pip to install dependencies, the `pip install -r requirements/debian/requirements.force.txt` tends to complete with an already satisfied." but I continue to run it anyway. | |
8) Checkout calamari-clients to alternate directory | |
9) run make dist on calamari-clients directory | |
10) copy resulting contents to your webapp/contents directory (`make dist`, `make build-real`, or `make ui`, which is correct? there's a tarball that's involved somehow too... what's the deal with that?) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use 5.010; | |
use warnings; | |
use strict; | |
use DBI; | |
use DBD::DB2; | |
say "Operating System = " . $^O; | |
say "Perl Binary = " . $^X; | |
say "Perl Version = " . $]; | |
say "DBI Version = " . $DBI::VERSION; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RabbitMQ { | |
package { | |
'rabbitmq-server': | |
ensure => present, | |
require => Exec['add_rabbitmq_repository'], | |
} | |
exec { "wget -O- http://www.rabbitmq.com/rabbitmq-signing-key-public.asc | apt-key add - && apt-get update" | |
alias => 'add_rabbitmq_repository', | |
creates => /etc/apt/sources.list.d/rabbitmq.list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class rabbitmq { | |
apt::source { "rabbitmq": | |
location => "http://www.rabbitmq.com/debian/", | |
release => "testing", | |
repos => "main", | |
key => "056E8E56", | |
key_source => "http://www.rabbitmq.com/rabbitmq-signing-key-public.asc", | |
pin => "-10", | |
include_src => false | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@puppet:/etc/puppet/modules# ssh sidious puppet agent --test | |
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Syntax error at '{'; expected '}' at /etc/puppet/modules/cpanel/manifests/init.pp:23 on node sidious | |
warning: Not using cache on failed catalog | |
err: Could not retrieve catalog; skipping run | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@sidious ~]# puppet agent --test | |
info: Caching catalog for sidious | |
info: Applying configuration version '1337705421' | |
notice: /Stage[main]/Cpanel/Exec[disable_selinux]/returns: executed successfully | |
notice: /Stage[main]/Cpanel/Exec[download_cpanel]/returns: executed successfully | |
err: /Stage[main]/Cpanel/Exec[install_cpanel]/returns: change from notrun to 0 failed: sh /root/install_cpanel.sh returned 2 instead of one of [0] at /etc/puppet/modules/cpanel/manifests/init.pp:52 | |
notice: Finished catalog run in 1.26 seconds | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Facter.add("configserver_firewall") do | |
has_weight 100 | |
setcode do | |
if File.exist? "/etc/init.d/csf" | |
"true" | |
else | |
"false" | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
package Test; | |
use Moose; | |
sub get_template { | |
my $template =<<'END_TEMPLATE'; | |
[%- USE assert -%] | |
<kayako_staffapi> | |
<create staffapiid="[%- staffapiid -%]"> |
OlderNewer