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!
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
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!
使用本地转发,在本机上输入
ssh -L 81:210.32.200.89:11063 [email protected]
这时候打开浏览器,输入地址127.0.0.1:81 我同时也试验了
ssh -L 81:127.0.0.1:11063 [email protected]
ssh -L 81:localhost:11063 [email protected]
class Node: | |
def __init__(self, key): | |
self.key = key | |
self.parent = None | |
self.left = None | |
self.right = None | |
def insert(root, t): | |
new = Node(t) |
#include <Python.h> | |
#include <stdio.h> | |
/* | |
* gcc embpython.c -I/usr/include/python2.7 -lpython | |
**/ | |
void loadModule() | |
{ | |
/* run objects with low-level calls */ | |
char *arg1="sir", *arg2="robin", *cstr; | |
printf("Load Module err!\n"); |
This Gist is created in 2014, and it's highliy outdated now, according to one of mitmproxy
's manjor contributor (check his comment below). Thanks for letting us know, @mhils!
Modern applications usually make use of back-end API servers to provide their services. With a non-transparent HTTPs proxy, which intercepts the communication between clients and servers (aka the man-in-the-middle scheme), you can easily manipulate both API requests and responses.
""" | |
A python library of constants and utility functions for using ANSI terminal escapes. | |
Example usage: | |
>>> import escapes as e | |
>>> print e.FORECOLOUR(e.RED) + "this is red" + e.UNFORMAT | |
""" | |
ESC = "\033" # escape character for terminal | |
CSI = ESC + "[" # Control Sequence Initiator |
http://www.cnblogs.com/shihao/archive/2013/01/25/2876727.html
Physical machine 192.168.10.168 ubuntu 13.04
virtual machine 192.168.10.167 ubuntu 13.04
#!/bin/bash | |
NAME="hello_app" # Name of the application | |
DJANGODIR=/webapps/hello_django/hello # Django project directory | |
SOCKFILE=/webapps/hello_django/run/gunicorn.sock # we will communicte using this unix socket | |
USER=hello # the user to run as | |
GROUP=webapps # the group to run as | |
NUM_WORKERS=3 # how many worker processes should Gunicorn spawn | |
DJANGO_SETTINGS_MODULE=hello.settings # which settings file should Django use | |
DJANGO_WSGI_MODULE=hello.wsgi # WSGI module name |
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for: