Skip to content

Instantly share code, notes, and snippets.

use common::sense;
package Hoge {
use Devel::GlobalDestruction;
sub new {
my($class, $str) = @_;
bless \$str, $class;
}
sub DESTROY {
say '-----------------------: ' . ${ $_[0] };
// ==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() {
use strict;
use warnings;
use Plack::Request;
use Plack::Response;
sub {
my $req = Plack::Request->new(shift);
my $path = $req->path;
use strict;
use warnings;
no strict 'refs';
*{'even?'} = sub {
return !($_[0] % 2);
};
for my $i (1..10) {
if (&{'even?'}($i)) {
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
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,
* 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があります。
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 {
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);
@yappo
yappo / gist:838340
Created February 22, 2011 07:41 — forked from mattn/gist:838338
(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()