This file contains hidden or 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 s = document.createElement("script"); | |
s.type = "text/javascript"; | |
s.src = "https://raw.githubusercontent.com/fczbkk/css-selector-generator/master/build/css-selector-generator.min.js"; | |
$("head").append(s); |
This file contains hidden or 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
this.props | |
.saveSession(this.titleContent.id, this.props.deviceId, true) | |
.then(response => { | |
const initialSeekTime = response.payload.data.seconds | |
this.props.fetchUpFrontAuthToken(this.titleContent.segments[0].mediaKey, this.props.patronInfo.patron.id, this.titleContent.circId) | |
.then(response => { | |
this.initializePlayer(this.props.patronInfo.patron.id, this.titleContent.circId, response.payload.data, config.castlabsWidevineUrl, config.castlabsPlayReadyUrl, initialSeekTime) | |
}) | |
}) |
This file contains hidden or 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
"use strict"; | |
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } | |
function _toArray(arr) { return Array.isArray(arr) ? arr : Array.from(arr); } | |
var _flatten = function _flatten(_ref) { | |
var _ref2 = _toArray(_ref), | |
zeroIndex = _ref2[0], | |
rest = _ref2.slice(1); |
This file contains hidden or 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
const express = require('express') | |
const app = express() | |
const jsData = require('js-data') | |
const jsDataExpress = require('js-data-express') | |
const store = new jsData.Container() | |
const MongoDBAdapter = require('js-data-mongodb') | |
const adapter = new MongoDBAdapter.MongoDBAdapter({debug: false, uri:'mongodb://localhost:27017/my-dev-db'}) | |
store.registerAdapter('mongodb', adapter, { default: true }) |
This file contains hidden or 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
### js-data-express#Mount | |
`mount()` will setup routes in the Express instance passed in as the first | |
argument and expects a js-data store as the second arg, `mount(app, store)`. The endpoints will be reachable for each resource, `Mapper.endpoint` or `Mapper.name` (ie: `GET /user`). You can prefix the endpoints by passing a third arguement, `mount(app, store, '/api')`. | |
*`queryParser` is added to the endpoints when using `mount()`* | |
### js-data-express#Router | |
`new Router(store).router` will be an Express router instance that can be dropped |
This file contains hidden or 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
/** | |
* ActivityType.js | |
* | |
* | |
* | |
* ****** NOTE - Seed Data / Default DB Data ******* | |
* On server/app lift, there are default activity types loaded into the database. | |
* 1. model's are assigned a key `seedData` of the data to be inserted to dB | |
* and this data is available in the global `Model`.seedData | |
* 2. config/models.js has custom methods that are attached to all models on server |
This file contains hidden or 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
/** | |
* Browserify files | |
*/ | |
module.exports = function(grunt) { | |
grunt.config.set('browserify', { | |
dist: { | |
files: { | |
// ingores browserify on all files in /dependencies |
This file contains hidden or 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
"dependencies": { | |
"babelify": "^6.3.0", | |
"bcrypt": "^0.8.5", | |
"captains-log": "^0.11.11", | |
"connect-redis": "3.0.2", | |
"cookie": "^0.2.3", | |
"ejs": "~0.8.4", | |
"error-shelter": "^0.1.3", | |
"event-sky": "^0.1.3", | |
"grunt": "0.4.2", |
This file contains hidden or 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
/** | |
* HTTP Server Settings | |
* (sails.config.http) | |
* sails_project/config/http.js | |
* | |
* Sails.js v.11.* | |
*/ | |
module.exports.http = { |
This file contains hidden or 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
/* | |
This will create a file and trigger a download for the user. | |
*/ | |
var a = window.document.createElement('a'); | |
a.href = window.URL.createObjectURL(new Blob(['This is the text in the file..'], {type: 'text/html'})); | |
a.download = 'filename_test.html'; | |
// Append anchor to body. | |
document.body.appendChild(a) |