type Query {
posts(page: Int): [Post!]!
}
type Post {
author: User
title: String
class Error1() extends Error {
error1Prop = 'error 1'
}
class Error2() extends Error {
error2Prop = 'error 2'
}
builder.queryField('example', (t) => t.int({
This is a rough overview of a new API for the auth plugin. This will be a breaking change, which will likely coincide with a 2.0 release (possibly for both the plugin and core).
Method and property names, and associated terminology is all placeholder, this version is mostly to cover use cases, and integration points.
I hereby claim:
- I am hayes on github.
- I am hayes (https://keybase.io/hayes) on keybase.
- I have a public key whose fingerprint is B25D 216F 1F76 4EDB E42A 8852 E7F0 12B4 D53D 1962
To claim this, I am signing this object:
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 scoped = require('scoped') | |
var falafel = require('falafel') | |
function shim(code, done) { | |
falafel(code, scoped(wrap)) | |
function wrap(scope) { | |
var vars = scope.vars | |
var out = 'var global = module.exports;\n(function(' + vars.join(', ') + ') {\n' | |
out += code + ';\n' |
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
www(null, '', 'nrnpm') | |
unpm.middleware.push(docs) | |
unpm.server.listen(instance.port) | |
function docs(respond, matched, unpm, next) { | |
var headers = respond.req.headers | |
var route | |
var acceptable = headers.accept && headers.accept.match(/image|(text\/(?:html|css))/) | |
var tarball = respond.req.url.match(/\.tgz$/i) |
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 run = require('jsdom-eval') | |
function(js, html, stdout, stderr) { | |
run(js, html, function(data) { | |
(data.method === 'error' ? stderr : stdout).write(data.message) | |
}) | |
} |
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 document = require('dom-lite').document | |
var specificity = require('specificity') | |
var cssauron = require('cssauron') | |
var css = require('cssauron')({ | |
tag: 'tagName', | |
contents: 'innerText', | |
id: 'id', | |
class: 'className', | |
parent: 'parentNode', |
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 fs = require('fs') | |
var http = require('http') | |
var count = 0 | |
// using fs.createWriteStream directly will cause massive memory and cpu ussage | |
// var log = fs.createWriteStream('test.log') | |
// if you want to make your computer feel bad, replace this with the line above | |
var log = new Logger('test.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 fs = require('fs') | |
var stream = fs.createWriteStream('test_log.log', {flags: 'w+'}) | |
var buf = new Buffer('im just a little string, log me out and watch mem grow\n', 'utf8') | |
var start = Date.now() | |
function log() { | |
for(var i = 0; i < 1000; i++) { | |
stream.write(buf) | |
} | |
console.log(process.memoryUsage()) |
NewerOlder