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
@genehack
genehack / App::Booklist::CLI::Command::add_tag.pm
Created April 13, 2010 01:04
A MooseX::App::Cmd command class written with MooseX::Declare
use MooseX::Declare;
class App::Booklist::CLI::Command::add_tag extends App::Booklist::CLI::BASE {
use 5.010;
has name => (
isa => 'Str' , is => 'rw' ,
documentation => 'Tag name' ,
traits => [ qw(Getopt)] ,
cmd_aliases => 'n' ,
@genehack
genehack / App::Booklist::CLI::BASE.pm
Created April 13, 2010 01:28
MooseX::App::Cmd + MooseX::SimpleConfig
package App::Booklist::CLI::BASE;
use Moose;
use namespace::autoclean;
use 5.010;
extends 'MooseX::App::Cmd::Command';
with 'MooseX::SimpleConfig';
has file => (
isa => 'Str' ,
is => 'rw' ,
#! /opt/perl/bin/perl
### HEAVILY BASED ON CODE GANKED FROM
### http://search.cpan.org/~simonw/Net-Social-Service-Facebook-0.1/lib/Net/Social/Service/Facebook.pm
use strict;
use warnings;
use 5.010;
use FindBin;
my $client = WWW::Facebook::API->new(
api_key => API_KEY ,
secret => SESSION_SECRET ,
session_key => SESSION_KEY ,
);
$client->stream->set( "msg here" );
;;; TOGGLE-BOL
(defun jsja/bol-toggle ()
"Toggle between beginning of indent and beginning of line"
(interactive)
(let ((jsja-bol-command-name "jsja/bol-toggle"))
(setq this-command jsja-bol-command-name)
(cond ((equal (point) (point-at-bol)) (back-to-indentation))
((equal last-command jsja-bol-command-name) (move-beginning-of-line nil))
(t (back-to-indentation)))))
@genehack
genehack / macros.tt
Created April 19, 2012 19:34 — forked from jshirley/Guide.pm
Our macro.tt file for handling inputs consistently. Requires YUI3 grids to look proper.
[%~
# Some illustrious documentation to get you started:
#
# The macros defined are to generate markup to save people from copy and pasting
# markup. They copy and paste hashes instead, which should be safer (in theory)
#
# The macros for forms are:
# * text_field - A text field
# * textarea_field - A textarea field
# * password_field - A password field, text_field({ type => 'password', ... })
=head1 METHODS
=headd2 valid_values
Checks the result of the C<success> method. If it returns false, returns an
empty hashref. If it returns true, returns the result of calling the the
C<valid_values> method on each of the results in this verifier. Returns them
as a hash of hashes, keyed by result name.
@genehack
genehack / kitten.psgi
Created May 18, 2012 21:33
Smallest possible Cat app that is also a quine? (after http://paste.scsys.co.uk/198326 by t0m aka @bobtfish)
use base 'Catalyst', 'MooseX::MethodAttributes::Inheritable';
use File::Slurp;
sub dispatch { my $b = read_file(__FILE__);shift()->res->body($b) }
__PACKAGE__->setup;
__PACKAGE__->psgi_app;

Some concerns about the future of YAPC::NA were recently brought to my attention on IRC. The ensuing discussion revealed some people had valid concerns about the future of Perl conferences and particularly concerning to me, YAPC::NA.

Most of these concerns stem from a lack of supervision of the various organizing groups, and a lack of overall policy direction from the TPF level. Policy decisions (such as, for example, Codes Of Conduct) are left to the individual organizers or organizing groups, who are already overwhelmed with organizing their conference, let alone dealing with all aspects of gender politics in the modern American IT industry. Additionally, I've personally witnessed the inefficient transfer of institutional knowledge when organizing YAPC::NA 2011. I think that with an improved retention of knowledge from one year to another, YAPC::NA conferences could be organized much more effectively.

package Foo;
use Moose;
use Carp;
sub BUILD { croak "CROAK!" }
__PACKAGE__->meta->make_immutable;
package main;
use strict;
use warnings;