Skip to content

Instantly share code, notes, and snippets.

View wasabhi's full-sized avatar
🏠
Working from home

Abhinav wasabhi

🏠
Working from home
  • Ōtautahi Christchurch, New Zealand
View GitHub Profile
# Read about factories at https://github.com/thoughtbot/factory_girl
FactoryGirl.define do
factory :account do
name "MyString"
factory :account_with_projects do
transient do
projects_count 2
end
Zlib::BufError: buffer error
/Users/abhinav/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http/response.rb:357:in `finish'
/Users/abhinav/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http/response.rb:357:in `finish'
/Users/abhinav/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http/response.rb:262:in `ensure in inflater'
/Users/abhinav/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http/response.rb:262:in `inflater'
/Users/abhinav/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http/response.rb:274:in `read_body_0'
/Users/abhinav/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http/response.rb:201:in `read_body'
/Users/abhinav/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http/response.rb:226:in `body'
/Users/abhinav/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http/response.rb:163:in `reading_body'
/Users/abhinav/.rvm/rubies/ruby-2.0.0-p451/lib/ruby/2.0.0/net/http.rb:1412:in `block in transport_request'
@wasabhi
wasabhi / faraday.rb
Created April 8, 2014 10:58
faraday initializer with timeout options
connection = Faraday.new(request_host) do |faraday|
faraday.request :url_encoded
faraday.options[:timeout] = TIMEOUT
faraday.options[:open_timeout] = OPEN_TIMEOUT
faraday.response :logger if ENV['DEBUG']
faraday.adapter Faraday.default_adapter
faraday.use FaradayMiddleware::ParseJson, :content_type => /\bjson$/
end

Keybase proof

I hereby claim:

  • I am wasabhi on github.
  • I am abhinav (https://keybase.io/abhinav) on keybase.
  • I have a public key whose fingerprint is 1F6C F866 408D 7C3E 274A B78A 63AB 56B1 7D1E D579

To claim this, I am signing this object:

@wasabhi
wasabhi / rails-gem-deps.sh
Created September 27, 2011 20:37
Get your gem dependencies listed out from your Gemfile, assuming you use the single quote throughout.
cat Gemfile | grep -v source | grep -i gem | awk -F\' {'print $2'} | xargs -n 1 gem dependency