Each config gets called with:
var mod = require(conf.directory);
if ( conf.crud ) {
methodMixins(mod, conf);
}
app.use(mount('/api/v1', Resource(conf.name, mod).middleware()));
function ExtractThumb($in, $out) { | |
$thumb_stdout; | |
$errors; | |
$retval = 0; | |
// Delete the file if it already exists | |
if (file_exists($out)) { unlink($out); } | |
// Use ffmpeg to generate a thumbnail from the movie | |
$cmd = "ffmpeg -i $in -ss 00:00:01 -f image2 -vframes 1 -s 300x200 $out"; | |
exec($cmd, $thumb_stdout, $retval); | |
// Queue up the error for processing |
function runAlongFolks ( init, iter, deviation ) { | |
var n = init || 150, | |
arr = []; | |
for ( var i = 0; i < iter; i++ ) { | |
var a = Math.floor(Math.random() * (deviation - (-deviation) + 1)) - deviation; | |
arr.push(n); | |
n += a; | |
} |
Each config gets called with:
var mod = require(conf.directory);
if ( conf.crud ) {
methodMixins(mod, conf);
}
app.use(mount('/api/v1', Resource(conf.name, mod).middleware()));
✓ should POST new records | |
mocha:runner run suite Acceptance :: Resource :: Payment Method GET /payment-methods/:id +1ms | |
GET /payment-methods/:id | |
koa:application use responseTime +0ms | |
koa:application use compress +0ms | |
koa:application use bodyParser +0ms | |
koa:application use - +0ms | |
koa:application use dispatch +0ms | |
koa:application use - +0ms | |
debug: routes: bt |
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
updates: Ember.A(), | |
didReceiveAttrs () { | |
this._super(...arguments); | |
this.get('updates').pushObject('didReceiveAttrs ' + new Date()); | |
}, | |
import Ember from 'ember'; | |
import windowBinderMixin from '../mixins/window-binder'; | |
export default Ember.View.extend(windowBinderMixin, { | |
templateName: 'scroll-spy', | |
classNames: [ 'scroll-spy-view', 'affix' ], | |
// Bind the window events on view insertion | |
didInsertElement: function () { | |
this.setupWindowBindings(); |
let currentTurn = 3; | |
const players = [ | |
'you', | |
'someone', | |
'me' | |
]; | |
function logCurrentPlayer () { | |
return players[(currentTurn % players.length) - 1]; | |
} |
function getGreetingTime (m) { | |
var g = null; //return g | |
if(!m || !m.isValid()) { return; } //if we can't find a valid or filled moment, we return. | |
var split_afternoon = 12 //24hr time to split the afternoon | |
var split_evening = 17 //24hr time to split the evening | |
var currentHour = parseFloat(m.format("HH")); | |
if(currentHour >= split_afternoon && currentHour <= split_evening) { |