Follow these steps to install graphite on OS X Lion.
- Python 2.7
- Brew
- Git
*** listener.js.bak 2011-06-05 21:17:31.777158283 +0800 | |
--- listener.js 2011-06-05 22:39:51.097153447 +0800 | |
*************** | |
*** 69,74 **** | |
--- 69,82 ---- | |
var path = url.parse(req.url).pathname, parts, cn; | |
if (path && path.indexOf('/' + this.options.resource) === 0){ | |
parts = path.substr(2 + this.options.resource.length).split('/'); | |
+ | |
+ // remove extra from check |
Setup | |
===== | |
[stunnel acccept port 443 connect 8443] | |
|| | |
[haproxy | |
* accept port 80 | |
default: connect 8080 (nginx) | |
host: 'push.*' => connect 8090 (node) | |
* accept port 8443 |
var express = require('express'); | |
var redis = require('redis'); | |
const serverType = process.argv[2]; | |
const serverHost = process.argv[3]; | |
const serverPort = parseInt(process.argv[4]); | |
const redisPort = 6379; | |
const redisHost = '127.0.0.1'; |
#include <assert.h> | |
#include <stdint.h> | |
#include <algorithm> | |
#include <vector> | |
using namespace std; | |
struct IPrange | |
{ |
# encoding: utf-8 | |
""" | |
A python logging Handler that use ZeroMQ (ØMQ). | |
+------+ +------+ +-------+ | |
| app1 | | app2 | | app X | | |
+------+ +------+ +-------+ | |
| PUSH | PUSH | PUSH | |
| | | |
#!/bin/sh | |
wget https://github.com/rg3/youtube-dl/zipball/master -O youtube-dl.zip | |
unzip youtube-dl.zip | |
cd rg3-youtube-dl-ceba827/ | |
python youtube-dl --batch-file ../pycon2012_video_urls.txt |
import gevent | |
from thrift.server.TServer import TServer | |
# XXX Hackish, but should be safe: monkey patch gevent socket support into | |
# Thrift. Overall I think this is cleaner than reimplementing all of TSocket. | |
from thrift.transport import TSocket; TSocket.socket = gevent.socket | |
from thrift.transport.TTransport import TTransportException | |
class TGEventServer(TServer): | |
"""Gevent socket server.""" |