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.
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
module.exports = Batch | |
function Batch(sync) { | |
if(!(this instanceof Batch)) { | |
return new Batch(sync) | |
} | |
this.jobs = [] | |
this.sync = sync | |
this.frame = null |
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
diff --git a/lib/filters/add.js b/lib/filters/add.js | |
index 44d3f99..2c22e8a 100644 | |
--- a/lib/filters/add.js | |
+++ b/lib/filters/add.js | |
@@ -1,12 +1,21 @@ | |
var through = require('through') | |
-module.exports = function(num) { | |
- console.log(num) | |
- num = +num |
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
#!/bin/sh | |
# | |
# Simply prepends the branch name to every commit message | |
branch=$(git rev-parse --abbrev-ref HEAD) | |
if [ $branch != 'master' ] && [ $branch != 'HEAD' ]; then | |
echo "[$branch] `cat $1`" > $1 | |
fi |
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
function request(method, path, body, headers, ready) { | |
var xhr = new XMLHttpRequest | |
, zone | |
if(typeof headers === 'function') { | |
ready = headers | |
headers = {} | |
} else if(typeof body === 'function') { | |
ready = body | |
body = null |
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
function to_bytes(str) { | |
var arr = [] | |
, byte_count | |
, padding | |
, binary | |
, prefix | |
, bytes | |
, code | |
for(var i = 0, len = str.length; i < len; ++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
<html> | |
<head> | |
</head> | |
<body> | |
lat:<input type="text" name="lat" value="45.52578"><br> | |
lon:<input type="text" name="lon" value="-122.683672"><br> | |
<img src=""> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> | |
<script type="text/javascript"> |
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 Application = require('./application') | |
, User = compound.models.User; | |
var UserController = module.exports = function UserController(init) { | |
Application.call(this, init); | |
init.before(loadUser, { | |
only: ['show', 'edit', 'update', 'destroy'] | |
}); | |
}; |
NewerOlder