Skip to content

Instantly share code, notes, and snippets.

View wiegand's full-sized avatar

Branden Wiegand wiegand

View GitHub Profile
begin
require 'bundler/inline'
rescue LoadError => e
warn 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
# gem 'activerecord', '5.1.5'
begin
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
end
gemfile(true) do
source 'https://rubygems.org'
gem 'activerecord', '5.0.0.1'

Keybase proof

I hereby claim:

  • I am wiegand on github.
  • I am wiegand (https://keybase.io/wiegand) on keybase.
  • I have a public key whose fingerprint is 5ADC 58F5 39A8 5DF0 8520 05A8 9E0B 29DE 805A CB3F

To claim this, I am signing this object:

body {
font: 14px Helvetica;
}
#info {
padding: 1em;
margin: 1em 0;
background-color: #eee;
border: 1px dashed rgba(0,0,0,0.10);
}
@wiegand
wiegand / 67.rb
Created June 5, 2012 16:46
Problem #67
tri = File.open('triangle.txt').map do |row|
row.split.map {|i| i.to_i}
end
tri.to_enum.with_index do |row, ri|
row.to_enum.with_index do |n, ni|
pl = (ri == 0 || ni == 0) ? 0 : tri[ri-1][ni-1]
pr = (ri == 0 || (ni + 1) == row.length) ? 0 : tri[ri-1][ni]
p_max = [pl, pr].max
row[ni] = row[ni] + p_max