View google-sheet-to-json.js
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
/** | |
* Simple Node.js script to turn a specific page on a Google Sheet | |
* into a JSON object for the main purpose of HTML Templating. | |
* | |
* @author jonobr1 / http://jonobr1.com | |
* | |
*/ | |
var https = require('https'); | |
var path = require('path'); |
View installer.js
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
/** | |
* If there are service workers available to us, then on window load we can register our worker | |
*/ | |
'serviceWorker' in navigator && window.addEventListener('load', () => { | |
navigator.serviceWorker.register('worker.js') | |
.then(() => { | |
// Registration was successful | |
console.log('ServiceWorker registration successful!'); | |
}, (err) => { | |
// registration failed :( |
View readability-hack.js
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 document; | |
var dbg = (typeof console !== 'undefined') ? function(s) { | |
console.log("Readability: " + s); | |
} : function() {}; | |
/* | |
* Readability. An Arc90 Lab Experiment. | |
* Website: http://lab.arc90.com/experiments/readability | |
* Source: http://code.google.com/p/arc90labs-readability |
View chunkify.js
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
/** | |
* Chunkify | |
* Google Chrome Speech Synthesis Chunking Pattern | |
* Fixes inconsistencies with speaking long texts in speechUtterance objects | |
* Licensed under the MIT License | |
* | |
* Peter Woolley and Brett Zamir | |
*/ | |
var speechUtteranceChunker = function (utt, settings, callback) { |
View videojs-plugin-events-logger.js
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
// The events are from https://www.w3.org/TR/html5/semantics-embedded-content.html#media-elements-event-summary | |
import videojs from 'video.js' | |
const Plugin = videojs.getPlugin('plugin') | |
const EVENTS = [ | |
'loadstart', | |
'progress', | |
'suspend', | |
'abort', | |
'error', |
View index.html
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
<div> | |
<vm-player | |
theme="dark" | |
style="--vm-player-theme: #e86c8b;" | |
> | |
<vm-video | |
cross-origin | |
poster="https://media.vimejs.com/poster.png" | |
> | |
<source |
View getvideotype.js
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
/**************************** AUTOMATICALLY GET AND SET AUDIO & VIDEO TYPE ******************************/ | |
const rtmp_suffix = /^rtmp:\/\//; | |
const hls_suffix = /\.m3u8/; | |
const mp4_suffix = /\.(mp4|m4p|m4v|mov)/i; | |
const hds_suffix = /\.f4m/; | |
const dash_suffix = /\.mpd/; | |
const flv_suffix = /\.flv/; | |
const webm_suffix = /\.webm/; | |
/* AUDIO */ | |
//const mp3_suffix = /\.mp3/; |
View getvideotype.js
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 getType(url) { | |
switch (true) { | |
/* AUDIO */ | |
case /\.(mp4|m4p|m4v|mov)/i.test(url): | |
return 'video/mp4'; | |
break; | |
/* VIDEO */ | |
case /\.ogg/.test(url): | |
return 'video/ogg'; |
View githack.js
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
javascript:(function() { | |
"use strict"; | |
var TEMPLATES = [ | |
[/^(https?):\/\/gitlab\.com\/([^\/]+\/[^\/]+)\/(?:raw|blob)\/(.+\..+?)(?:\?.*)?$/i, '$1://gl.githack.com/$2/raw/$3'], | |
[/^(https?):\/\/bitbucket\.org\/([^\/]+\/[^\/]+)\/(?:raw|src)\/(.+\..+?)(?:\?.*)?$/i, '$1://bb.githack.com/$2/raw/$3'], | |
[/^(https?):\/\/bitbucket\.org\/snippets\/([^\/]+\/[^\/]+)\/revisions\/([^\/\#\?]+)(?:\?[^#]*)?(?:\#file-(.+\..+?))$/i, '$1://bb.githack.com/!api/2.0/snippets/$2/$3/files/$4'], | |
[/^(https?):\/\/bitbucket\.org\/snippets\/([^\/]+\/[^\/\#\?]+)(?:\?[^#]*)?(?:\#file-(.+\..+?))$/i, '$1://bb.githack.com/!api/2.0/snippets/$2/HEAD/files/$3'], | |
[/^(https?):\/\/bitbucket\.org\/\!api\/2.0\/snippets\/([^\/]+\/[^\/]+\/[^\/]+)\/files\/(.+\..+?)(?:\?.*)?$/i, '$1://bb.githack.com/!api/2.0/snippets/$2/files/$3'], | |
[/^(https?):\/\/api\.bitbucket\.org\/2.0\/snippets\/([^\/]+\/[^\/]+\/[^\/]+)\/files\/(.+\..+?)(?:\?.*)?$/i, '$1://bb.githack.com/!api/2.0/snippets/$2/files/$3'], | |
[/^( |
View gist:91b95ef8158c0b88c55522f17c745bb5
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
{ "categories" : | |
[ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", |
NewerOlder