Skip to content

Instantly share code, notes, and snippets.

View kevinzen's full-sized avatar

Kevin Bedell kevinzen

View GitHub Profile
{"results"=>[{"address_components"=>[{"long_name"=>"500", "short_name"=>"500", "types"=>["street_number"]}, {"long_name"=>"Walk Hill Street", "short_name"=>"Walk Hill St", "types"=>["route"]}, {"long_name"=>"Wellington Hill", "short_name"=>"Wellington Hill", "types"=>["neighborhood", "political"]}, {"long_name"=>"Boston", "short_name"=>"Boston", "types"=>["locality", "political"]}, {"long_name"=>"Suffolk County", "short_name"=>"Suffolk County", "types"=>["administrative_area_level_2", "political"]}, {"long_name"=>"Massachusetts", "short_name"=>"MA", "types"=>["administrative_area_level_1", "political"]}, {"long_name"=>"United States", "short_name"=>"US", "types"=>["country", "political"]}, {"long_name"=>"02126", "short_name"=>"02126", "types"=>["postal_code"]}, {"long_name"=>"3146", "short_name"=>"3146", "types"=>["postal_code_suffix"]}], "formatted_address"=>"500 Walk Hill St, Boston, MA 02126, USA", "geometry"=>{"location"=>{"lat"=>42.2880919, "lng"=>-71.1013059}, "location_type"=>"ROOFTOP", "viewport"=>{"n
require 'csv'
class String
def remove_non_ascii(replacement="")
self.gsub(/[\u0080-\u00ff]/, replacement)
end
end
namespace :test do
desc "fetch addresses from google"
@kevinzen
kevinzen / gist:7438588
Created November 12, 2013 20:59
remaining JRuby failures
1) Error:
manager#test_0002_assigns work to a processor:
NoMethodError: unmocked method :==, expected one of []
org/jruby/RubyArray.java:1961:in `=='
org/jruby/RubyHash.java:1101:in `=='
org/jruby/RubyArray.java:1309:in `include?'
org/jruby/RubyArray.java:1617:in `each'
org/jruby/RubyHash.java:1332:in `each'
/Users/kbedell/work/sidekiq_kmb/test/test_manager.rb:24:in `test_0002_assigns work to a processor'
org/jruby/RubyBasicObject.java:1703:in `__send__'
@kevinzen
kevinzen / gist:7437337
Created November 12, 2013 19:40
failures for sidekiq minitests for JRuby
1) Error:
manager#test_0002_assigns work to a processor:
NoMethodError: unmocked method :==, expected one of []
org/jruby/RubyArray.java:1957:in `=='
org/jruby/RubyHash.java:1055:in `=='
org/jruby/RubyArray.java:1303:in `include?'
org/jruby/RubyArray.java:1613:in `each'
org/jruby/RubyHash.java:1324:in `each'
/Users/kbedell/work/sidekiq/test/test_manager.rb:24:in `test_0002_assigns work to a processor'
org/jruby/RubyArray.java:2413:in `map'
@kevinzen
kevinzen / gist:7432911
Created November 12, 2013 15:33
sidekiq failing minitest stack trace
[2013-11-11T16:53:38.150000 #19380] ERROR -- : Sidekiq::Processor crashed!
MockExpectationError: mocked method :real_thread called with unexpected arguments [nil, #<Thread:0x41604212 run>]
/Users/kbedell/.rvm/gems/jruby-1.7.4/gems/minitest-4.7.5/lib/minitest/mock.rb:129:in `method_missing'
/Users/kbedell/work/sidekiq/lib/sidekiq/processor.rb:38:in `process'
/Users/kbedell/work/sidekiq/lib/sidekiq/processor.rb:83:in `do_defer'
/Users/kbedell/work/sidekiq/lib/sidekiq/processor.rb:37:in `process'
org/jruby/RubyKernel.java:1932:in `public_send'
/Users/kbedell/.rvm/gems/jruby-1.7.4/gems/celluloid-0.15.2/lib/celluloid/calls.rb:25:in `dispatch'
/Users/kbedell/.rvm/gems/jruby-1.7.4/gems/celluloid-0.15.2/lib/celluloid/calls.rb:67:in `dispatch'
/Users/kbedell/.rvm/gems/jruby-1.7.4/gems/celluloid-0.15.2/lib/celluloid/actor.rb:322:in `handle_message'
{
"id": 1,
"repository": {
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "somehexcode",
"url": "https://api.github.com/users/octocat"
@kevinzen
kevinzen / kbedell_background.txt
Created June 4, 2012 14:37
Kevin Bedell - Background
Kevin Bedell, Director of Engineering
Kevin brings a wealth of experience in the development, deployment and ongoing maintenance of software applications. In addition, he also brings deep expertise in managing the development process and in building and managing engineering teams.
As Director of Engineering, Kevin carries responsibility for delivery and maintenance of the applications that form the core of DMC's Technology Solutions offerings. To this end he works to staff and manage DMC's engineering team, to ensure that DMC's products and processes follow industry best-practices, and to ensure the engineering culture at DMC is one that pursues excellence and is driven by real customer needs.
In addition, Kevin is a significant contributor to DMC's Technology Solutions products drawing on his 20+ years of software development expertise.
DMC Project Experiences Include:
@kevinzen
kevinzen / gist:2711857
Created May 16, 2012 16:24
Job Description for a Ruby Developer at http://dmcouncil.org
Company: The District Management Council http://www.dmcouncil.org
Position: Ruby on Rails Developer(s)
The District Management Council is seeking skilled and passionate Rails developers
to help us shape the future of public education.
We develop innovative web applications to meet the most pressing challenges
facing public school districts today. Public schools across America are using
our software and services to increase the effectiveness of Special Education
source 'http://rubygems.org'
gem 'rails', '3.2.2'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'pg'
gem 'json'
@kevinzen
kevinzen / gist:2400225
Created April 16, 2012 17:40
Advice on DRYing this test up?
shared_examples_for "Firefox browser" do
it "should return 'Firefox' as its browser" do
@useragent.browser.should == "Firefox"
end
it "should return :strong as its security" do
@useragent.security.should == :strong
end