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
package SourceCarp; | |
use strict; | |
use warnings; | |
sub import | |
{ | |
my($class, %args) = @_; | |
$SIG{__DIE__} = sub { report(shift, 2); exit } if $args{fatal}; |
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
#include <sys/types.h> | |
#include <sys/time.h> | |
#include <sys/resource.h> | |
#include <signal.h> | |
/* written by Brian Redman (BER), sometime around 1986 | |
Disclaimer | |
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY |
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 warnings; | |
use lib 'lib'; | |
use SourceCarp fatal => 1, warnings => 1; | |
# throw warning | |
open my $fh, '<', '/no/file'; |
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
#!/web/usr/perl/bin/perl | |
use Getopt::Long; | |
GetOptions("i|image=s" => \$image, "q|quiet" => \$quiet); | |
if(!$image) { | |
print STDERR "Usage: $0 -i /path/to/image.jpg"; | |
exit 2; | |
} |
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/local/bin/ksh | |
RANDOM=$$ | |
if [ "$#" -ne "1" ]; then | |
echo "Usage: ${0##*/} PASSWORDLENTGH" | |
echo "\te.g. ${0##*/} 8" | |
exit 1 | |
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 DBI; | |
use Getopt::Std; | |
sub purge_logs { | |
my $db_ip = shift; | |
my $db_name = shift; |
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
function x(l, p) { | |
n = "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_"; | |
return index(n, substr(l, p + 1, 1)); | |
} | |
/^begin/ {} | |
/^[^be]/ { | |
len = x(\$0, 0); | |
for(i = 1; len > 0; i += 4) { | |
a = x(\$0, i); | |
b = x(\$0, i + 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
#include <time.h> | |
#define DAY (3600*24L) | |
char *month[] = { | |
"[Jj]an", | |
"[Ff]eb", | |
"[Mm]ar", | |
"[Aa]pr", | |
"[Mm]ay", |
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/sh | |
SENDQ_SIZE=65536 | |
_parse_netstat() | |
{ | |
netstat -p tcp -n | awk 'BEGIN { count = 0 } | |
{ | |
if($6 == "ESTABLISHED" && $3 >= threshold) | |
{ |
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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: PGP Key Server 0.9.6 | |
mQGiBEm+VN4RBACfYJ2U3THLZz/soW+0z18vsGdndRtf/i1FDPxr6gy53/VVOMPx | |
a1usmGriEtK0En7cwWlPQlr5SdXl/pUNKsIZkClkZnctWPeSM3mYj6zC3HcUyruV | |
rDNKUYLOYP8dCEtWu7IN0TQKH6xnqLljCFCQYK7lA4zRL7N1S/hExcBsbwCgzT6V | |
aI0NyeWVcAjs/+t8s4RJkC8D/jNpGb6IuRumkjYZ5GmElelckkmIQvGs2aiBkbE8 | |
IRtDS3VnSUWCN8rWJqqHuwg0QgaDVIHPz5KnMQfv7gbsoGilTx8mTgDEk1P62t4b | |
Y4YLKJhriaXyrSuQETPinqM3qYvEKysm5bkgiRNEcFHGUZznec2LGtFxPOGAacKn | |
EwcpA/9UIKdxxsPx8sHCU6L+Teq9DXpeRLRCy/1DJAHXs2BixAGX8kTvvdKnGjNR |