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
//script adapted by @dsottimano | |
//original from: https://stackoverflow.com/questions/52569689/clear-text-formatting-in-slides-using-apps-script | |
//credit to https://stackoverflow.com/users/7108653/tanaike | |
function onOpen() { | |
SlidesApp.getUi() | |
.createMenu('Custom Menu') | |
.addItem('Change Master Font', 'changeFont') | |
.addToUi(); |
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
//serpApiKey from serpapi.com | |
var GLOBAL_VARIABLES = { | |
serpApiKey : "add your api key" | |
} | |
/* | |
/*************************** | |
/BEGIN PRESENTATION SCRIPTS |
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
//functions to parse URLs adapted for easy usage in apps script | |
//past the code below in the tools > script editor of any google sheet | |
//call the PARSE_URI() formula directly from a cell | |
// PARSE_URI 1.2.2 | |
// (c) Steven Levithan <stevenlevithan.com> | |
// MIT License | |
//adapted for apps script by @dsottimano |
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
// ==UserScript== | |
// @name seo | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author You | |
// @include https://* | |
// @include http://* | |
// @grant GM_addStyle | |
// @grant GM_notification |
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
WITH calendar AS ( | |
SELECT | |
date, | |
EXTRACT(DAYOFWEEK FROM date) day_of_week, | |
EXTRACT(MONTH FROM date) month, | |
EXTRACT(YEAR FROM date) year | |
FROM UNNEST(GENERATE_DATE_ARRAY('2000-01-01', '2020-12-31')) AS date | |
), | |
date_spine AS ( | |
SELECT * FROM calendar |
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
/** | |
* Recursively deletes specified keys from an object and its nested objects. | |
* @param {object} obj - The object to delete keys from. | |
* @param {string[]} keysToDelete - An array of keys to delete. | |
*/ | |
function deleteKeysRecursive(obj, keysToDelete) { | |
for (let key in obj) { | |
if (keysToDelete.includes(key)) { | |
delete obj[key]; | |
} else if (typeof obj[key] === 'object') { |
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
def parsepath(string): | |
try: | |
string = str(string) | |
if string[0] == "/": | |
country = '' | |
language = '' | |
category = '' | |
category_flag = False | |
split_string = string.split("/") |
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
//David Sottimano | |
//@dsottimano on Twitter for feedback please! | |
//lets set up our queue runner to run every 1 minutes | |
function onOpen() { | |
ScriptApp.newTrigger('queueRunner') | |
.timeBased() | |
.everyMinutes(1) | |
.create(); |
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
"use strict"; | |
let exports = {} | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
class CPT { | |
constructor() { | |
this.alphabet = new Set(); | |
this.root = new PredictionTree(); | |
this.II = {}; | |
this.LT = {}; | |
this.data = []; |
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 REMOVE_SPECIFIC_QUERY(url,queriesToRemove) { | |
try { | |
if (!url) return "Error: Missing parameter. To Fix: Ensure you have both parameters set"; | |
if (url.map) url.map(u=> REMOVE_QUERY(u)) | |
else { | |
let result = "?hello=hi&ga=123" | |
//if (!result.includes("&")) return url.replace("?" + result,""); | |
result = result.split("&") | |
queriesToRemove = queriesToRemove.split(",") | |
NewerOlder