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
# Sample DATABASE_URL = dbms://username:password@hostname:port/dbname | |
DB_PROTOCOL=$(echo $DATABASE_URL | cut -d':' -f1) | |
DB_DETAILS=$(echo $DATABASE_URL | cut -d'/' -f3) | |
DB_NAME=$(echo $DATABASE_URL | cut -d'/' -f4) | |
HOST_NAME=$(echo $DB_DETAILS | cut -d'@' -f2 | cut -d':' -f1) | |
PORT=$(echo $DB_DETAILS | cut -d'@' -f2 | cut -d':' -f2) | |
USER_NAME=$(echo $DB_DETAILS | cut -d'@' -f1 | cut -d':' -f1) | |
PASSWORD=$(echo $DB_DETAILS | cut -d'@' -f1 | cut -d':' -f2) | |
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
/** | |
* @license | |
* Video.js 7.6.6 <http://videojs.com/> | |
* Copyright Brightcove, Inc. <https://www.brightcove.com/> | |
* Available under Apache License Version 2.0 | |
* <https://github.com/videojs/video.js/blob/master/LICENSE> | |
* | |
* Includes vtt.js <https://github.com/mozilla/vtt.js> | |
* Available under Apache License Version 2.0 | |
* <https://github.com/mozilla/vtt.js/blob/master/LICENSE> |
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
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |
OlderNewer