Skip to content

Instantly share code, notes, and snippets.

@mwean
mwean / list_failures
Created April 11, 2016 21:34
List all spec failures from a given build
#!/usr/bin/env ruby -wU
require "httparty"
build_num = ARGV[0]
print "Pulling spec failures from build #{build_num}..."
summary_url = "https://circleci.com/api/v1/project/LendingHome/lendinghome-monolith/#{build_num}"
summary_response = JSON.parse(HTTParty.get(summary_url, query: { "circle-token" => ENV["CIRCLE_TOKEN"]}))
puts "done."
@mwean
mwean / run_changed_specs
Created December 8, 2016 21:45
Run any changed specs
#!/usr/bin/env ruby
project_root = `git rev-parse --show-toplevel`.strip
git_status = `git status --porcelain --untracked-files=all`.split("\n")
changed_files = git_status.map { |line| line[3..-1] }
grouped_specs = Hash.new { |hash, key| hash[key] = [] }
changed_files.select { |file| file =~ /spec/ }.each do |spec|
project, file = spec.split("/spec/")
grouped_specs[project] << "spec/#{file}"

Development Process

  • Describe a current or upcoming project that I might work on
  • How do you balance speed and quality?
  • Do you do code review? Does all code get reviewed?
  • What is your approach to testing?
  • What is the development process like?
  • Who is responsible for doing deployment? How often do you deploy?
  • How do you balance support work and feature development?
  • How often do you pair? What’s pairing like? How often do inexperienced people work directly with experienced people?
  • What’s the onboarding process like?
@mwean
mwean / create_index1.sql
Last active October 5, 2017 09:28
Code Snippets for Adventures in Searching with Postgres - Part 2
CREATE INDEX index_description_on_icd_codes ON icd_codes USING gin(to_tsvector(description))

Keybase proof

I hereby claim:

  • I am mwean on github.
  • I am mwean (https://keybase.io/mwean) on keybase.
  • I have a public key ASCLjDQq9jv6vHfskj0RVFu-zuUe1kfbx2rjyR9ExZRx8go

To claim this, I am signing this object:

class Bottles
def song
verses(99, 0)
end
def verses(high, low)
high.downto(low).map { |n| verse(n) }.join("\n")
end
def verse(n)