14 mar 2013
Puppet Enterprise provides:
- GUI
- orchestration (m-collective): live management thru GUI
#!/usr/bin/perl | |
# | |
# vots-pirates.pl | |
# | |
# Requeriments: | |
# sudo apt-get install libnotify-bin libwww-perl | |
# | |
use LWP::Simple; |
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
my $SERVER = 'imap.example.com'; | |
my $USER = 'user.name@example.com'; | |
my $PASSWD = '***'; | |
my $PORT = 993; | |
my $SSL = 1; |
# Perl 6 | |
use v6; | |
my @Barcelona = < Barcelona >; | |
my @PerlMongers = < Perl >; | |
# Define Camelia binary operator: »ö« | |
# https://github.com/perl6/mu/raw/master/misc/camelia.txt | |
# Takes a pair from the operand arrays and puts a heart in the middle | |
sub infix:<»ö«> { |
#!/bin/sh | |
# markdown as shell script | |
## setup | |
set -e | |
set -x | |
FOOBAR="foobar" | |
## step 1 |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use 5.010; | |
use Getopt::Long; | |
my %opt = ( 'list' => sub { say $_[0] } ); | |
GetOptions( 'list=s' => sub { $opt{ $_[0] }->( $_[1] ) } ); |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use 5.010; | |
use Getopt::Long; | |
sub list_postinstall { | |
say "postinstall: <@_>"; |
sub opt_postinstalls { | |
print "\nValid Postinstalls\n"; | |
print "------------------\n\n"; | |
list_postinstall(); | |
print "\n"; | |
exit 0 | |
} | |
sub opt_distros { | |
print "\nValid Distributions\n"; |
my $callback = sub { | |
my ($line) = @_; | |
return line_match($line, @words); | |
}; | |
my @matches; | |
while (my $line = <STDIN>){ | |
if (my $result = scan_input( $., $line, $callback )) { | |
push @matches, $result; |
#!/usr/bin/perl | |
use warnings; | |
use strict; | |
local *p = sub { | |
print "[", ( join ",", @_ ), "]\n"; | |
}; | |
p(qw( foo bar )); |