Skip to content

Instantly share code, notes, and snippets.

View karupanerura's full-sized avatar
👷‍♂️
Please assign issue to me. but, I may be slow to respond.

karupanerura karupanerura

👷‍♂️
Please assign issue to me. but, I may be slow to respond.
View GitHub Profile
@karupanerura
karupanerura / bench_arrayref.pl
Created October 16, 2018 06:05 — forked from kfly8/bench_arrayref.pl
Benchmark JSON::Encode
use strict;
use warnings;
use JSON::XS qw(encode_json);
use Benchmark qw(cmpthese);
my $obj = [ map {
+{
name => 'foo',
age => 123,
@karupanerura
karupanerura / aaa.pl
Last active July 19, 2016 07:35 — forked from mattn/aaa.pl
use strict;
use warnings;
use Encode;
use Encode::Locale;
use LWP::Protocol;
use URI;
sub dump_env { join ", ", map { "$_: ".($ENV{$_}||'(undef)') } qw/REQUEST_METHOD HTTP_PROXY CGI_HTTP_PROXY/ }
@karupanerura
karupanerura / MainActivity.java
Created April 30, 2015 08:59 — forked from yanzm/マッチョじゃないActivity
マッチョじゃないActivityサンプル
package net.yanzm.profileapplication;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.app.Activity;
import android.app.FragmentManager;
import android.content.Intent;
import android.net.Uri;
@karupanerura
karupanerura / MainActivity.java
Created April 30, 2015 08:56 — forked from yanzm/マッチョなActivityサンプル
マッチョなActivityサンプル
package net.yanzm.profileapplication;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
use strict;
use warnings;
my $re_paren;
$re_paren = qr {
\(
(?:
(?>[^\(\)]+)
| (??{ $re_paren })
)*
$("#hoge").change(function() {
foo($(this).attr("data-i"));
});
### <: $base_uri :> を $vars->{base_uri} の値で置き換えるプラグイン
package Text::Textile::Pluggable::Plugin::FooBar;
use strict;
use warnings;
use parent qw/Text::Textile::Pluggable::Plugin::Base/; ## コンストラクタを提供する
## 中で bless +{ base_uri => 'http://localhost:5000' } => 'FooBar'; みたいなかんじ
sub init {## object生成時に呼ばれる
my ($self,) = @_;
@karupanerura
karupanerura / sprite_maker.pl
Created September 13, 2012 08:51 — forked from silvers/sprite_maker.pl
Generating image and css for CSS Sprite.
use strict;
use warnings;
use File::Basename;
use File::Find::Rule;
use Getopt::Long;
use Image::Imlib2;
sub main {
Getopt::Long::GetOptions(
'--dir=s' => \my $target_dir,