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
| apt-get install -y build-essential libx11-dev libgl1-mesa-dev libxext-dev perl perl-modules make | |
| cd /tmp | |
| wget http://byte-unixbench.googlecode.com/files/UnixBench5.1.3.tgz | |
| tar xzvf UnixBench5.1.3.tgz | |
| cd UnixBench | |
| ./Run | |
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
| upstream mash { | |
| ip_hash; | |
| server 127.0.0.1:8081; | |
| server 192.168.0.11:8081; | |
| } | |
| server { | |
| location / { | |
| if ($request_method = POST ) { |
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
| // Data inserted | |
| r.db('test').table('multi').insert({ | |
| id:1, | |
| field: [ | |
| {key1: 1}, {key1: 2}, {key1: 3} | |
| ] | |
| }) | |
| r.db('test').table('multi').insert({ | |
| id:2, | |
| field: [ |
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
| 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){ |
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
| ```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 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)) \ |
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
| 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
| 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
| 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) |
OlderNewer