Skip to content

Instantly share code, notes, and snippets.

#include <time.h>
#define DAY (3600*24L)
char *month[] = {
"[Jj]an",
"[Ff]eb",
"[Mm]ar",
"[Aa]pr",
"[Mm]ay",
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);
@skreuzer
skreuzer / purge_bin_logs.pl
Created October 27, 2010 02:45
Purge MySQL Binary Logs
#!/usr/bin/perl
use strict;
use DBI;
use Getopt::Std;
sub purge_logs {
my $db_ip = shift;
my $db_name = shift;
#!/usr/local/bin/ksh
RANDOM=$$
if [ "$#" -ne "1" ]; then
echo "Usage: ${0##*/} PASSWORDLENTGH"
echo "\te.g. ${0##*/} 8"
exit 1
fi
#!/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;
}
#!/usr/bin/perl
use strict;
use warnings;
use lib 'lib';
use SourceCarp fatal => 1, warnings => 1;
# throw warning
open my $fh, '<', '/no/file';
#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
package SourceCarp;
use strict;
use warnings;
sub import
{
my($class, %args) = @_;
$SIG{__DIE__} = sub { report(shift, 2); exit } if $args{fatal};
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);
#!/usr/bin/perl
use strict;
use warnings;
use YAML::Tiny;
use Data::Dumper;
if(!@ARGV) {
print STDERR "Give me a file to parse.\n";