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 warnings; | |
use strict; | |
my $file = $ARGV[0]; | |
if ( !defined($file) ) { | |
die 'must specify a file containing equery depgraph output'; | |
} |
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 | |
use warnings; | |
use strict; | |
my %HoA = ( | |
'nouns' => [ 'girl', 'boy', 'dog', 'cat' ], | |
'verbs' => [ 'ran', 'ate', 'spoke', 'jumped'], | |
); |
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 | |
package YourAddonModule; | |
use warnings; | |
use strict; | |
sub describe { | |
my $create_addon_hook = | |
{ |
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 | |
my @accounts = (); | |
chomp( my $num_accts_to_generate = <STDIN> ); | |
# generate serveral accounts | |
foreach ( 1 .. $num_accts_to_generate ) { | |
my $cp_acct = generate_account(); | |
print( "generated account $cp_acct->{'username'} with passsword $cp_acct->{'password'}","\n"); |
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
export TESTS=/opt/linux_tests | |
export PROJECT=$TESTS/projects | |
export PRODUCTION=$TESTS/production | |
export TS=/opt/testsuite | |
function backup { cp $1 ~/.backup/ ; } | |
function tidy { backup $1 ; perltidy $1 ; mv "$1.tdy" $1 ; } | |
function gitup { cd $TS ; git pull ; cd - ; cd $TESTS ; git pull ; cd - ; } |
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 warnings; | |
use strict; | |
sub foo { | |
my $file_name = 'foo.txt'; | |
my @lines = ( 'a', 'b', 'c', 'd' ); | |
write_to_file($file_name, @lines); | |
} |
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 warnings; | |
use strict; | |
my $file = $ARGV[0]; | |
my $count = 0; | |
open my $FH, $file |
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
int dkim_exim_query_dns_txt(char *name, char *answer) { | |
dns_answer dnsa; | |
dns_scan dnss; | |
dns_record *rr; | |
if (dns_lookup(&dnsa, (uschar *)name, T_TXT, NULL) != DNS_SUCCEED) return PDKIM_FAIL; | |
/* Search for TXT record */ | |
for (rr = dns_next_rr(&dnsa, &dnss, RESET_ANSWERS); | |
rr != NULL; |
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
<?php | |
include("../xmlapi.php"); | |
$ip = '__IP__'; | |
$root_hash = '__ROOT_HASH__'; | |
$xmlapi = new xmlapi($ip); | |
$xmlapi->hash_auth("root",$root_hash); | |
$xmlapi->set_output('json'); |