Skip to content

Instantly share code, notes, and snippets.

View DonSchado's full-sized avatar
🐢
null

Marco DonSchado

🐢
null
View GitHub Profile
@DonSchado
DonSchado / playground.rb
Last active November 6, 2019 09:09
ActiveRecord Playground File `irb -r ./playground.rb` (or `pry ...`)
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'sqlite3'
gem 'activerecord', "~> 6.0.0.rc2"
end
require 'active_record'
@DonSchado
DonSchado / burning_woods.rb
Last active October 27, 2021 06:34
Game of life variation
class WoodOfLife
include Enumerable
ROWS = 50
COLUMNS = 50
EXAMPLE = Array.new(ROWS * COLUMNS) { rand(2) }.join
attr_reader :cells, :rows, :columns
def initialize(options = {})