Skip to content

Instantly share code, notes, and snippets.

View kerrizor's full-sized avatar
🏍️
BRAAAAAAAAP!

Kerri Miller kerrizor

🏍️
BRAAAAAAAAP!
View GitHub Profile
@kerrizor
kerrizor / 2019-winter-ruby-abstract.md
Created December 27, 2018 21:33 — forked from searls/2019-winter-ruby-abstract.md
Winter 2019 Ruby talk proposal

The Selfish Programmer

Using Ruby at work is great… but sometimes it feels like a job!

This year, I rediscovered the joy of writing Ruby apps for nobody but myself—and you should, too! Solo development is a great way to learn skills, to find inspiration, and to distill what matters most about programming.

Building an entire app by yourself can be overwhelming, but this talk will make it easier. We'll start with a minimal toolset that one person can maintain. You'll learn how many "bad" coding practices can actually reduce complexity. You may be surprised how selfish coding can make you a better team member, too!

Details

@kerrizor
kerrizor / orphans.rake
Last active March 20, 2019 12:45
ActiveRecord Orphans
desc "Check for ActiveRecord orphans"
task orphan_check: :environment do
# Silly housekeeping.. I'm sure there's a better way to spin up the app before
# we run the rake task but I A) can't remember and B) can't be bothered I'm
# just spiking some code here. Only PITA here is it makes us Rails specific.
#
Rails.application.eager_load!
ActiveRecord::Base.descendants.each{ |k| k.connection }
# Load up all the AR models in our app
def link_to_github(rubygem)
[rubygem.linkset.code, rubygem.linkset.home].detect do |linkset|
URI(linkset.to_s).host == "github.com"
end
rescue URI::InvalidURIError
nil
end
context "when the moon is rising" do
let(:moon_phase) { ->(){ planet.moons.first.blah.baz.bat[0].phase } }
it "looks it up" do
expect { change_moon_phase }.to change( moon_phase.call }
end
end
@kerrizor
kerrizor / ss1k.md
Created July 12, 2019 17:00
SaddleSore 1000 Planning