Skip to content

Instantly share code, notes, and snippets.

View jshirley's full-sized avatar

Jay Shirley jshirley

View GitHub Profile
YUI().use("widget", "overlay", "node", "io-queue", function(Y) {
var overlay = new Y.Overlay({
// width: "10em",
// height: "10em",
headerContent: "",
bodyContent: "This will be replaced",
zIndex: 500,
visible: false
});
overlay.render();
Index: lib/Catalyst/Engine/HTTP/Prefork.pm
===================================================================
--- lib/Catalyst/Engine/HTTP/Prefork.pm (revision 10421)
+++ lib/Catalyst/Engine/HTTP/Prefork.pm (working copy)
@@ -45,6 +45,9 @@
max_servers => $options->{max_servers} || 50,
max_requests => $options->{max_requests} || 1000,
leave_children_open_on_hup => $options->{restart_graceful} || 0,
+
+ defined $options->{pidfile} ?
my $app = App::Manager->new_with_traits(
# I'm managing Catalyst applications running under Lighttpd
traits => [ 'Lighttpd', 'Catalyst' ],
applications => [
{
name => 'MyApp',
server => 'Catalyst',
# Custom to App::Manager::Catalyst:
engine => 'HTTP::Prefork',
Index: lib/Catalyst/Engine/HTTP/Prefork.pm
===================================================================
--- lib/Catalyst/Engine/HTTP/Prefork.pm (revision 10421)
+++ lib/Catalyst/Engine/HTTP/Prefork.pm (working copy)
@@ -33,7 +33,15 @@
# Restore ARGV since Getopt has eaten it and Net::Server needs it
# for proper restart support
@ARGV = @{ $options->{argv} };
-
+
YUI().use("widget", "overlay", "node", "io-form", function(Y) {
var overlay = new Y.Overlay({
// width: "10em",
// height: "10em",
headerContent: "",
bodyContent: "This will be replaced",
zIndex: 500,
visible: false
});
overlay.render();
Y.on('delegate', function(e) {
var tgt = e.target;
e.halt();
var uri = tgt.get('href');
var cfg = {
headers: { 'Content-Type': 'text/html; charset=utf-8' }
};
if ( tgt.hasClass('rest-delete') )
cfg.method = 'DELETE';
else if ( tgt.hasClass('rest-post') )
package MyApp::Model::Facebook;
use warnings;
use strict;
use parent 'Catalyst::Model::Adaptor';
__PACKAGE__->config(
class => 'WWW::Facebook::API',
args => {
YUI({
combine: false,
// filter: 'debug',
base: '/static/scripts/yui3/build/'
}).use(
"widget", "overlay", "node", "io-form", "event", "event-simulate",
function(Y) {
var overlay = new Y.Overlay({
package ClassA;
use Moose;
with 'Role::A';
1;
- name: "MyApp"
server_class: "FCGI::Engine::Manager::Server::HTTP::Prefork"
scriptname: "script/myapp_prefork.pl"
nproc: 3
pidfile: "run/myapp.pid"
socket: ""