This file contains hidden or 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
use Plack::Builder; | |
my $old_app = sub { | |
return sub { | |
my $respond = shift; | |
$respond->([200, [], ['success']]); | |
} | |
}; | |
sub delayed_auth { |
This file contains hidden or 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
arthur:Downloads lee$ curl -L http://cpanmin.us | perl - --self-upgrade | |
% Total % Received % Xferd Average Speed Time Time Time Current | |
Dload Upload Total Spent Left Speed | |
100 167k 100 167k 0 0 152k 0 0:00:01 0:00:01 --:--:-- 152k | |
Can't locate object method "new" via package "Module::Metadata::Version" (perhaps you forgot to load "Module::Metadata::Version"?) at /loader/0x10083b350/App/cpanminus/script.pm line 950. |
This file contains hidden or 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
get "/{tweet:[0-9]+}" => sub { | |
my ($req, $res) = @_; | |
my $id = $req->captures->{tweet}; | |
$ua->get("statuses/show/$id", sub { | |
my ($hdr, $tweet, $reason) = @_; | |
$res->send("<pre>".Dumper($tweet)."</pre>"); | |
}); | |
}; |
This file contains hidden or 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 invite { | |
my ($self, $cl, $msg) = @_; | |
my (undef, $from, $channel) = @{$msg->{params}}; | |
utf8::decode($_) for ($from, $channel); | |
$self->broadcast({ | |
type => "action", | |
event => "announce", | |
body => "$from has invited you to $channel", |
This file contains hidden or 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
<?doctype html> | |
<html> | |
<head> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/prototype/1.6.0.2/prototype.js"></script> | |
<script type="text/javascript"> | |
document.observe("dom:loaded", function() { | |
$('output').insert($('foo').serialize()); | |
}); | |
</script> | |
</head> |
This file contains hidden or 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
map {$_->{channels} = [map {split ",", $_} @{$_->{channels}}]} map {values %{$_->config->servers}} $::catlady->all_cats; |
This file contains hidden or 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
if (window.fluid) { | |
window.fluid.showGrowlNotification({ | |
title: subject, | |
description: message.body.unescapeHTML(), | |
priority: 1, | |
sticky: false, | |
identifier: message.msgid | |
}); | |
} |
This file contains hidden or 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
--mimepart_4d77e7d9cb66b_2f87407d0b0275930 | |
Content-Type: text/plain; charset=utf-8 | |
Content-Transfer-Encoding: Quoted-printable | |
Content-Disposition: inline | |
<%=3D render(:file =3D> "user_mailer/password_changed.text.plain.haml.html"= | |
).to_plain_text %> | |
This file contains hidden or 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
this.messages.select('div.msg').each(function(msg){ | |
msg.setStyle({borderWidth: "2px"}); | |
msg.setStyle({borderWidth: "1px"}); | |
}); |
This file contains hidden or 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
my $pages = join "|", qw/chrome commands development faq features fluid guide | |
interest screenshots ssb status success thanks/; | |
get qr{^/(?<page>$pages)/?$} => sub { | |
my $captures = captures; | |
template $captures->{page}; | |
}; |