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
/** | |
* NodeJS logger with datetime stamp just because. | |
* =============================================== | |
* | |
* Hold onto your socks now. | |
* | |
* Usage example | |
* var logger = new (require('./logger'))().log; | |
* var prefixedLogger = new (require('./logger'))('[PREFIX]').log; | |
* |
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
var Arango = require('arangojs'); | |
var async = require('async'); | |
var db = Arango.Connection(); | |
var testDate = 1406881769977; // Fri Aug 01 2014 08:29:29 GMT+0000 | |
var dateDelta = 500000; | |
var data = []; | |
var edgesData = []; | |
var createdDocuments = []; |
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
var Arango = require('arangojs'); | |
var async = require('async'); | |
var db = Arango.Connection(); | |
var testDate = 1406881769977; // Fri Aug 01 2014 16:29:29 GMT+0800 (SGT) | |
var dateDelta = 500000; | |
var data = []; | |
var edgesData = []; | |
var createdDocuments = []; |
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
'use strict'; | |
// simple express server | |
var express = require('express'); | |
var app = express(); | |
var router = express.Router(); | |
app.use(express.static('public')); | |
app.get('/', function(req, res) { | |
res.sendfile('./public/index.html'); |
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
go list -f '{{.Deps}}' | tr "[" " " | tr "]" " " | xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}' |
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
/* | |
A pure ES6-style composable React component that handles clicks outside of a HTML node. | |
This is for those who prefers composibility over mixins. | |
Simply drop-in the event listener component into your React component. | |
Adapted from: https://github.com/Pomax/react-onclickoutside | |
*/ | |
var React = require('react'); |
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
// | |
// In GraphQL's type system shorthand notation. | |
// (See: http://graphql.org/docs/typesystem) | |
// | |
type Query { | |
latestPost: String | |
} |
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
package main | |
import ( | |
"github.com/graphql-go/graphql" | |
) | |
var queryType = graphql.NewObject(graphql.ObjectConfig{ | |
Name: "Query", | |
Fields: graphql.Fields{ | |
"latestPost": &graphql.Field{ |
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
package main | |
import ( | |
"net/http" | |
"github.com/graphql-go/graphql" | |
"github.com/graphql-go/graphql-go-handler" | |
) | |
var queryType = graphql.NewObject(graphql.ObjectConfig{ | |
// ... |
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
{ | |
"data": { | |
"latestPost": "Hello World!" | |
} | |
} |
OlderNewer