This file contains hidden or 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/sh | |
| # | |
| # openresty adapted script to start and stop the openresty compiled | |
| # nginx daemon | |
| # --- original nginx comment --- | |
| # nginx - this script starts and stops the nginx daemon | |
| # | |
| # chkconfig: - 85 15 | |
| # description: Nginx is an HTTP(S) server, HTTP(S) reverse \ |
This file contains hidden or 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/sh | |
| # | |
| # chkconfig: 2345 55 25 | |
| # Description: Nginx init.d script, put in /etc/init.d, chmod +x /etc/init.d/nginx | |
| # For Debian, run: update-rc.d -f nginx defaults | |
| # For CentOS, run: chkconfig --add nginx | |
| # | |
| ### BEGIN INIT INFO | |
| # Provides: nginx | |
| # Required-Start: $all |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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)) \ |