$ cmp file1 file2 -s
$ echo $?
1
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
package Result::User { | |
use strict; | |
use warnings; | |
use utf8; | |
sub new { bless {}, shift } | |
sub to_model { | |
my $self = shift; | |
Model::User->new(user => $self); |
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 'minitest' | |
gem 'minitest-rails' | |
group :development, :test do | |
# run when something change | |
gem 'guard' | |
gem 'guard-livereload' | |
# gem 'guard-rails_best_practices' | |
gem 'guard-minitest' |
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
// | |
// ScrollViewController.swift | |
// ScrollView | |
// | |
// Created by PxP_ss on 2014/10/08. | |
// Copyright (c) 2014年 pxp_ss. All rights reserved. | |
// | |
import UIKit |
rpmで問題が起きたのでまとめておく.あと英語で書くと日本の人が読んでくれないのでまず日本語で…
現在のtd-agentは1.1.19だが,2.0.0と1.2.0があった場合,yum updateでは2.0.0が入ってしまう.これでは,Rubyのバージョンが変わった場合などはgemの再インストールが必要で,単なるアップデートでは起動出来なくなるという問題がある(chefとか使っていれば多分防ぐことは出来るが強制することは出来ない).
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
# Add the gem | |
gem 'rails_admin' |
facebook/flux 2.0.32.1.0で追加されたflux/utils
について
see also 2015-08-17のJS: redux 1.0.0、flux-utils、Firefox 40 - JSer.info
はてなブックマーク検索を作りながらFlux Utilsについて学ぶ | Web Scratchにもっと具体的な解説を書きました
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
gogoutineてGOMAXPROCSを設定しない限りはシングルスレッドなんですねえ。 | |
GOMAXPROCSはもうちょっとだけ複雑です。 | |
同時に動けるgoroutineの数の制限なのですが、 | |
read などのブロックするかもしれないシステムコールを発行する場合、発行前に「現在実行中のゴルーチン数」をデクリメントして、 | |
システムコールから返ってきたらそれをインクリメントします。 | |
で、デクリメントした時に、他に動けるスレッドがいなかったらスレッド起動して、他のgoroutineが動けるようにします。 | |
他のスレッドがすでにあって眠っていたら、それを起こしてgoroutineを実行させます。 | |
なので、ブロックする処理としない処理を混ぜてもいい感じに動くのです。 | |
で、その、スレッドを作ったり起動したりするのが実はちょっとだけ重いので、ベンチマーク結果を良くするためにはその処理が走らないように、 |
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
require 'sinatra' | |
require 'haml' | |
# 静的コンテンツ参照のためのパス設定 | |
set :public, File.dirname(__FILE__) + '/public' | |
# アップロード | |
get '/' do | |
haml :index |
OlderNewer