Hey! I saw this has been indexed by the search engines. It is a first draft of a post I ended up publishing on my blog at: Scaling PostgreSQL With Pgpool and PgBouncer
Thanks for stopping by!
// Copyright 2011, Tom Switzer | |
// Under terms of ISC License: http://www.isc.org/software/license | |
/** | |
* Sorts an array of integers in linear time using bucket sort. | |
* This gives a good speed up vs. built-in sort in new JS engines | |
* (eg. V8). If a key function is given, then the result of | |
* key(a[i]) is used as the integer value to sort on instead a[i]. | |
* | |
* @param a A JavaScript array. |
server { | |
listen 80; | |
server_name www.xibu.biz; | |
location / { | |
proxy_redirect off; | |
proxy_pass http://gae-bbs.appspot.com; | |
proxy_set_header Host "gae-bbs.appspot.com"; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
#!/bin/sh | |
# Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh | |
set -e | |
# Must be a valid filename | |
NAME=foo | |
PIDFILE=/var/run/$NAME.pid | |
#This is the command to be run, give the full pathname | |
DAEMON=/usr/local/bin/bar |
package main | |
import ( | |
"fmt" | |
) | |
type Node struct { | |
Value int | |
} |
from time import sleep | |
from tornado.httpserver import HTTPServer | |
from tornado.ioloop import IOLoop | |
from tornado.web import Application, asynchronous, RequestHandler | |
from multiprocessing.pool import ThreadPool | |
_workers = ThreadPool(10) | |
def run_background(func, callback, args=(), kwds={}): | |
def _callback(result): |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <libwebsockets.h> | |
static int callback_http(struct libwebsocket_context *context, | |
struct libwebsocket *wsi, | |
enum libwebsocket_callback_reasons reason, void *user, |
// Copyright 2012 Jiang Bian ([email protected]). All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
// Email: [email protected] | |
// Blog: http://wifihack.net/ | |
// Sina WeiBo oauth2 Login, Base on goauth2 lib | |
package main |
Hey! I saw this has been indexed by the search engines. It is a first draft of a post I ended up publishing on my blog at: Scaling PostgreSQL With Pgpool and PgBouncer
Thanks for stopping by!
<!-- | |
How to use Google JS Visualization Api offline, step by step | |
this approach might work with other libraries loaded with google.load, after all it's still JavaScript!!! | |
--> | |
<!DOCTYPE html> | |
<html> |
# coding: utf-8 | |
# | |
# Copyright (c) Alexandr Emelin. BSD license. | |
# All rights reserved. | |
# | |
""" | |
class GithubAuthHandler(BaseHandler, auth.GithubMixin): | |
x_site_token = 'application' |