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
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
#!/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
#!/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
#!/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/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
#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
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
int latchPin = 8; | |
int clockPin = 12; | |
int dataPin = 11; | |
int number[] = {63, 6, 91, 79, 102, 109, 124, 7, 127, 103}; | |
void setup() { | |
//set pins to output so you can control the shift register | |
pinMode(latchPin, OUTPUT); | |
pinMode(clockPin, OUTPUT); |
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 YAML::Tiny; | |
use Data::Dumper; | |
if(!@ARGV) { | |
print STDERR "Give me a file to parse.\n"; |