Skip to content

Instantly share code, notes, and snippets.

@yunjian
yunjian / Opentok_rails.rb
Created February 28, 2011 21:13
Use Opentok API in Rails
# 1. plugin
# Download the ruby SDK code, and copy to the plugin directory.
${RAILS_ROOT}/vendor/plugins/opentok
# You may need to create an "init.rb" file in the opentok plugin directory,
# and insert the following line.
require 'opentok'
# 2. database
@yunjian
yunjian / avatar_rails.rb
Created March 5, 2011 06:08
Integrating avatar in Rails
#- add gem avatar in Gemfile
gem 'avatar', :git => '[email protected]:yunjian/avatar.git'
#- add sized gravatar source in
# {RAILS_ROOT}/lib/sized_gravatar_source.rb
require 'avatar/source/gravatar_source'