View space_probe.rb
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 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'activesupport' | |
gem 'rubocop', '0.84.0' | |
gem 'rubocop-performance', '1.6.0' | |
gem 'rubocop-rails', '2.5.2' |
View benchmark_require_time.rb
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 Kernel | |
alias_method :original_require, :require | |
def require(path) | |
time = ::Time.now | |
original_require(path).tap do | |
puts "%3.6f\t#{path}" % (Time.now - time) | |
end | |
end | |
end |
View raise_kwargs_test.rb
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 MyError < StandardError | |
def initialize(**options) | |
p options | |
end | |
end | |
raise MyError, foo: :bar |
View test_rails_format_accept.rb
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
# frozen_string_literal: true | |
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'rails', '5.1.7' | |
end |
View active_record_nested_dependents.rb
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 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'activerecord', '6.0.0' | |
gem 'sqlite3' | |
end | |
require 'active_record' |
View active_record_time_default.rb
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 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'activerecord', '6.0.0' | |
gem 'sqlite3' | |
end | |
require 'active_record' |
View active_storage_test.rb
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
# frozen_string_literal: true | |
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'rails', '6.0.0' | |
gem 'sqlite3' | |
end |
View r7kamura-hatenablog-com.css
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
/* <system section="theme" selected="life"> */ | |
@import url("/css/theme/life/life.css"); | |
/* </system> */ | |
body { | |
color: rgba(0, 0, 0, 0.8); | |
line-height: 1.7; | |
} | |
h1, |
View dota-auto-chess-items-graph.dot
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
digraph G { | |
graph [ | |
nodesep = 0.5 | |
rankdir = LR | |
ranksep = 0.8 | |
] | |
node [ | |
fontsize = 18 | |
shape = polygon |
View activerecord-6-0-0-beta1-habtm-validation.rb
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 "bundler/inline" | |
gemfile(true) do | |
source "https://rubygems.org" | |
gem "activerecord", "6.0.0.beta1", require: "active_record" | |
gem "sqlite3" | |
end | |
ActiveRecord::Base.logger = Logger.new(STDOUT) |