- iMacだと問題なし
- Macbookproはダメ
- スリープの種類がiMacとMacbookproでは違う
pmset -gで確認- iMacは
hibernatemodeが0 (sleep)
- iMacは
- Macbookproは
hibernatemodeが3 (safe sleep)
| source 'https://rubygems.org' | |
| group :development, :test do | |
| gem 'pry' | |
| gem 'pry-doc' | |
| gem 'pry-byebug' | |
| gem 'pry-power_assert' | |
| end | |
| group :test do |
| #!/usr/bin/env ruby | |
| class AlreadyExistsStone < StandardError; end | |
| def init_board(num = 19) | |
| @board = Array.new(num){ Array.new(num) } | |
| end | |
| def init_narabe(num = 5) | |
| @narabe = num |
| require 'benchmark/ips' | |
| module Cond | |
| OPS = ['*',''].freeze | |
| RANGE = (1000..10000).freeze | |
| end | |
| class Proc0 | |
| def self.run(num, ops, ret) | |
| # @note Synonymous with the following implementation, but maybe slow |
| unless File.exists?('./Gemfile') | |
| File.write('./Gemfile', <<~GEMFILE) | |
| source 'http://rubygems.org' | |
| gem 'activesupport' | |
| GEMFILE | |
| system 'bundle install --path=vendor/bundle' | |
| end | |
| require 'bundler/setup' | |
| require 'active_support' |
| rails_version = ENV['R4'] ? '4.2.8' : '5.0.2' | |
| def bundle_install(version) | |
| gemfile = "./Gemfile-#{version}" | |
| ENV.update('BUNDLE_GEMFILE' => gemfile) | |
| unless File.exists?(gemfile) | |
| File.write(gemfile, <<~GEMFILE) | |
| source 'http://rubygems.org' | |
| gem 'rails', "#{version}" | |
| GEMFILE |
| unless File.exists?('./Gemfile') | |
| File.write('./Gemfile', <<~GEMFILE) | |
| source 'http://rubygems.org' | |
| gem 'activerecord' | |
| gem 'sqlite3' | |
| GEMFILE | |
| system 'bundle install --path=vendor/bundle' | |
| end | |
| require 'bundler/setup' |
| " Shortcuts | |
| map "q" nextTab | |
| map "shift+q" previousTab |
| module DSL | |
| def capture | |
| 'DSL#capture' | |
| end | |
| end | |
| module Helper | |
| def call_capture | |
| capture | |
| end |
| require 'yaml' | |
| ENV.update('foo' => 'FOO') | |
| ENV.update('bar' => 'BAR') | |
| ENV.update('baz' => 'BAZ') | |
| p YAML.load(<<EOS) | |
| --- | |
| foo: !ruby/string #{ENV['foo']} | |
| bar: !str #{ENV['bar']} | |
| baz: ! #{ENV['baz']} | |
| EOS |