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
--- bgcanvas.js 2012-06-03 21:30:12.000000000 +0900 | |
+++ bgcanvas2.js 2012-06-05 01:46:19.000000000 +0900 | |
@@ -154,7 +154,7 @@ | |
gradblur.addColorStop(0.9, edgecolor3); | |
gradblur.addColorStop(1.0, edgecolor4); | |
ctx.fillStyle = gradblur; | |
- ctx.arc(this.x, this.y, this.r, 0, Math.PI * 2, true); | |
+ ctx.arc(this.x, this.y, this.r, 0, 6.283185307179586, true); | |
ctx.closePath(); | |
ctx.fill(); |
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
var JSX = {}; | |
(function () { | |
/** | |
* copies the implementations from source interface to target | |
*/ | |
function $__jsx_merge_interface(target, source) { | |
for (var k in source.prototype) | |
if (source.prototype.hasOwnProperty(k)) | |
target.prototype[k] = source.prototype[k]; |
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
#!/usr/bin/env tora | |
/* string section */ | |
say("# string"); | |
my $str = "Hello, Tora"; | |
say($str, $str.length); | |
/* array section */ | |
say("# array"); |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Data::Dumper; | |
use Socket; | |
use IO::Handle; | |
use autodie; | |
use 5.12.1; | |
my $port = 5001; |
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
#!/bin/zsh | |
if [ `which perl` = "/usr/bin/perl" ]; then | |
echo -n -e "\e[1;31mUSING SYSTEM PERL OK? [y/n]\e[m: " | |
read ANSWER | |
if [ "$ANSWER" != "y" ]; then | |
exit 255 | |
fi | |
PERL_CPANM_OPT="$PERL_CPANM_OPT --sudo" | |
fi |
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 5.14.0; | |
package Class::Acessor::Mouse { | |
use Mouse; | |
sub import { | |
my ($class, %args) = @_; | |
my $meta = Mouse->init_meta(for_class => scalar caller); | |
for my $type (qw(rw ro wo)) { | |
next unless ref $args{$type} eq 'ARRAY'; | |
$class->_add_attribute($meta, $type, $args{$type}); |
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 Test::More; | |
use String::Diff; | |
use Data::Dumper; | |
use Term::ANSIColor qw(color); | |
sub is_deeeeeeeeeply { | |
my ($got, $expects, $desc) = @_; | |
local $Test::Builder::Level = $Test::Builder::Level + 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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use FindBin; | |
use lib "$FindBin::Bin/extlib/lib/perl5"; | |
use lib "$FindBin::Bin/lib"; | |
use Isucon; | |
use Cache::Memcached::Fast; |
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 Benchmark qw(cmpthese); | |
my $slash = '/foo'; | |
my $mid = '?foo=bar&hoge=fuga'; | |
my $long = 'foo=bar&hoge=fuga'x100; | |
print "perl: $^V¥n"; | |
print "OS : $^O¥n"; |
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
package S::Exception; | |
use strict; | |
use warnings; | |
use parent qw(Class::Accessor::Fast); | |
use overload (q|""| => \&to_string); | |
use Carp qw(croak); | |
our $VERSION = '0.01'; | |
__PACKAGE__->mk_accessors(qw/message code/); |