Skip to content

Instantly share code, notes, and snippets.

View robwormald's full-sized avatar

Rob Wormald robwormald

View GitHub Profile
stream: function(collectionName, options, stream) {
// options is a standard criteria/options object (like in find)
// stream.write() and stream.end() should be called.
// for an example, check out:
// https://github.com/balderdashy/sails-dirty/blob/master/DirtyAdapter.js#L247
var collection = _modelReferences[collectionName];
getQBModel(collectionName,options,function(err,model){
<?xml version="1.0" encoding="UTF-8"?>
<RestResponse xmlns="namespace"
xmlns:xdb="namespace"
xmlns:xsi="namespace"
xsi:schemaLocation ="xsd">
<TimeActivities>
<TimeActivity>
<Id idDomain="QB">1718</Id>
<SyncToken>1</SyncToken>
<MetaData>
//json array..
[
{
"url" : "what-are-we-doing-it-for",
"layout": "_layout",
"title": "What Are We Doing It For?",
"date": "16 Dec 2013",
"tags": ["entrepreneurship", "philosophy"],
"desc": "A common thought out there is that potentially 'unproductive' activities such as surfing the Internet, gaming, and reading should be avoided in favor of productive work. I'd like to challenge that assumption."
innitApp.factory('TimeLog',function(Restangular){
var TimeLog = Restangular.all('timelog')
return {
var appRootState = {
name: 'app',
url: '/',
templateUrl : '/templates/innit.app.home.html'
}
var employeesRoot = {
name: 'employees',
url: '/employees',
// ../api/auth/methods.js
exports.basicAuth = passport.authenticate('basic',{session : false})
//../api/auth/passport.js
passport.use(new BasicStrategy(
function(username, password, done) {
done(null,{id : 1, username : 'somefakeusername'})
}
[
{
"id": "1",
"title": "This is a title",
"description": "This is a description"
},
{
"id": "2",
"title": "Hello",
var passport = require('passport'),
oauth2orize = require('oauth2orize'),
jwtBearer = require('oauth2orize-jwt-bearer').Exchange,
login = require('connect-ensure-login'),
utils = require('../innitUtils.js');
module.exports = {
express: {
customMiddleware: function(app)
{
//view
<input ng-model="newPost.name"
//new post object
$scope.newPost = {}
//pass the newPost object into the factory
$scope.sendPost = PostFactory.create($scope.newPost)
var uuid = require('node-uuid')
module.exports = {
connection : 'mcguffy_mccloud2',
//tableName : 'time_log_dev',
migrate : 'alter',
attributes: {
id : {