〒 153-0064 東京都目黒区下目黒5-11-24 シェアハウス(中村・矢口・荻原宅)
This file contains 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
class ChainQuery | |
def initialize(init_value) | |
@init_value = init_value | |
@filters = [] | |
end | |
def add_filter(&block) | |
@filters << block | |
self | |
end |
This file contains 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 warnigns; | |
use Test::More; | |
use Test::More::Hooks; | |
package Foo { | |
sub new{ bless { counter => $_[1] }, $_[0]; } | |
sub count_up { shift->{counter} += shift; } | |
}; |
This file contains 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
#import <XCTest/XCTest.h> | |
#import <TKRGuard.h> | |
#import <OHHTTPStubs.h> | |
@interface AMEHTTPRequestTestCase : XCTestCase | |
@property (nonatomic, strong) NSURLRequest *lastRequest; | |
- (void)stubAllRequestWithResponseFileName:(NSString *)responseFileName statuCode:(NSInteger)statusCode; |
This file contains 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
gem 'arproxy' | |
gem 'explain_parser' |
This file contains 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
user = { | |
id: 1, | |
name: 'ainame', | |
} | |
if flag | |
user[:gender] = 'male', # ← 末尾にカンマが入ってしまっていたけどシンタックスエラーにはならない | |
user[:age] = 100 | |
end |
This file contains 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
module MyApp | |
module AWS | |
class SNS | |
def self.stub_configuration | |
AWS::Core::Configuration.new( | |
access_key_id: 'ACCESS_KEY_ID', | |
secret_access_key: 'SECRET_ACCESS_KEY', | |
stub_requests: true, | |
) |
This file contains 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
# 1 | |
class Coriander | |
include MyApp::Entity::HasId | |
end | |
# 2 | |
class Coriander | |
include MyApp::Entity::Identifiable | |
end |
This file contains 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
# -*- coding: utf-8 -*- | |
require "tempfile" | |
desc "scaffoldで生成されたコントローラーからrespond_toブロックを消す" | |
namespace :my do | |
task :rm_respond_to do | |
Dir::glob("app/controllers/*_*.rb") do |ctrl| | |
if !(File::basename(ctrl) =~ /application/) | |
temp = Tempfile::new("tmp",Dir::pwd) | |
open(ctrl) do |f| | |
text = f.read |
This file contains 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 warnings; | |
use strict; | |
use 5.010; | |
sub prompt{ | |
do{ | |
my $hand; | |
say "グー[g], チョキ[c], パー[p]"; | |
print "入力してください:"; |
OlderNewer