Skip to content

Instantly share code, notes, and snippets.

@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()
@yappo
yappo / 01_base.t
Created November 10, 2010 12:07 — forked from monjudoh/01_base.t
use JSTAPd::Suite;
sub tests { 11 }
sub include {
(
# /Users/monjudoh/Sites/callendar-demo/js/config-require.js
'/js/config-require.js',
'/js/allplugins-require.js',
);
}
@yappo
yappo / gist:308576
Created February 19, 2010 09:17 — forked from miyagawa/gist:308569
#!/usr/bin/perl
use strict;
use File::Basename qw(basename);
use File::Temp 'tempfile';
sub get($);
sub mirror($$);
sub untar;
if (eval { require LWP::Simple }) {
@yappo
yappo / hoge.pl
Created December 9, 2009 02:43 — forked from http-engine/hoge.pl
my $s1 = "\x3d"; # =
print $s1 . "\n";
my $text = 'hogehogeho\x3dhogehoge';
$text =~ s/\\x([0-9a-z]{2})/pack 'H2', $1 /ge;
print "$text\n";
@yappo
yappo / gist:219253
Created October 27, 2009 02:43 — forked from gfx/gist:218491
雲一つ無いいい天気!
@yappo
yappo / gist:188424
Created September 17, 2009 09:32 — forked from mattn/gist:188422
mattn: さいたまさいたまー?
いえ、ちがいます
すいません、どうやら人違いでした。
@yappo
yappo / gist:188421
Created September 17, 2009 09:28 — forked from mattn/gist:188420
mattn: さいたまさいたまー?
@yappo
yappo / gist:176111
Created August 27, 2009 05:51 — forked from imakado/gist:176075
(defun perl-insert-package ()
(interactive)
(require 'perl-completion)
(cond
((null buffer-file-truename) (error "no buffer-file-truename"))
(t
(let* ((s (replace-regexp-in-string
(rx-to-string `(and bol ,(plcmp--get-lib-path) (? "/")))
""
(expand-file-name buffer-file-truename)))
package HTTP::Engine::Middleware::Profile::NYTProf;
use Any::Moose;
use Time::HiRes;
with 'HTTP::Engine::Middleware::Profile::Role';
BEGIN {
# referred to L<Devel::NYTProf::Apache>
if (!$ENV{NYTPROF}) {
$ENV{NYTPROF} = "file=/tmp/nytprof.$$.out";
@yappo
yappo / scale.pl
Created April 23, 2009 04:10 — forked from tokuhirom/scale.pl
use strict;
use warnings;
use autodie;
use Imager;
use GD;
use Image::Magick;
print "# Imager $Imager::VERSION\n";
print "# GD $GD::VERSION\n";