Note: This post is a summary of information paraphrased from an excellent blog post by Christian Sepulveda.
Create the app and download the necessary dependencies.
| var _ = require('underscore'), | |
| util = require('util'); | |
| // intercept stdout, passes thru callback | |
| // also pass console.error thru stdout so it goes to callback too | |
| // (stdout.write and stderr.write are both refs to the same stream.write function) | |
| // returns an unhook() function, call when done intercepting | |
| module.exports = function interceptStdout(callback) { | |
| var old_stdout_write = process.stdout.write, | |
| old_console_error = console.error; |
| #!/bin/bash | |
| # @link https://gist.github.com/mattscilipoti/8424018 | |
| # | |
| # Called by "git push" after it has checked the remote status, | |
| # but before anything has been pushed. | |
| # | |
| # If this script exits with a non-zero status nothing will be pushed. | |
| # | |
| # Steps to install, from the root directory of your repo... |
Create the app and download the necessary dependencies.
| //Is Node.js reporting warning messages like this?: | |
| // | |
| // "Warning: Possible EventEmitter memory leak detected. 11 wakeup listeners added. Use emitter.setMaxListeners() to increase limit" | |
| // | |
| //The following code will intercept calls to addListener() and on() and print the type of event and generate an Error exception | |
| //With a stack trace to help you find the cause | |
| var EventEmitter = require('events').EventEmitter; | |
| const originalAddListener = EventEmitter.prototype.addListener; |
| create database price_history_db | |
| CREATE CONTINUOUS QUERY "cq_1m" ON "price_history_db" BEGIN SELECT MIN(price) as low, MAX(price) as high, FIRST(price) as open, LAST(price) as close, SUM(size) as volume INTO "price_1m" FROM "trade" GROUP BY time(1m), symbol END | |
| CREATE CONTINUOUS QUERY "cq_5m" ON "price_history_db" BEGIN SELECT MIN(low) as low, MAX(high) as high, FIRST(open) as open, LAST(close) as close, SUM(volume) as volume INTO "price_5m" FROM "price_1m" GROUP BY time(5m), symbol END | |
| CREATE CONTINUOUS QUERY "cq_15m" ON "price_history_db" BEGIN SELECT MIN(low) as low, MAX(high) as high, FIRST(open) as open, LAST(close) as close, SUM(volume) as volume INTO "price_15m" FROM "price_5m" GROUP BY time(15m), symbol END | |
| CREATE CONTINUOUS QUERY "cq_1h" ON "price_history_db" BEGIN SELECT MIN(low) as low, MAX(high) as high, FIRST(open) as open, LAST(close) as close, SUM(volume) as volume INTO "price_1h" FROM "price_15m" GROUP BY time(1h), symbol END | |
| CREATE CONTINUOUS QUERY "cq_6h" ON "price_history_db" BEGIN SELECT |
| Prefix | Description | Notes | |
|---|---|---|---|
| ac_ | Platform Client ID | Identifier for an auth code/client id. | |
| acct_ | Account ID | Identifier for an Account object. | |
| aliacc_ | Alipay Account ID | Identifier for an Alipay account. | |
| ba_ | Bank Account ID | Identifier for a Bank Account object. | |
| btok_ | Bank Token ID | Identifier for a Bank Token object. | |
| card_ | Card ID | Identifier for a Card object. | |
| cbtxn_ | Customer Balance Transaction ID | Identifier for a Customer Balance Transaction object. | |
| ch_ | Charge ID | Identifier for a Charge object. | |
| cn_ | Credit Note ID | Identifier for a Credit Note object. |
| Custom Object with the following fields: | |
| * Apex_Class_Name__c - Text(255) | |
| * Params__c - Long Text Area(131072) | |
| * Status__c - Picklist (New, Enqueued, Error) | |
| * Async_Apex_Job_Id__c - Text(18) (Unique Case Insensitive) | |
| * Error_Message__c - Long Text Area(32768) |