Skip to content

Instantly share code, notes, and snippets.


Dave dsottimano

View GitHub Profile
View bridget
def parsepath(string):
string = str(string)
if string[0] == "/":
country = ''
language = ''
category = ''
category_flag = False
split_string = string.split("/")
dsottimano / 30 second beat code
Last active Sep 3, 2020
Beating the apps script custom function 30 second time limit. Alpha? Beta? :P
View 30 second beat code
//David Sottimano
//@dsottimano on Twitter for feedback please!
//lets set up our queue runner to run every 1 minutes
function onOpen() {
View query removal
function REMOVE_SPECIFIC_QUERY(url,queriesToRemove) {
try {
if (!url) return "Error: Missing parameter. To Fix: Ensure you have both parameters set";
if (> REMOVE_QUERY(u))
else {
let result = "?hello=hi&ga=123"
//if (!result.includes("&")) return url.replace("?" + result,"");
result = result.split("&")
queriesToRemove = queriesToRemove.split(",")
View url parsing thingy
console.log([ Set(new URL('').pathname.toLowerCase().split(/-|\//gi).filter(Boolean))])
//output handles dupes for casing and removes falsy values
//[ 'sandisk','128gb','microsdxc','memory','adapter','dp','b073jyc4xm' ]
View john
<!DOCTYPE html>
<link rel="stylesheet" href="" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<div class="container">
<p style="color:red;">Sorry about the email change at the last minute, Google and Gmail decided to block this message as spam, so I can't send it to you. Yeah, I'm changing providers ;)</p>
<p>Thanks for watching my MozCon presentation! Even though it was only 30 minutes, it took me years for me to get to this point.
I’m really excited to share concepts that should help you cut out boring tasks and focus on more important things.</p>
View gist:ed03c97a504fcb63b122ad007988aa47
// ==UserScript==
// @name seo
// @namespace
// @version 0.1
// @description try to take over the world!
// @author You
// @include https://*
// @include http://*
// @grant GM_addStyle
// @grant GM_notification
View for Hamlet - index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="index.js"></script>
View for hamlet - index js
"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 = {}; = [];
dsottimano / gist:e3e6294f80cb1cbb526d1defed322850
Last active May 19, 2022
Tech seo boost 2019 - Dave Sottimano - Apps script demo
View gist:e3e6294f80cb1cbb526d1defed322850
//serpApiKey from
serpApiKey : "add your api key"
dsottimano / gist:20a50daded2128b4c86acb430cecba67
Created Nov 3, 2019
Google slides - change font for every slide using apps script
View gist:20a50daded2128b4c86acb430cecba67
//script adapted by @dsottimano
//original from:
//credit to
function onOpen() {
.createMenu('Custom Menu')
.addItem('Change Master Font', 'changeFont')