flowchart TB
start{Response is OK\n& complete?}
start-->|Yes|ok1[no log needed]
start-->|No|isclienterror{problem with input\ni.e. client error?}
isclienterror-->|Yes|warnclienterror[log warning]
isclienterror-->|No|blocksfunctionality{does this break\nuser experience?}
warnclienterror-.->m3Metric[Consider adding an M3 metric\nwith an associated alert]
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 Promise from 'bluebird'; | |
import {readFiles} from 'node-dir'; | |
import {l} from './util'; | |
/** | |
* @param {String} root path | |
* @param {Object} options see: https://www.npmjs.com/package/node-dir | |
* @return {Promise<String[]>} | |
*/ | |
export default function getFiles(root, options){ |
This is a little in-terminal
Please remember it's a simulation and take it with a grain of salt. 😄
- clone this gist:
git clone https://gist.github.com/Sequoia/94d192908e05f7674423 eventloop-simulation
cd eventloop-simulation
Type: Bug 🐞 || Feature 🚀
- 🏷 JIRA Ticket: EXP-
- 🚩 Feature Flag:
(one sentence summary)
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
// Key Value Server | |
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
"encoding/json" | |
"sync" | |
"strings" |
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
#include <unistd.h> | |
#include <node.h> | |
#include <string.h> | |
#include <v8.h> | |
using namespace v8; | |
unsigned long long count = 0; | |
// native blocking/compute intensive function |
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
const Rx = require('rxjs'); | |
const debug = require('debug'); | |
const chokidar = require('chokidar'); | |
const dirWatcher = chokidar.watch('./_data/*.md'); | |
const readFile = require('fs').readFile; | |
const readFileAsObservable = Rx.Observable.bindNodeCallback(readFile); | |
const newFiles = Rx.Observable.fromEvent(dirWatcher, 'add'); |
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
{ | |
"$schema" : "http://json-schema.org/draft-04/schema#", | |
"id": "https://gist.githubusercontent.com/Sequoia/d86032bff4413759c2f27e9cf852817b/raw/demo-schema.json", | |
"title": "More than one type", | |
"description": "This schema has a single property with multiple types", | |
"definitions" : { | |
"specialString" : { | |
"type" : "string", | |
"description": "(3) The String One!", | |
"enum" : ["yes", "no", "maybe"] |
NewerOlder