Skip to content

Instantly share code, notes, and snippets.

View alexm's full-sized avatar

Alex Muntada alexm

View GitHub Profile
@alexm
alexm / check-template
Created September 30, 2014 18:20
Check Act templates for missing strings
#!/usr/bin/env perl
use strict;
use warnings;
use autodie;
use Test::More;
die "usage: $0 file1 file2\n" unless @ARGV == 2;
@alexm
alexm / act-install.sh
Last active August 29, 2015 14:06
Act Dev Installation Instructions (YMMV)
# Moved to https://github.com/alexm/Act-vagrant/blob/master/README.devel

Keybase proof

I hereby claim:

  • I am alexm on github.
  • I am alexmuntada (https://keybase.io/alexmuntada) on keybase.
  • I have a public key whose fingerprint is 50F6 D09B 8F6C 56CD 885B 5BCB 6A16 DCC9 DF78 FF53

To claim this, I am signing this object:

@alexm
alexm / check-auth-pubtkt-cookie.pl
Created May 5, 2014 11:21
Check the value of auth_pubtkt cookie against the public key.
@alexm
alexm / table_extract.pl
Last active December 28, 2015 23:09
HTML::TableExtract proof of concept
#!/usr/bin/env perl
use strict;
use warnings;
use HTML::TableExtract;
# Can parse bad formed HTML too!
my $html = "<table><tr><td>foo<td>bar<tr><td>42<td>3.14\n";
my $te = HTML::TableExtract->new();
@alexm
alexm / local_sub.pl
Created May 10, 2013 10:17
Proof of concept defining a sub with a localized global.
#!/usr/bin/perl
use warnings;
use strict;
local *p = sub {
print "[", ( join ",", @_ ), "]\n";
};
p(qw( foo bar ));

puppet camp barcelona

14 mar 2013

state of puppet (chris spence)

Puppet Enterprise provides:

  • GUI
  • orchestration (m-collective): live management thru GUI
@alexm
alexm / gist:4020386
Created November 5, 2012 21:16
lab4
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;
sub opt_postinstalls {
print "\nValid Postinstalls\n";
print "------------------\n\n";
list_postinstall();
print "\n";
exit 0
}
sub opt_distros {
print "\nValid Distributions\n";
@alexm
alexm / gist:1752738
Created February 6, 2012 15:42
Getopt::Long subs via hash
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010;
use Getopt::Long;
sub list_postinstall {
say "postinstall: <@_>";