{
"errors": [
{
"userMessage": "Sorry, the requested resource does not exist",
"internalMessage": "No car found in the database",
"code": 34,
"more info": "http://dev.mwaysolutions.com/blog/api/v1/errors/12345"
}
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
//npm install ioredis | |
//npm install bluebird | |
//change endpoint to any two of your clusters | |
var Redis = require('ioredis'); | |
var Promise = require('bluebird'); | |
var cluster = new Redis.Cluster([{ | |
port: 30001, | |
host: '127.0.0.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
/** | |
* New Relic agent configuration. | |
* | |
* See lib/config.defaults.js in the agent distribution for a more complete | |
* description of configuration variables and their potential values. | |
*/ | |
exports.config = { | |
/** | |
* Array of application names. | |
*/ |
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
{ | |
"id": "55bab768822e034a7945a3ee", | |
"created_at": "2015-07-30T23:46:48+00:00", | |
"updated_at": "2015-07-30T23:46:55+00:00", | |
"last_updated_at": "2015-07-30T23:46:55+00:00", | |
"tracking_number": "9505510977185211034638", | |
"slug": "usps", | |
"active": true, | |
"android": [ | |
"APA91bGpwXA4hCvKy0qghtSIVF9V5OgwXkDGK-Ds0ClZIeqUS2BVWhdk5HIsue9gMXucDd2RM3ltmTDoVzxKVX5j-bspnldkr3IG-V0Je2OB5xpGyM81t6XyYEQjLQ_3luLrRyq7uS4Z" |
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
'use strict'; | |
var Number = require("./index"); | |
var DBS = require('@aftership/postmen-datastorage').dbs; | |
var RedisCache = require('@aftership/postmen-datastorage').adaptor.redis; | |
var Dynamodb = require('@aftership/postmen-datastorage').adaptor.dynamodb; | |
DBS.configStore("number", { | |
db: new Dynamodb({ | |
region: 'ap-northeast-1', |
Top 10 javascript developer in HK rated by activities
SELECT actor_attributes_email, count(*) as cnt
FROM [githubarchive:github.timeline]
where actor_attributes_location like "%Hong%" and repository_language = "JavaScript"
group by actor_attributes_email
order by cnt desc
LIMIT 10;
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
'use strict'; | |
const co = require("./co.js"); | |
const co_nothrow = require("./co-nothrow"); | |
var boom = ()=> { | |
return new Promise((resolve, reject)=>{ | |
setTimeout(()=>{ | |
reject("boom"); | |
}, 1000); |
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
'use strict'; | |
const util = require("util"); | |
let foo = {}; | |
let bar = {}; | |
foo.ref = bar; | |
bar.ref = foo; | |
console.log(JSON.stringify(foo)); |