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.db("rethinkdb").table("stats") | |
| .hasFields('db', 'table') | |
| .group('db', 'table') | |
| .map(doc => doc('storage_engine')('disk')('space_usage')('data_bytes').default(0)) | |
| .sum() | |
| .ungroup() | |
| .map(doc => ({db: doc('group').nth(0), table: doc('group').nth(1), size: doc('reduction').div(1024).div(1024)})) | |
| .orderBy(r.desc('size')); |
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.db("rethinkdb").table("table_config") | |
| .hasFields('db', 'name') | |
| .concatMap(doc => [{ | |
| db: doc('db'), | |
| table: doc('name'), | |
| shards: doc('shards').count(), | |
| replicas: doc('shards').nth(0)('replicas').count(), | |
| }]) | |
| // this part is dumb - assuming you have 4 main servers, | |
| // and that ONLY tables with 5 total replicas have 5 replicas |
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.db("rethinkdb").table("stats") | |
| .hasFields('db', 'table') | |
| .group('db', 'table') | |
| .map(doc => ({ | |
| reads: doc('storage_engine')('disk')('read_bytes_total').default(0), | |
| writes: doc('storage_engine')('disk')('written_bytes_total').default(0) | |
| })) | |
| .ungroup() | |
| .map(doc => ({ | |
| db: doc('group').nth(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
| // By slack user ronz | |
| query | |
| .changes({includeInitial: true, includeStates: true, includeTypes: true}) | |
| .pluck('type', 'state') | |
| .filter(row => row('type').ne('change')) | |
| .fold( | |
| 0, | |
| (acc, next) => r.branch( | |
| r.or(next('type').eq('add'), next('type').eq('initial')), | |
| acc.add(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
| { | |
| "name": "broken", | |
| "private": true, | |
| "version": "0.0.1", | |
| "scripts": { | |
| "test-football-formulas": "jasmine www/formulas/test/football_formulas_tests.js", | |
| "dev-scripts": "npm run hgrc && npm run create-env", | |
| "dev": "webpack-dev-server --config=webpack.config.js --progress --hot", | |
| "preinstall": "npm prune", | |
| "predevsilent": "npm run dev-scripts", |
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
| var debug = require('debug')('nodemon'); | |
| var utils = require('../utils'); | |
| var bus = utils.bus; | |
| var childProcess = require('child_process'); | |
| var spawn = childProcess.spawn; | |
| var exec = childProcess.exec; | |
| var watch = require('./watch').watch; | |
| var config = require('../config'); | |
| var child = null; // the actual child process we spawn | |
| var killedAfterChange = false; |
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
| FROM debian:jessie | |
| ENV LC_ALL C.UTF-8 | |
| RUN apt-get update && apt-get install -y vim nano curl netcat less tcpdump | |
| # Add the RethinkDB repository and public key | |
| ENV RETHINKDB_PACKAGE_VERSION 2.3.6~0jessie | |
| RUN curl -s https://download.rethinkdb.com/apt/pubkey.gpg | apt-key add -v - \ | |
| && echo "deb http://download.rethinkdb.com/apt jessie main" > /etc/apt/sources.list.d/rethinkdb.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
| #!/bin/sh | |
| # A word about this shell script: | |
| # | |
| # It must work everywhere, including on systems that lack | |
| # a /bin/bash, map 'sh' to ksh, ksh97, bash, ash, or zsh, | |
| # and potentially have either a posix shell or bourne | |
| # shell living at /bin/sh. | |
| # | |
| # See this helpful document on writing portable shell scripts: |
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
| 0 info it worked if it ends with ok | |
| 1 verbose cli [ '/usr/bin/node', | |
| 1 verbose cli '/usr/bin/npm', | |
| 1 verbose cli 'i', | |
| 1 verbose cli 'git+https://git@github.com/Blizzard/node-rdkafka.git' ] | |
| 2 info using npm@4.6.1 | |
| 3 info using node@v8.9.1 | |
| 4 silly install loadCurrentTree | |
| 5 silly install readLocalPackageData | |
| 6 silly fetchPackageMetaData git+https://git@github.com/Blizzard/node-rdkafka.git |
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
| > node-rdkafka@2.2.3 preinstall /usr/lib/node_modules/node-rdkafka | |
| > node util/configure | |
| checking for OS or distribution... ok (Linux) | |
| checking for C compiler from CC env... failed | |
| checking for gcc (by command)... ok | |
| checking for C++ compiler from CXX env... failed | |
| checking for C++ compiler (g++)... ok | |
| checking executable ld... ok | |
| checking executable nm... ok |