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
/** | |
* Detect browser type and version by parsing browser's UA string. | |
* | |
* Based on https://stackoverflow.com/posts/5918791/revisions | |
* References: | |
* 1. https://social.msdn.microsoft.com/Forums/vstudio/en-US/ae715fd2-1ddd-46f7-8c26-9aed6b2103f1 | |
* 2. https://en.wikipedia.org/wiki/Trident_(layout_engine) | |
* | |
* @return an Array with 3 elements: [type, simulated major-version, actual major-version] | |
*/ |
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
#!/bin/bash | |
# Create an Iframe index from HLS segmented streams | |
# $1: Filename to be created | |
# $2: Location of segmented ts files | |
# Check how many arguments | |
if [ $# != 2 ]; then | |
echo "Usage: $0 [Input filename] [Location of segmented streams]" | |
exit 1; | |
fi |
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 async = require('async') | |
var _ = require('underscore') | |
var Helpers = function(mongoose) { | |
this.mongoose = mongoose || require('mongoose') | |
this.dropCollections = function(callback) { | |
var collections = _.keys(mongoose.connection.collections) | |
async.forEach(collections, function(collectionName, done) { | |
var collection = mongoose.connection.collections[collectionName] |