Skip to content

Instantly share code, notes, and snippets.

View typester's full-sized avatar
😇

Daisuke Murase typester

😇
View GitHub Profile
package Im::Test;
use Ark 'Test';
use File::Temp qw/tempdir/;
use Im::Models;
sub import {
my ($class, $app, %options) = @_;
$app ||= 'Im';
(defun appkido-lookup (word)
"search appkido"
(interactive
(let* ((cur (substring-no-properties (or (thing-at-point 'word) "")))
(val (read-string (if (string-match "^[0-9A-Za-z_]+$" cur)
(format "AppKido Lookup (default %s): " cur)
"AppKido Lookup: ") nil nil cur)))
(list val)))
(do-applescript (format "tell application \"AppKiDo-for-iPhone\"
activate
#!/usr/bin/env perl
use strict;
use warnings;
use FindBin::libs;
use HTTP::Request::Common;
use AnyEvent::HTTP;
use AnyEvent::ReverseHTTP;
package AnyEvent::ReverseHTTP;
use strict;
use 5.008_001;
our $VERSION = '0.01';
use Carp;
use AnyEvent::Util;
use AnyEvent::HTTP;
use HTTP::Request;
package AnyEvent::ReverseHTTP;
use strict;
use 5.008_001;
our $VERSION = '0.01';
use Carp;
use AnyEvent::Util;
use AnyEvent::HTTP;
use HTTP::Request;
diff --git a/lib/Text/MicroTemplate.pm b/lib/Text/MicroTemplate.pm
index 2f00f51..bbfdd62 100644
--- a/lib/Text/MicroTemplate.pm
+++ b/lib/Text/MicroTemplate.pm
@@ -393,6 +393,8 @@ package Text::MicroTemplate::EncodedString;
use strict;
use warnings;
+use overload q{""} => sub { shift->as_string }, fallback => 1;
+
diff --git a/lib/AnyEvent/APNS.pm b/lib/AnyEvent/APNS.pm
index 5a5d20c..6ca18b4 100644
--- a/lib/AnyEvent/APNS.pm
+++ b/lib/AnyEvent/APNS.pm
@@ -59,11 +59,6 @@ has on_connect => (
no Any::Moose;
-sub BUILD {
- my ($self) = @_;
Rate mtf tenjin mtf_reuse tenjin_reuse
mtf 426/s -- -69% -70% -83%
tenjin 1351/s 218% -- -5% -45%
mtf_reuse 1429/s 236% 6% -- -41%
tenjin_reuse 2439/s 473% 80% 71% --
use EV;
use AnyEvent;
AnyEvent->condvar->recv;
use Test::Base;
use AnyEvent::JSONRPC::Lite;
my $cv = AnyEvent->condvar;
# server
my $server = AnyEvent::JSONRPC::Lite->new_server( port => 4423 );
$server->reg_cb(
echo => sub {