Skip to content

Instantly share code, notes, and snippets.

View alvnfaiz's full-sized avatar
💭
Energic

Alvin Faiz alvnfaiz

💭
Energic
View GitHub Profile
function urlMatchesOneOfPatterns(url, patterns) {
for (var i = 0; i < patterns.length; i++) {
var pattern = patterns[i];
if (url.match(pattern)) {
return true;
}
}
return false;
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alvnfaiz
alvnfaiz / list-files-in-folder.js
Created August 12, 2019 09:09 — forked from hubgit/list-files-in-folder.js
List all files in a folder (Google Apps Script)
function listFilesInFolder() {
var folder = DocsList.getFolder("Maudesley Debates");
var contents = folder.getFiles();
var file;
var data;
var sheet = SpreadsheetApp.getActiveSheet();
sheet.clear();
@alvnfaiz
alvnfaiz / gist:1ef307f7c66f3b995a784c671b37bde1
Created August 15, 2019 17:48 — forked from chrisle/gist:2252209
CURL as GoogleBot 2.1
curl --user-agent "Googlebot/2.1 (+http://www.google.com/bot.html)" -v $@
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.