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
# prefork MPM | |
# StartServers: number of server processes to start | |
# MinSpareServers: minimum number of server processes which are kept spare | |
# MaxSpareServers: maximum number of server processes which are kept spare | |
# ServerLimit: maximum value for MaxClients for the lifetime of the server | |
# MaxClients: maximum number of server processes allowed to start | |
# MaxRequestsPerChild: maximum number of requests a server process serves | |
<IfModule prefork.c> | |
StartServers 4 | |
MinSpareServers 4 |
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
US-East (Virginia) 40 ms | |
US-West (California) 98 ms | |
US-West (Oregon) 120 ms | |
Europe (Ireland) 140 ms | |
Europe (Frankfurt) 153 ms | |
Asia Pacific (Singapore) 271 ms | |
Asia Pacific (Sydney) 279 ms | |
Asia Pacific (Japan) 207 ms | |
South America (Brazil) 178 ms |
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
try: | |
ai_list = socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM) | |
self.payload['latency'][host] = 0 #set default | |
counter = 0; | |
except socket.gaierror: | |
self.stderr(host+" - getaddrinfo() error: {0}".format(sys.exc_info()[1])) | |
continue | |
for (family, socktype, proto, canon, sockaddr) in ai_list: |
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
error: Error in src/rdb_protocol/btree.cc at line 532: | |
error: Guarantee failed: [!mod_info->deleted.second.empty() && mod_info->added.second.empty()] | |
error: Backtrace: | |
addr2line: 'rethinkdb': No such file | |
error: Thu May 29 02:14:37 2014 | |
1: backtrace_t::backtrace_t() at 0x115e912 (rethinkdb) | |
2: lazy_backtrace_formatter_t::lazy_backtrace_formatter_t() at 0x115ec0d (rethinkdb) | |
3: format_backtrace(bool) at 0x115fe71 (rethinkdb) | |
4: report_fatal_error(char const*, int, char const*, ...) at 0x11aceb5 (rethinkdb) |
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
error: Error in ./src/buffer_cache/alt/alt.hpp at line 327: | |
error: Guarantee failed: [block_size == lock_->cache()->max_block_size().value()] | |
error: Backtrace: | |
addr2line: 'rethinkdb': No such file | |
error: Sun May 4 07:30:26 2014 | |
1: backtrace_t::backtrace_t() at 0x115e872 (rethinkdb) | |
2: lazy_backtrace_formatter_t::lazy_backtrace_formatter_t() at 0x115eb6d (rethinkdb) | |
3: format_backtrace(bool) at 0x115fdd1 (rethinkdb) | |
4: report_fatal_error(char const*, int, char const*, ...) at 0x11ace15 (rethinkdb) |
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 httplib | |
import urllib2 | |
import ssl | |
import certifi | |
from backports.ssl_match_hostname import match_hostname | |
class CertValidatingHTTPSConnection(httplib.HTTPConnection): | |
default_port = httplib.HTTPS_PORT |
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
jQuery(function($) { | |
$('form[data-async]').live('submit', function(event) { | |
var $form = $(this); | |
var $target = $($form.attr('data-target')); | |
$.ajax({ | |
type: $form.attr('method'), | |
url: $form.attr('action'), | |
data: $form.serialize(), |
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 | |
# Splits a given table into n evenly-spaced shards. | |
# call with ./split-table <tablename> <numshards> | |
table=$1 | |
shards=$2 | |
cluster="localhost:29015" | |
splits=`seq 0 $((16**4/$shards)) $((16**4+1)) \ |
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
```php | |
<?php | |
object(r\Filter)#65 (2) { | |
["positionalArgs":"r\Query":private]=> | |
array(2) { | |
[0]=> | |
object(r\Table)#67 (2) { | |
["positionalArgs":"r\Query":private]=> | |
array(1) { | |
[0]=> |
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
r.table('lexi2').insert([ | |
{net:{lo:{tx:1, rx:2}, eth0:{tx:2, rx:4}}}, | |
{net:{lo:{tx:4, rx:6}, wl0ps4:{tx:7, rx:1}}}, | |
{net:{lo:{tx:14, rx:8}, eth0:{tx:1, rx:5}}}]) | |
r.table('lexi2').reduce( | |
function(left, right){ | |
return { net: | |
left('net').keys().setUnion(right('net').keys()).map( | |
function(iface){ |