Skip to content

Instantly share code, notes, and snippets.

View sbertrang's full-sized avatar

Simon Bertrang sbertrang

View GitHub Profile
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
use File::Temp qw( tempfile );
use Mojo::UserAgent;
use Sereal qw( decode_sereal encode_sereal );
@sbertrang
sbertrang / utf8num.pl
Last active August 29, 2015 13:56
\d matches more than just digits
#!/usr/bin/perl
use strict;
use warnings;
use open qw( :std :utf8 );
# http://www.fileformat.info/info/unicode/char/06f3/index.htm
# Unicode Character 'EXTENDED ARABIC-INDIC DIGIT THREE' (U+06F3)
printf( STDOUT "%s: %s: * 1024 = %d\n", m!\A\d+\z! ? "num" : "nonum", $_, $_ * 1024 )
@sbertrang
sbertrang / Rexfile
Created February 15, 2014 18:32
rex bootstrap example
# Tell when and where things go wrong
use strict;
use warnings;
# Support for SSH agent
set connection => "OpenSSH";
my $server = "example.com";
my $path = "/source/rex-bootstrap";