This file contains hidden or 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 bash | |
| apt-get -y update | |
| apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-gplv2-dev libyaml-dev | |
| cd /tmp | |
| wget http://ruby.taobao.org/mirrors/ruby/1.9/ruby-1.9.3-p429.tar.gz | |
| tar -xvzf ruby-1.9.3-p429.tar.gz | |
| cd ruby-1.9.3-p429/ | |
| ./configure --prefix=/usr/local --disable-install-rdoc | |
| make |
This file contains hidden or 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
| //app.js Socket IO Test | |
| var app = require('express').createServer(), | |
| redis = require('socket.io/node_modules/redis'), | |
| io = require('socket.io').listen(app); | |
| var pub = redis.createClient(port, "url"); | |
| var sub = redis.createClient(port, "url"); | |
| var store = redis.createClient(port, "url"); | |
| pub.auth('pass', function(){console.log("adentro! pub")}); | |
| sub.auth('pass', function(){console.log("adentro! sub")}); |
This file contains hidden or 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
| /** | |
| * @file queue.c | |
| * @brief 基本的队列实现 | |
| * @author linyaoyi | |
| * @version 1.1 | |
| * @date 2012-01-16 | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> |
NewerOlder