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
uuid = require('./uuid') | |
merge = require('merge') | |
###* | |
# Renderable - Constructs a rederable object. | |
# | |
# @param {htmlElement} parent the parent element that the template needs to be rendered into. | |
# @param {handlebars_template} template a precompiles handlebars template | |
# @return {this} | |
### | |
Renderable = (parent, template, model) -> |
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 (duration, format) { | |
//Setup time | |
var hours = duration.hours(), | |
minutes = duration.minutes(), | |
seconds = duration.seconds(); | |
//Iterate the format | |
formatStr = format; | |
//Replace format keys | |
formatStr = formatStr.replace(/hh:/, hours > 0 ? hours + ":" : ''); | |
formatStr = formatStr.replace(/mm:/, minutes > 0 ? minutes + ":" : ''); |
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
//Define your route | |
.config(['$routeProvider', function ($routeProvider) { | |
$routeProvider.when('/private', { | |
templateUrl: 'privatePage.html', | |
controller: 'PrivateCtrl as ctrl', | |
requireLogin: true //Here is the extra attrbute | |
}); | |
}]) | |
// Where AuthService is your user / authentication service |
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 array_replace_uwalk($array1, $array2, $callbackArray) | |
{ | |
$result = $array1; | |
array_walk($result, function (&$array1Item, $key) use ($array2, $callbackArray) | |
{ | |
$array2Item = $array2[$key]; | |
if (is_array($array1Item) && is_array($array1Item)) | |
{ | |
$array1Item = array_replace_uwalk($array1Item, $array2Item, $callbackArray); | |
}else{ |
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
//Each one of these sections are places in different files being smashed together via babel/webpack. E2015 -> ES5 + PolyFill | |
//APP level route | |
$stateProvider | |
.state('app', { | |
url: '/', | |
templateUrl: 'app/app.html', | |
controller: 'AppController', | |
controllerAs: 'app', | |
resolve: { |
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
curl 'https://intake.opbeat.com/api/v1/organizations/0e9e5728c4ad4cbb8f0e0048201b9504/apps/23cd35d823/client-side/errors/' -H 'Origin: http://localhost:3000' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36' -H 'Content-Type: application/json' -H 'Accept: */*' -H 'Referer: http://localhost:3000/' -H 'Connection: keep-alive' -H 'x-opbeat-client: opbeat-js/v1.2.3' --data-binary $'{"message":"SecurityError: Failed to set the \'domain\' property on \'Document\': \'bethel.tv\' is not a suffix of \'localhost\'.","culprit":"app/app.module.js","exception":{"type":"SecurityError","value":"Failed to set the \'domain\' property on \'Document\': \'bethel.tv\' is not a suffix of \'localhost\'."},"http":{"url":"http://localhost:3000/"},"stacktrace":{"frames":[{"filename":"bower_components/angular/angular.js","lineno":29013,"colno":5,"function":"<anonymous>","abs_p |
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
import {Pipe, PipeTransform} from 'angular2/core'; | |
import {Observable} from 'rxjs/Observable'; | |
import * as R from 'ramda'; | |
@Pipe({ | |
name: 'messages' | |
}) | |
/** | |
* Take an object that is key value id message and convert it to a array of ChatMessage throwing the id in the message. | |
*/ | |
export class MessagesPipe implements PipeTransform { |
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
import {Component, ViewEncapsulation, ElementRef, Inject, EventEmitter, Output, ViewChild} from 'angular2/core'; | |
import {Input} from 'angular2/core'; | |
import {ChangeDetectionStrategy} from 'angular2/core'; | |
import {DatePipe} from 'angular2/common'; | |
import {PlayerDurationPipe} from './playerDurationPipe'; | |
import {Observable} from 'rxjs/Observable'; | |
import {Subject} from 'rxjs/Subject'; | |
import {Action} from '@ngrx/store'; | |
import {FilmStrip} from './filmStrip/filmStrip'; | |
export interface ScrubberHoverEvent { |
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
import * as braintree from 'braintree-web'; | |
import {Subject} from 'rxjs/Subject.js'; | |
import 'rxjs/add/operator/do.js'; | |
import 'rxjs/add/operator/filter.js'; | |
import 'rxjs/add/operator/map.js'; | |
import 'rxjs/add/operator/publish.js'; | |
/** | |
* Abstract the setup of briantree hosted fields to simply give the form what it needs. | |
* @param $http | |
* @param $q |
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 flatten(arrInput) { | |
if(arrInput.length < 1 || !arrInput) return []; | |
var arr = []; | |
arrInput.map(function(e, index){ | |
if(Array.isArray(e)) arr= arr.concat(flatten(e)); | |
else arr.push(e); | |
}); | |
return arr; | |
} |
OlderNewer