Skip to content

Instantly share code, notes, and snippets.

View genehack's full-sized avatar
🏠
Working from home

John SJ Anderson genehack

🏠
Working from home
View GitHub Profile
package Foo;
use Moose;
use Carp;
sub BUILD { $Carp::CarpLevel=1; croak "CROAK!"; }
__PACKAGE__->meta->make_immutable;
package main;
use strict;
use warnings;
@genehack
genehack / gist:2932445
Created June 14, 2012 19:38
role-less throw
sub throw {
my $type = shift;
# could potentially do default namespacing here ( throw 'TypeContraint'
# throws 'Moose::Exception::TypeConstraint'; throw '+My::Exception' just
# throws My::Exception)
my %args;
Though much is taken, much abides; and though
We are not now that strength which in old days
Moved earth and heaven, that which we are, we are---
One equal temper of heroic hearts,
Made weak by time and fate, but strong in will
To strive, to seek, to find, and not to yield.
@genehack
genehack / ci.pl
Created July 9, 2012 19:31 — forked from jshirley/ci.pl
Automatically run tests when a file is modified
use Filesys::Notify::Simple;
use App::Prove;
use lib qw(lib);
my $watcher = Filesys::Notify::Simple->new([ './lib', './t/lib' ]);
my $prove = App::Prove->new;
while ( 1 ) {
$watcher->wait(sub {
@genehack
genehack / applescript
Created November 5, 2012 05:51
Applescript and shell code for Skotch.app
on check_file(filename)
tell application "Finder"
if exists filename then
return "yes"
else
return "no"
end if
end tell
end check_file
The University of Baltimore Location (Thumel Business Center on 11
West Mount Royal Avenue) is within walking distance of the Penn
Station in Baltimore. It's very close: http://goo.gl/maps/2qxpj
We're almost done with settling on our recommended hotel
accommodations. This is what we think the best bet is:
For 99$ a night (+ 15.5% taxes) you can stay at the Radisson Plaza
Lord Baltimore.
http://www.radisson.com/baltimore-hotel-md-21201/mdbalhar
package YMD::DB::Backup;
use Moose;
extends YMD::Base;
package YMD::DB::Backup::MySQL;
use Moose;
extends YMD::DB::Backup;
package YMD::DB::Backup::PostgreSQL;
use Moose;
package Base;
use Moose;
has 'base' => ( is => 'ro' , isa => 'Str' , default => 'base' );
package App;
use Moose;
extends 'Base';
has 'app' => ( is => 'ro' , isa => 'Str' , default => 'app' );
package App::DB;
@genehack
genehack / coc.txt
Last active December 24, 2015 23:19 — forked from perigrin/coc.txt
# The Standards of Conduct for YAPC::NA 2014
It appears the most common complaint about the Code of Conduct and the
ensuing events at YAPC::NA 2013 was about the meta-conversation about
the Code of Conduct at YAPC::NA 2013. As the lead organizer for 2014,
I would like to make some comments early so as to (hopefully) quell
this meta-conversation long before anyone has to make a decision to
attend the conference.
1) There will be a Standards of Conduct for 2014.