Skip to content

Instantly share code, notes, and snippets.

View doomhz's full-sized avatar

Dumitru Glavan doomhz

View GitHub Profile
@doomhz
doomhz / opentok_multiple_sessions_final.html
Created August 20, 2012 10:12
OpenTok multiple sessions final implementation
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>OpenTok API Sample &#8212; Basic Tutorial</title>
<link href="samples.css" type="text/css" rel="stylesheet" >
<script src="http://staging.tokbox.com/v0.91/js/TB.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<script type="text/javascript" charset="utf-8">
@doomhz
doomhz / opentok_multiple_sessions.html
Created August 16, 2012 17:05
OpenTok Multiple sessions and one publisher example
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>OpenTok API Sample &#8212; Basic Tutorial</title>
<link href="samples.css" type="text/css" rel="stylesheet" >
<script src="http://staging.tokbox.com/v0.91/js/TB.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<script type="text/javascript" charset="utf-8">
@doomhz
doomhz / gist:2910803
Created June 11, 2012 15:55
haproxy config
# Install HAProxy
cd ~
wget http://haproxy.1wt.eu/download/1.5/src/devel/haproxy-1.5-dev6.tar.gz
tar xzf haproxy-1.5-dev6.tar.gz
cd haproxy*
make install
# HAProxy config
mkdir /etc/haproxy
@doomhz
doomhz / gist:2895441
Created June 8, 2012 12:50
SSL with Node and Express
// SSL with Node and Express method 1:
var express = require('express')
, fs = require("fs")
, routes = require('./routes');
var privateKey = fs.readFileSync('cert/key.pem').toString();
var certificate = fs.readFileSync('cert/certificate.pem').toString();
// to enable https
@doomhz
doomhz / gist:1351128
Created November 9, 2011 11:00
#fullfrontalconf nodejs workshop
PORT=800 node
process.env.PORT
http://nodejs.org/docs/v0.4.7/api/
nodemon
superviser
node debug script.js