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
// PouchDB relative dir failure gist | |
// in some dir containing this .js file, mkdir db | |
// Run 'node THIS-GIST.js' :: success! | |
// change one dir up. run 'node childdir/THIS-GIST.js' :: fail :( | |
var PouchDB = require('pouchdb'); | |
var dbRoot = './db/', | |
dbTest = new PouchDB(dbRoot + 'pouchdbDirTest'), | |
now = (new Date()).getTime().toString(); |
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
/* | |
TODO: | |
Address methods that reference other methods as '$this->doSomething()' | |
+ $this->select() Could be addressed by each class extending BaseAppData | |
+ Grep for methods defined in File 'A' that are referenced in File 'B' using $this-> | |
+ Alternatively, change all calls to '$this' to be $AppData. | |
*/ | |
var fs = require('fs'); | |
var Promise = require('es6-promise').Promise; | |
var _ = require('underscore'); |
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
// Require the lib | |
var State = require('ampersand-state'); | |
// Create a constructor to represent the state we want to store | |
var Salsa = State.extend({ | |
props: { | |
name: 'string', | |
spicy: 'integer' | |
}, | |
derived: { |
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
/* jshint -W117, -W097 */ | |
'use strict'; | |
var View = require('ampersand-view'); | |
//partials.swig["js/browserApp/ampersand/views/studySubjectTracker/main.swig"], | |
module.exports = View.extend({ | |
template: '<button data-hook="manage-trackers">mngt</button>', | |
events: { | |
'click [data-hook~=manage-trackers]': 'handleClickManageTrackers' |
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 Model = require('ampersand-model'); | |
var View = require('ampersand-view'); | |
var domready = require('domready'); | |
var MyModel = Model.extend({ | |
props: { | |
id: { | |
type: 'integer', | |
default: 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
<html> | |
<html> | |
<head> | |
<title>binding test</title> | |
<script | |
src="dist/sandbox.bundle.min.js" | |
type="text/javascript" | |
charset="utf-8"> | |
</script> | |
</head> |
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
// require() some stuff from npm (like you were using browserify) | |
// and then hit Rebuild to run it on the right | |
var Model = require('ampersand-model'); | |
var View = require('ampersand-view'); | |
var domready = require('domready'); | |
var ChildModel = Model.extend({ | |
props: { | |
id: 'integer' |
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 Model = require('ampersand-model'); | |
var View = require('ampersand-view'); | |
var domready = require('domready'); | |
var ChildModel = Model.extend({ | |
props: { | |
id: 'number' | |
} | |
}); |
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 View = require('ampersand-view'); | |
var State = require('ampersand-state'); | |
var domready = require('domready'); | |
var MyState = State.extend({ | |
props: { | |
log: '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
// require() some stuff from npm (like you were using browserify) | |
// and then hit Rebuild to run it on the right | |
var View = require('ampersand-view'); | |
var State = require('ampersand-state'); | |
var domready = require('domready'); | |
var MyState = State.extend({ | |
props: { | |
log: 'string' | |
} |
OlderNewer