This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// mapping relmeauth provider support to local URLs for initiating | |
// authentication, using OAuth, OAuth 2.0, or just about anything else | |
passport.use(new RelmeStrategy({ | |
'twitter.com': '/auth/twitter' | |
'facebook.com': '/auth/facebook' | |
}, | |
function(token, profile, done) { | |
// relme auth is mostly a discovery mechanism, which redirects | |
// the the highest-priority, supported provider. The verify | |
// callback would likely be handled best by the configured |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# compl1.rb - Redis autocomplete example | |
# download female-names.txt from http://antirez.com/misc/female-names.txt | |
require 'rubygems' | |
require 'redis' | |
r = Redis.new | |
# Create the completion sorted set | |
if !r.exists(:compl) |