Skip to content

Instantly share code, notes, and snippets.

View JDorpinghaus's full-sized avatar

Jacob Dorpinghaus JDorpinghaus

View GitHub Profile
{:event-metadata {:event-date nil,
:lab-name "Unknown",
:grower nil,
:farm nil,
:field nil,
:modus-path nil,
:event-id nil,
:source "samples"},
:event-samples [{:sample-number "NA",
:geometry {:type "Polygon",
$r->websocket('/news')->to(cb => sub {
my $self = shift;
$self->on(message => sub {
my ($self, $msg) = @_;
$msg = decode_json($msg);
if ($msg->{type} eq 'ready'){
my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime();
my $headline = 'Bingo at 5 today!';
my $description = 'This message is really long and demonstrates the scrolling ability of the banner text. Go to Bingo at 5PM tonight in the cafeteria! Dinner is at 7PM tonight, meatloaf will be served.';
my $expiration = 30;
@JDorpinghaus
JDorpinghaus / gist:2c47ea7b63a8b6e668d6
Created July 1, 2015 19:06
Mojolicious jason_has slash example
use Mojo::Base;
use FindBin;
BEGIN { unshift @INC, "$FindBin::Bin/../../lib" }
use Test::More;
use Test::Mojo;
my $t = Test::Mojo->new('Ama');