Skip to content

Instantly share code, notes, and snippets.

Avatar

Tomafc tomafc330

View GitHub Profile
@skycocker
skycocker / Gemfile
Last active Mar 26, 2021
Get basic user info from Google Oauth V2 api (since google is an extraordinary piece of shit when it comes to documenting their stuff) (or making admin consoles)
View Gemfile
gem 'google-api-client'
@reidmorrison
reidmorrison / collection.rb
Last active Sep 28, 2015
Mongo Reconnect logic for Connection Failures. Deprecated, moved to: https://github.com/reidmorrison/mongo_ha
View collection.rb
#
# NOTE: This gist is now deprecated and has been moved into a gem: https://github.com/reidmorrison/mongo_ha
#
require 'mongo/collection'
module Mongo
class Collection
alias_method :find_one_original, :find_one
def find_one(*args)