友達二人とイオンに行ってきたよー
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
source 'http://rubygems.org' | |
gem 'guard' | |
gem 'guard-less' | |
gem 'guard-coffeescript' |
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 warnings; | |
use Test::More; | |
use resize; | |
subtest "valid case (with option)" => sub{ | |
my $valid_uri = "http://example.com/scale/c.120x240.sushi.png"; | |
my $file_info = resize::parse_uri($valid_uri); | |
is $file_info->{option}, "c", "option"; |
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
#Newbie programmer | |
def factorial(x): | |
if x == 0: | |
return 1 | |
else: | |
return x * factorial(x - 1) | |
print factorial(6) | |
#First year programmer, studied Pascal |
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 | |
class Cat | |
def initialize | |
@word = 'にゃんにゃん' | |
end | |
def nyan | |
puts @word | |
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 Regexp::Assemble; | |
my $ra = Regexp::Assemble->new; | |
$ra->add( '^9m[^0-9a-zA-Z]' ); | |
$ra->add( '[^0-9a-zA-Z]9m$' ); | |
$ra->add( '^9m$' ); | |
$ra->add( '[^0-9a-zA-Z]9m[^0-9a-zA-Z]' ); | |
print $ra->re; #(?-xism:(?:[^0-9a-zA-Z]9m(?:[^0-9a-zA-Z]|$)|^9m(?:[^0-9a-zA-Z]|$)) |
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
# 厨2病フレーズだけで記述できるプログラミング言語 のイメージ | |
何ッ () | |
もしも それ が 真実 なの ならば——— | |
これ は 大変なことになるぞ! (いや?)\ | |
まぁ…… いい… | |
ククク…… 見せてもらおうじゃないか…… ←\ | |
旋律 の 傀儡師 の 実力とやらを! | |
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
slow 遅い | |
fast 速い | |
above より上に | |
below より下に | |
absolute 絶対的な | |
relative 相対的な | |
abstract 抽象的な |
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 | |
class Cパンツ | |
def initialize(好み = {}) | |
@色 = 好み[:色] || 0xFFFFFF | |
@柄 = 好み[:柄] || :無地 | |
end | |
def 何色? | |
sprintf("%#x", @色) |
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
path = ARGV.shift | |
if File.exists?(path) && path.match(/^(.+)\.(jpe?g|jp2)$/) | |
filename = $1 | |
ext = $2 | |
files = [] | |
10.times do |i| | |
10.times do |j| | |
if i != j | |
files << output = "#{filename}_ikemen_#{i}#{j}.#{ext}" | |
`cat #{path} | sed s/#{i}/#{j}/g > #{output}` # gsed じゃなくて sed にした |