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 common::sense; | |
| package Hoge { | |
| use Devel::GlobalDestruction; | |
| sub new { | |
| my($class, $str) = @_; | |
| bless \$str, $class; | |
| } | |
| sub DESTROY { | |
| say '-----------------------: ' . ${ $_[0] }; |
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
| // ==UserScript== | |
| // @name Google+ notification count into browser title bar | |
| // @namespace http://coderepos.org/share/wiki/Committers/yappo | |
| // @include https://plus.google.com/* | |
| // ==/UserScript== | |
| (function() { | |
| var w = (typeof unsafeWindow == 'undefined') ? window : unsafeWindow; | |
| var old_count = ""; | |
| setInterval(function() { |
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 strict; | |
| use warnings; | |
| use Plack::Request; | |
| use Plack::Response; | |
| sub { | |
| my $req = Plack::Request->new(shift); | |
| my $path = $req->path; |
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 strict; | |
| use warnings; | |
| no strict 'refs'; | |
| *{'even?'} = sub { | |
| return !($_[0] % 2); | |
| }; | |
| for my $i (1..10) { | |
| if (&{'even?'}($i)) { |
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 common::sense; | |
| use Net::Server::Coro; | |
| use Net::Server::Proto::Coro; | |
| say $^V; | |
| say $Net::Server::Coro::VERSION; | |
| open my $fh, '<', \'hoge'; | |
| my $c = Net::Server::Proto::Coro->new_from_fh($fh); | |
| __END__ | |
| v5.13.7 |
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 strict; | |
| use warnings; | |
| use AE; | |
| use AnyEvent::MPRPC::Server; | |
| use Net::APNS::Persistent; | |
| use Time::Piece; | |
| my $apns = Net::APNS::Persistent->new({ | |
| # sandbox => 1, |
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
| * A history of search software in japan | |
| 今回紹介するGroongaは日本の検索ライブラリの中で新しいものです。 | |
| Groongaを紹介する前に、日本の検索事情について少しお話します。 | |
| Today I'm going to talk about a new search library from Japan. | |
| First, I'll tell you something about how search works in Japan. | |
| ** use grep | |
| 文章を簡単に検索する方法としてgrepがあります。 |
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 strict; | |
| use warnings; | |
| use Data::Dumper; | |
| use JSON::XS; | |
| use Devel::Peek; | |
| print "Perl $^V\n"; | |
| print "JSON::XS: ", JSON::XS->VERSION, "\n"; | |
| sub q4m { |
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 strict; | |
| use warnings; | |
| use Data::Dumper; | |
| use JSON::XS; | |
| print "Perl $^V\n"; | |
| print "JSON::XS: ", JSON::XS->VERSION, "\n"; | |
| my $json = '{"foo":"bar"}'; | |
| print Dumper decode_json($json); |
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
| (function(ns) { | |
| var r = typeof window != 'undefined' ? window : this; | |
| [].forEach.call(ns.split("."), function(v) { r = r[v] = {} }) | |
| })("mattn.hasegawayosuke.tokuhirom") | |
| mattn.hasegawayosuke.tokuhirom.Miyagawa = function() { | |
| alert('それPla') | |
| } | |
| mattn.hasegawayosuke.tokuhirom.Miyagawa() |