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 | |
function pascal($depth) | |
{ | |
if (!is_int($depth) || $depth < 1) | |
return array(); | |
if ($depth === 1) | |
return array(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
// core deps | |
const EOL = require('os').EOL; | |
// 3rd party deps | |
const debug = require('debug'); | |
const bunyan = require('bunyan'); | |
const colors = require('colors/safe'); | |
const lrucache = require('lru-cache'); | |
const padEnd = require('lodash/padEnd'); |
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
// Bunyan AMQP Stream Transport for ES6 | |
'use strict'; | |
// 3rd party deps | |
const AMQP = require('amqplib/callback_api'); | |
const stringify = require('json-stringify-safe'); | |
const mydebug = require('debug')('bunyan:amq'); | |
// our deps | |
const genTopic = require('./gentopic'); // used to generate a RabbitMQ topic/routing-key |
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
{ "oneOf" : [ | |
{ "type" : "null" }, | |
{ "type" : "string" }, | |
{ "type" : "array", "items": { "type" : "string" } } | |
] } |
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
/*********************************************************************************************************************** | |
* MAKE REQUEST WITH HMAC TO API | |
**********************************************************************************************************************/ | |
const fs = require('fs'); | |
const http = require('https'); | |
const Hmmac = require('hmmac'); | |
const USER = process.env.HMAC_USER || '<username>'; | |
const SECRET = process.env.HMAC_SECRET || '<secret>'; | |
const SIGNED_HEADERS = process.env.HMAC_SIGNED_HEADERS || 'accept,date,host'; |