Skip to content

Instantly share code, notes, and snippets.

@gurix
gurix / used_ruby_versions.py
Created March 3, 2020 15:25
A script to determine what ruby versions for you use for different projects in a workspace.
#!/usr/bin/env python3
import glob, os, sys
from collections import Counter
# It is necessary to pass a directory in which we want to look for a ruby version.
if len(sys.argv) < 2:
sys.exit("usage: %s dir \n\n dir : Direcotry to look up for ruby version" % sys.argv[0])
# Validate the specified directory.
path_argument = sys.argv[1]
@gurix
gurix / omniauth_callbacks_controller.rb
Created August 21, 2014 14:36
Sign up via omniauth with diffferent locales
class OmniauthCallbacksController < Devise::OmniauthCallbacksController
def twitter
handle_redirect('devise.twitter_uid', 'Twitter')
end
def facebook
handle_redirect('devise.facebook_data', 'Facebook')
end
private