This file contains hidden or 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
# $OpenBSD: pf.conf,v 1.50 2011/04/28 00:19:42 mikeb Exp $ | |
# | |
# See pf.conf(5) for syntax and examples. | |
# Remember to set net.inet.ip.forwarding=1 and/or net.inet6.ip6.forwarding=1 | |
# in /etc/sysctl.conf if packets are to be forwarded between interfaces. | |
set skip on lo | |
# filter rules and anchor for ftp-proxy(8) | |
#anchor "ftp-proxy/*" |
This file contains hidden or 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 -s | |
use XML::Simple; | |
my @files = grep { /\.xml$/ and -f $_ } @ARGV; | |
for my $filename ( @files ){ | |
my $xml = XML::Simple->new; | |
my $data = $xml->XMLin( $filename ); |
This file contains hidden or 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
#!/bin/bash | |
FILENAME="" | |
if [ -e $1 ]; then | |
FILENAME=$1 | |
fi | |
if [ ! -z $FILENAME ]; then | |
FILENAME=/dev/stdout | |
fi |
This file contains hidden or 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 | |
use strict; | |
use Email::ARF::Report; | |
my $message = do { local $/; <>; }; | |
my $report = Email::ARF::Report->new( $message ); | |
use Data::Dumper; |
This file contains hidden or 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
#!/bin/bash | |
# | |
# | |
function die | |
{ | |
echo "$1" | |
exit 1 | |
} |
This file contains hidden or 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 | |
use strict; | |
#my $regex = 'http://slowpoke.internal.tucows.com/~pblair/perl/Tucows-OPS-Cloud-(\d+(?:\.\d+)).tar.gz'; | |
my $WGET = `which wget` || die 'Must install either wget for this to work'; | |
chomp $WGET; | |
die 'wget must be installed and in the PATH' if $WGET =~ /^\s*$/; |
This file contains hidden or 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 | |
use strict; | |
package ZBX::SERVER; | |
use JSON; | |
use IO::Socket; | |
use Net::Domain 'hostfqdn'; | |
use constant ZBX_SERVER_PORT => 10051; |
This file contains hidden or 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 | |
use strict; | |
use Data::Dumper; | |
use JSON; | |
sub best_candidate { | |
my ($json_obj) = @_; | |
for( @{$json_obj->{results}} ){ | |
next if $_->{types}->[0] eq 'route'; |
This file contains hidden or 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 Must::Run::As; | |
sub import { | |
my ($package,$user) = @_; | |
unless( $user ){ | |
$user = 'mail'; | |
} | |
die "Must run as $user\n" unless ( getpwuid( $< ) eq $user ); |
This file contains hidden or 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 | |
use strict; | |
package Version; | |
use overload | |
'""' => "str", | |
'cmp' => "compare", | |
'<=>' => "compare", | |
; |