Skip to content

Instantly share code, notes, and snippets.

View e-labInnovations's full-sized avatar
🌐
Learning...

e-lab innovations e-labInnovations

🌐
Learning...
View GitHub Profile
@e-labInnovations
e-labInnovations / Download file from URL.js
Created March 31, 2020 12:21 — forked from mogsdad/Download file from URL.js
In StackOverflow question #14573055, the question was how to "download" a file from a URL using Google Apps-Script. See http://stackoverflow.com/questions/14573055/can-i-download-file-from-url-link-generated-by-google-apps-script/14574217#14574217. You can't actually "download" the source file, because apps-script has no access to your PC's file…
/**
* Retrieve a file from the given URL, store into the named folder
* on Google Drive.
*
* @param {String} fileURL URL to source file, e.g. "http://mysite.com/files/file.val1.val22.zip"
* @param {String} folder Name of target folder on Google Drive
*
* @returns {Object} Response of operation, e.g.
* {rc:200,fileName:"test.zip",fileSize:92994392}
*/
@e-labInnovations
e-labInnovations / app.js
Created November 26, 2019 03:45 — forked from muralikrishnat/app.js
Achieving routing using pure Javascript
var App = {};
var addRoutes = function () {
$NB.addRoute('/books/:id', function (params) {
console.log('Route is ', params.Title, params.id);
}, 'books');
$NB.addRoute('/:category/:id', function (params) {
console.log('Route is ', params.Title, params.category, params.id);
}, 'category');