- Introduction to WebRTC
- Why WebRTC ?
- WebRTC underpinnings : Signaling, STUN, TURN
- Open Source Libraries & Tools available
- Building your own Signaling Server
- Demo
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
#!/usr/bin/env ruby | |
require 'uri' | |
require 'json' | |
require 'net/http' | |
if ARGV.length > 0 | |
query = ARGV[0] | |
else | |
print 'Input word: ' |
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
#!/usr/bin/env ruby | |
def fizz(num) | |
num % 3 == 0 ? "Fizz" : nil | |
end | |
def buzz(num) | |
num % 5 == 0 ? "Buzz" : nil | |
end |
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
{ | |
"customer_name": "Girish ", | |
"customer_phone_number": "8345657321", | |
"amount": 199, | |
"placement_date": "16/06/2016", | |
"line_items": [ | |
{ | |
"variant_sku": "TIWD2571_M", | |
"quantity": 1, | |
"lmdn_enabled": true, |
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
nnoremap g> <ESC>vap:Twrite bottom-right<CR> | |
xnoremap g> :Twrite bottom-right<CR> |
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
# Why is this change necessary ? | |
# How does it address the issue ? | |
# What side effects does this change have ? | |
# References |
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
alert('test'); |
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
if exists('g:loaded_pairify') | |
finish | |
endif | |
let g:loaded_pairify = 1 | |
let g:pairs = { | |
\ "left": { | |
\ "[": "]", | |
\ "(": ")", | |
\ "{": "}", |
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
puts "Rails environment is #{Rails.env}" | |
products_without_master = Spree::Product.joins('left outer join spree_variants sv on sv.product_id = spree_products.id and sv.is_master = 1').where('sv.id is null').all | |
ids_without_master = products_without_master.map(&:id) | |
puts "Spree products without master variants are #{ids_without_master.count} in number and have ids #{ids_without_master}" | |
updated_at_values = products_without_master.map(&:updated_at) | |
ActiveRecord::Base.transaction do | |
puts "Creating missing master variants inside a transaction..." |
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
#!/usr/bin/env ruby1.9 | |
# encoding: UTF-8 | |
require 'rubygems' | |
require 'inline' | |
require 'time' | |
class DamerauLevenshtein | |
def distance(str1, str2, block_size=2, max_distance=10) | |
res = distance_utf(str1.unpack("U*"), str2.unpack("U*"), block_size, max_distance) | |
(res > max_distance) ? nil : res |