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
// Get a reference to the player | |
var myPlayer = videojs("S1LnMbpBz"), | |
options = {}; | |
// +++ Define the playback rate options +++ | |
options = { playbackRates: [0.5, 0.75, 1, 1.25, 1.5, 2] }; | |
// +++ Turn off the default source order +++ | |
if (Array.isArray(options.playbackRates)) { | |
// Set sourceOrder to false - this means old browsers that support HLS in Flash but not HTML5/MSE will use MP4. |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 \ | |
--verbose \ | |
--request OPTIONS \ | |
https://academic-dev1.cloud.thingworx.com/Thingworx/Things/testingCORS/Properties/test \ | |
--header 'Origin: http://localhost:3000' \ | |
--header 'appKey: 29506e99-bca6-4522-b60e-55bd891716f7' \ | |
--header 'Access-Control-Request-Headers: Origin, Accept, Content-Type' \ | |
--header 'Access-Control-Request-Method: GET' |
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
a, a:link, a:visited, a:focus, a:active { | |
color: #ffffff; | |
text-decoration: none; | |
} |
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 propertyList = JSON.parse(newProject.dataConfig); | |
//Loop through the list types of data | |
for(key in propertyList) { | |
//Loop through the properties in each type of data | |
for(prop in propertyList[key]) { | |
result = propertyList[key][prop].propType; | |
} | |
} |
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
.factory('$localStorage', ['$window', function($window) { | |
return { | |
store: function(key, value) { | |
$window.localStorage[key] = value; | |
}, | |
get: function(key, defaultValue) { | |
return $window.localStorage[key] || defaultValue; | |
}, | |
storeObject: function(key, value) { | |
$window.localStorage[key] = JSON.stringify(value); |
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
.run(function($ionicPlatform, $rootScope, $ionicLoading) { | |
$ionicPlatform.ready(function () { | |
// Hide the accessory bar by default (remove this to show the accessory bar above the keyboard | |
// for form inputs) | |
if (window.cordova && window.cordova.plugins.Keyboard) { | |
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); | |
cordova.plugins.Keyboard.disableScroll(true); | |
} | |
if (window.StatusBar) { |
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 express = require('express'); | |
var morgan = require('morgan'); | |
var hostname = 'localhost'; | |
var port = 3000; | |
var app = express(); | |
app.use(morgan('dev')); |
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 express = require('express'); | |
var bodyParser = require('body-parser'); | |
var mongoose = require('mongoose'); | |
var Dishes = require('../models/dishes'); | |
var dishRouter = express.Router(); | |
dishRouter.use(bodyParser.json()); | |
dishRouter.route('/') |
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 assert = require('assert'); | |
exports.insertDocument = function(db, document, collection, callback) { | |
// Get the documents collection | |
var coll = db.collection(collection); | |
// Insert some documents | |
coll.insert(document, function(err, result) { | |
assert.equal(err, null); | |
console.log("Inserted " + result.result.n + " documents into the document collection " | |
+ collection); |
NewerOlder