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
/* | |
Note we don't need typical boilerplate here because it polyfills String.prototype | |
*/ | |
(function (global) { | |
// Taken from davidchamber's string-format | |
// https://github.com/davidchambers/string-format | |
// To use, simply: | |
// "Hello, {}".format('world'); |
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
""" | |
""" | |
import time # for sleeping | |
class App: | |
def __init__(self, stage): | |
self.stage = stage | |
def run(self): |
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 (global, Factory) { | |
global.pkg = global.pkg || {}; | |
global.pkg.contextManager = function () { return Factory.apply(Factory, arguments); } | |
})(this, | |
/* | |
@param {Function} body: optional | |
@param {Object} options: @prop {Function} enter: The function called on entry | |
@prop {Function} exit: The function called on exit | |
@prop {Function} onError: The function called on error, not re-raised if returns null |
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
/* | |
* PackageManager © Adam Morris [email protected] | |
* A toolchain solution for test-driven development and package management | |
* What it does: | |
* - Provides boilerplate code to make modular packages publishable as gists | |
* - Define and adds all those dependencies to the project so that there are completely modular | |
* - Access them in your own code with "pgk.namespace" where the namespace is defined in the dependency setup file | |
* - Test the modules with TDD practices! | |
* To use: | |
* - Make a copy: https://script.google.com/a/igbis.edu.my/d/1ClAoUIZdC5VJ0nM3_1NIYwW-sr-LLXT_9rLc9B0Tj5SikYWwBuFucyRu/edit) |
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
/* | |
Imported via dev.gs | |
*/ | |
(function (global, Factory) { | |
global.pkg = global.pkg || {}; | |
global.pkg.utgs = (function wrapper (args) { | |
var wrapped = function () { return Factory.apply(Factory, [global].concat(Array.prototype.slice.call(arguments))); }; | |
for (i in args) { wrapped[i] = args[i]; } | |
return wrapped; |
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 Package () { | |
return { | |
spooky: function () { return "BOO!" }, | |
} | |
} |
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 Package () { | |
return { | |
output: function () { return "works"; } | |
} | |
} |
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 (global, Factory) { | |
global.pkg = global.pkg || {}; | |
global.pkg.dbsheets = (function wrapper (args) { | |
var wrapped = function () { return Factory.apply(Factory, arguments); } | |
for (i in args) { wrapped[i] = args[i]; } | |
return wrapped; | |
}({ | |
extend: { | |
registered: [], | |
registerInit: function (func) { |
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
// from: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from | |
(function (global) { | |
// Production steps of ECMA-262, Edition 6, 22.1.2.1 | |
if (!Array.from) { | |
Array.from = (function () { | |
var toStr = Object.prototype.toString; | |
var isCallable = function (fn) { | |
return typeof fn === 'function' || toStr.call(fn) === '[object Function]'; | |
}; | |
var toInteger = function (value) { |
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
//! moment.js | |
//! version : 2.18.1 | |
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors | |
//! license : MIT | |
//! momentjs.com | |
;(function (global, factory) { | |
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : | |
typeof define === 'function' && define.amd ? define(factory) : | |
global.pkg = global.pkg || {}; |