Skip to content

Instantly share code, notes, and snippets.

View hisaichi5518's full-sized avatar
🍑
吉高由里子

hisaichi5518 hisaichi5518

🍑
吉高由里子
View GitHub Profile

タイトル

Observable.just("hisaichi5518@gmail.com").flatMap(new Function<String, ObservableSource<String>>() {
@Override
public ObservableSource<String> apply(String s) throws Exception {
// return Observable.concat(validateEmail(s), validateNonNull(s));
return Observable.zip(validateEmail(s), validateNonNull(s), new BiFunction<String, String, String>() {
@Override
public String apply(String s, String s2) throws Exception {
@hisaichi5518
hisaichi5518 / test.pl
Created January 28, 2014 12:15
ウェイ
use strict;
use warnings;
sub hoge {
my $test = {};
return {
hoge => fuga() # ここに,がない
%{$test},
}
}
@hisaichi5518
hisaichi5518 / t.pl
Last active December 30, 2015 05:19
time module bench
use Time::Moment;
use DateTime;
use DateTime::Tiny;
use Time::Piece ();
use Time::Piece::Plus ();
use Benchmark qw(:all);
use DateTime::TimeZone;
my $time_zone = DateTime::TimeZone->new(name => "Asia/Tokyo");
@hisaichi5518
hisaichi5518 / bot.rb
Created August 12, 2013 07:06
tumblr irc bot.
# -*- encoding: utf-8 -*-
require 'cinch'
require 'tumblr_client'
bot = Cinch::Bot.new do
configure do |c|
c.server = "irc.server"
c.port = 5000
c.password = 'secret'
c.channels = ["#tumbirc"]
use Data::Dumper;
use Data::Dummy;
my %hash = (
id => dummy_int([1..100]),
name => dummy_str(["あ".."ん"]),
name_long => dummy_str(["あ".."ん"], size => 50),
);
my @array = (
dummy_int([1..100]),
use strict;
use warnings;
use utf8;
use 5.10.1;
package Parent {
use Mouse;
no Mouse;
use strict;
use warnings;
use utf8;
use 5.10.1;
package Parent {
use Mouse;
no Mouse;
use strict;
use warnings;
use utf8;
use Plack::Util;
use Encode;
use AnyEvent;
use AnyEvent::HTTP ();
$AnyEvent::HTTP::MAX_PER_HOST = 20;
Review review = Yummy.create(Review.class);
review.getComment(); //=> "lkjashldkjaspdiqwekjnd091824lknf09234kjhsf"
review.getId(); //=> 2