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
import errno | |
import functools | |
import socket | |
from tornado import ioloop, iostream | |
class Connection(object): | |
def __init__(self, connection): | |
self.stream = iostream.IOStream(connection) | |
self._read() |
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
import tornado.web | |
import tornado.httpserver | |
import tornado.ioloop | |
class MainHandler(tornado.web.RequestHandler): | |
def get(self): | |
self.write("Greetings from the instance %s!" % tornado.process.task_id()) | |
app = tornado.web.Application([ | |
(r"/", MainHandler), |
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
var multilineString = (function(){ /* | |
this | |
is | |
a | |
multiline | |
string. | |
*/}).toString().split('\n').slice(1, -1).join('\n'); | |
console.log(multilineString); |
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
# Debian 7 x64, Ubuntu 14.04 x64, Ubuntu 12.04.4 x64 | |
*NOTE (tested on Digital Ocean VM's w/ > 512MB of RAM - gcc runs out of memory on VM's <= 512 MB) | |
apt-get update | |
aptitude safe-upgrade | |
apt-get install build-essential libboost-all-dev libcurl4-gnutls-dev autoconf antlr swig python-dev | |
*NOTE (for python 3 support add 'python3-dev' to the end of line 5) | |
cd /tmp | |
wget https://github.com/NationalAssociationOfRealtors/libRETS/archive/1.6.1.tar.gz |
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
#!/bin/bash | |
DOMAINS=$1 | |
TMP_DIR=$2 | |
if [[ "$DOMAINS" == "" || "$TMP_DIR" == "" ]] ; then | |
echo -e "Usage : script.sh DOMAINS.txt (with one domain per line) TMP_DIR" | |
echo -e "Example : ./script.sh mydomains.txt /tmp" | |
exit 1 | |
fi |