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
class Connection | |
constructor: (@socket, @manager) -> | |
@socket.setEncoding 'utf-8' | |
@socket.on 'data', incomingData | |
@socket.on 'end', connectionClosed | |
@peerMet = false | |
incomingData = (chunck) => |
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
tls = require 'tls' | |
fs = require 'fs' | |
Connection = require('./connection').Connection | |
class Rendezvous | |
@unPairedConnections = [] | |
connectionFindOutSecret: (connection, cb) => | |
#check if a connection with the same secret exists in the unPairedConnections list |
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
express = require 'express' | |
fs = require 'fs' | |
app = express() | |
authenticationFilter = (req, res, next) -> | |
auth_token = req.query.auth_token | |
if auth_token == process.env.AUTH_TOKE | |
next() | |
else |
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
package main | |
import ( | |
"fmt" | |
"net/http" | |
"os" | |
"io/ioutil" | |
) | |
func main() { |
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
set -e | |
sudo apt-get update | |
sudo apt-get install -y curl build-essential bison openssl libreadline6 libreadline6-dev git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev libxslt-dev autoconf ssl-cert libcurl4-openssl-dev nginx | |
echo "Installing Ruby..." | |
echo " -> Downloading Ruby" | |
wget -q http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz | |
echo " -> Extracting tarball" |
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
set -e | |
sudo apt-get install -y curl build-essential bison libreadline6 libreadline6-dev zlib1g zlib1g-dev libyaml-dev libxml2-dev libxslt-dev autoconf | |
#installing ruby | |
wget -q http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz | |
tar xf ruby-1.9.3-p0.tar.gz | |
cd ruby-1.9.3-p0 | |
./configure --disable-install-doc | |
make |
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
set -e | |
sudo apt-get update | |
sudo apt-get install -y curl build-essential bison openssl libreadline6 libreadline6-dev git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev libxslt-dev autoconf ssl-cert libcurl4-openssl-dev nginx | |
echo "Installing Ruby..." | |
echo " -> Downloading Ruby" | |
wget -q http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz | |
echo " -> Extracting tarball" |
NewerOlder