This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub setup : Chained('/') PathPart('') CaptureArgs(0) { | |
my ( $self, $c ) = @_; | |
my $client = $c->model('Facebook'); | |
my $app_user = $client->users->is_app_user; | |
$app_user = 0 if ref $app_user eq 'HASH'; | |
if ( $app_user ) { | |
$c->stash->{is_app_user} = 1; | |
$c->stash->{fb_user} = $c->model('Facebook')->canvas->get_user($c->req); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Start a Plack daemon. | |
PATH=/bin:/usr/bin:/sbin:/usr/sbin:$HOME/perl5/bin | |
DAEMON="$HOME/perl5/bin/plackup" | |
NAME="AppName" | |
CWD=`pwd` | |
# Defaults | |
RUN="no" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package MyApp::View::TT; | |
use strict; | |
use parent 'Catalyst::View::TT'; | |
use Scalar::Util qw(blessed); | |
use DateTime::Format::DateParse; | |
__PACKAGE__->config( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package BackOffice::Controller::Combo; | |
use parent 'Catalyst::Controller'; | |
use Try::Tiny; | |
use MIME::Types; | |
__PACKAGE__->config( | |
'mime_types_obj' => MIME::Types->new( only_complete => 1 ), | |
'mime_types' => { }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Foo; | |
use Moose; | |
has 'expensive_attribute' => ( | |
is => 'rw', | |
isa => 'Str', | |
lazy_build => 1 | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package My::Base::REST; | |
use Moose; | |
BEGIN { extends 'Catalyst::Controller::REST'; } | |
use CGI::Expand qw/expand_hash/; | |
__PACKAGE__->config( | |
'default' => 'text/html', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- XMLRPCServer.pm.bck 2009-11-25 16:18:36.000000000 -0800 | |
+++ XMLRPCServer.pm 2009-11-25 17:03:38.000000000 -0800 | |
@@ -814,7 +814,9 @@ | |
# not yet supported: metaWeblog.getTemplate, metaWeblog.setTemplate | |
'mt.getCategoryList', 'mt.setPostCategories', 'mt.getPostCategories', | |
'mt.getTrackbackPings', 'mt.supportedTextFilters', | |
- 'mt.getRecentPostTitles', 'mt.publishPost', 'mt.getTagList' ]; | |
+ 'mt.getRecentPostTitles', 'mt.publishPost', 'mt.getTagList', | |
+ 'mt.rebuildBlog' | |
+ ]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Catalyst::TraitFor::Model::DBIC::Schema::MogileFS; | |
our $VERSION = '0.01'; | |
use namespace::autoclean; | |
use Moose::Role; | |
use Carp::Clan '^Catalyst::Model::DBIC::Schema'; | |
use MogileFS::Client; | |
with 'Catalyst::Component::InstancePerContext'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Cross browser placeholder support, simply structure inputs: | |
* <input type="text" placeholder="Your placeholder text"> | |
* And, of course, style: | |
* input.placeholder { color: #ccc; } | |
* | |
* Clears on submit | |
* Will get confused if the user enters placeholder text at the value. | |
*/ | |
YUI().use("node", function(Y) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
require("./yui-builder").build({ | |
filter: 'debug', | |
gallery: 'gallery-2010.08.25-19-45', | |
version: '3.2.0', | |
require: [ | |
'event-delegate', | |
'io', | |
'widget', |