Skip to content

Instantly share code, notes, and snippets.

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <libgen.h>
#include <vector>
#include <string>
using namespace std;
int main(int argc, char **argv)
Module ID	Full Path	Identity Path	Size (bytes)
0	./~/react/react.js	~/react/react.js	48
1	./~/prop-types/index.js	~/prop-types/index.js	38
2	./~/babel-polyfill/~/core-js/modules/_export.js	~/core-js/modules/_export.js	478
3	./~/babel-runtime/helpers/extends.js	~/babel-runtime/helpers/extends.js	282
4	./~/babel-runtime/helpers/classCallCheck.js	~/babel-runtime/helpers/classCallCheck.js	150
5	./~/classnames/index.js	~/classnames/index.js	571
6	./~/babel-runtime/helpers/inherits.js	~/babel-runtime/helpers/inherits.js	488
7	./~/babel-runtime/helpers/possibleConstructorReturn.js	~/babel-runtime/helpers/possibleConstructorReturn.js	320
@jchip
jchip / hapi-request.js
Created April 25, 2017 21:00
hapi request snip
internals.Request = function (connection, req, res, options) {
Podium.call(this, ['finish', { name: 'peek', spread: true }, 'disconnect']);
// Take measurement as soon as possible
@jchip
jchip / profile-hapi.md
Created April 25, 2017 20:57
profile hapi
[JavaScript]:
   ticks  total  nonlib   name
    291    1.9%    1.9%  Stub: LoadICStub
    162    1.1%    1.1%  KeyedLoadIC: A keyed load IC from the snapshot
     93    0.6%    0.6%  LazyCompile: ~finish /home/NodeRestPerfTest2/node_modules/hapi/node_modules/joi/lib/any.js:442:24
     90    0.6%    0.6%  Builtin: CallFunction_ReceiverIsNotNullOrUndefined
     82    0.5%    0.5%  LazyCompile: *_base /home/NodeRestPerfTest2/node_modules/hapi/node_modules/joi/lib/object.js:30:10
     75    0.5%    0.5%  Builtin: ArgumentsAdaptorTrampoline
     71    0.5%    0.5%  Stub: FastArrayPushStub
@jchip
jchip / debug.md
Last active March 25, 2017 03:30
webpack 2 debug
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'default' of undefined
(node:80169) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'default' of undefined
Hash: ea738e100b7f7e2c7482
Version: webpack 2.3.2
Time: 156ms
            Asset     Size  Chunks             Chunk Names
@jchip
jchip / makeSimpleLogger.js
Created March 14, 2017 03:12
makeSimpleLogger
function makeSimpleLogger() {
const levels = ["verbose", "info", "warn", "debug"];
const tags = levels.reduce((a, l) => (a[l] = l.toUpperCase(), a), {});
function log(tag, args) {
args = Array.prototype.concat.apply([`${tags[tag]}:`], args);
if (console[tag]) {
console[tag].apply(console, args);
} else {

Steps to update changelog and publish

Update Changelog

Update the tag below to the last Publish tag and run it to get a list of the changes

export tag="[email protected]"
git log ${tag}...${HEAD} --pretty=format:'  - [commit](http://github.com/electrode-io/electrode/commit/%H) %s' --reverse | grep -v "Merge pull request"
"use strict";
var clsModule = require("continuation-local-storage");
const superagent = require("superagent");
const assert = require("assert");
var http = require("http");
var keepAlive = process.env.KEEP_ALIVE !== "0";
var httpAgent = new http.Agent({
keepAlive: keepAlive,
#
# http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x405.html
#
#
# usage: xtput <option1> <option2> ...
#
# <option>:
# fc:<color> = set foreground to <color> (ANSI escape)
# bc:<color> = set background to <color> (ANSI escape)