Skip to content

Instantly share code, notes, and snippets.

View gphat's full-sized avatar

Cory G Watson gphat

View GitHub Profile
gphat@Corys-iMac ~/src/storm-starter (master) $ storm jar storm-starter-0.0.1-SNAPSHOT.jar storm.starter.WordCountTopology asshole.txt
Running: export STORM_JAR=storm-starter-0.0.1-SNAPSHOT.jar; java -client -Djava.library.path=/usr/local/lib:/opt/local/lib:/usr/lib -cp /Users/gphat/src/storm/storm-0.5.4-SNAPSHOT.jar:/Users/gphat/src/storm/lib/clj-time-0.3.0.jar:/Users/gphat/src/storm/lib/clojure-1.2.0.jar:/Users/gphat/src/storm/lib/clojure-contrib-1.2.0.jar:/Users/gphat/src/storm/lib/clout-0.4.1.jar:/Users/gphat/src/storm/lib/commons-cli-1.2.jar:/Users/gphat/src/storm/lib/commons-codec-1.3.jar:/Users/gphat/src/storm/lib/commons-el-1.0.jar:/Users/gphat/src/storm/lib/commons-exec-1.1.jar:/Users/gphat/src/storm/lib/commons-fileupload-1.2.1.jar:/Users/gphat/src/storm/lib/commons-httpclient-3.0.1.jar:/Users/gphat/src/storm/lib/commons-io-1.4.jar:/Users/gphat/src/storm/lib/commons-lang-2.4.jar:/Users/gphat/src/storm/lib/commons-logging-1.0.4.jar:/Users/gphat/src/storm/lib/commons-logging-api-1.0.4.jar:/Users/gph
my $verifier = Data::Verifier->new(
profile => {
email => {
post_check => sub {
my $r = shift;
my $status = $r->get_value('status');
if(defined($status) && $status eq 'Publish now') {
return 0 unless defined($r->get_value('not_before_date_str');
}
return 1;
@gphat
gphat / kafka.pl
Created January 12, 2011 15:37 — forked from jshirley/kafka.pl
package Kafka::Client;
use Moose;
use Digest::CRC qw(crc32);
use IO::Socket;
my $PRODUCE_REQUEST_ID = 0;
has 'host' => (
is => 'ro',
package Foo;
use strict;
use warnings;
sub new {
my $class = shift;
my $self = {};
$self->{"name"} = undef;