Skip to content

Instantly share code, notes, and snippets.

Dave dsottimano

Block or report user

Report or block dsottimano

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View for Hamlet - index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<script src="index.js"></script>
</head>
<body>
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 = {};
this.data = [];
@dsottimano
dsottimano / gist:e3e6294f80cb1cbb526d1defed322850
Last active Dec 29, 2019
Tech seo boost 2019 - Dave Sottimano - Apps script demo
View gist:e3e6294f80cb1cbb526d1defed322850
//serpApiKey from serpapi.com
var GLOBAL_VARIABLES = {
serpApiKey : "add your api key"
}
/*
/***************************
/BEGIN PRESENTATION SCRIPTS
@dsottimano
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: 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();
@dsottimano
dsottimano / gist:29fbfaa6795ca3a7204fa82113dfc863
Last active Jan 9, 2020
SMXL MILAN 2019 PRESENTATION CODE BUNDLE
View gist:29fbfaa6795ca3a7204fa82113dfc863
//this is where you put in your api keys!
//serpApiKey from serpapi.com
//proxyCrawlToken & proxyCrawlJavascriptToken from proxycrawl.com
var GLOBAL_VARIABLES = {
serpApiKey : "",
proxyCrawlToken: "",
proxyCrawlJavascriptToken: ""
@dsottimano
dsottimano / gist:2af808b30de1bec51506e0855141dceb
Last active Oct 29, 2019
Keyword frequency table generator - apps script - google sheets
View gist:2af808b30de1bec51506e0855141dceb
/**
* Returns a table of ngrams and their importance
*
* @param {"cars are the best"} textArray REQUIRED The corpus you want statistics from
* @param {"3"} numberOccurances OPTIONAL Show results with at least X occurrences. Default is 2
* @param {"4"} numberOfWords OPTIONAL Show statistics for one to X words. Default is 5
* @param {"false"} removeStopWords OPTIONAL true or false. False by default
* @customfunction
*/
@dsottimano
dsottimano / gist:cd0d9479647e96d6b1d338222011ecee
Last active Oct 30, 2019
Substitute all custom function for apps script - sheets
View gist:cd0d9479647e96d6b1d338222011ecee
/**
* Substitute multiple words or characters at once
* @param {"@,hello,test"} params REQUIRED The words you want to remove separated by commas ","
* @param {"a1"} text REQUIRED The string you want to subsitute from
* @param {"-"} replacement OPTIONAL The replacement string. Default is blank space
* @return Returns combination of protocols + www subdomains
* @customfunction
*/
function SUBSTITUTE_ALL(params, text,replacement) {
@dsottimano
dsottimano / gist:2c8428b0bac422b3bcf08744c73b2be0
Created Oct 28, 2019
SERPapi for Google sheets/apps script
View gist:2c8428b0bac422b3bcf08744c73b2be0
//note: users of this script need a valid api key from serpapi.com
//the key must be included in the object below as the serpApiKey value. For non-programmers, please ensure that your API is within quotes ("")
var GLOBAL_VARIABLES = {
serpApiKey: ""
}
/**
* Returns serpapi data for organic results
View gist:b7432b226187a953734c318db3742fa1
//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
You can’t perform that action at this time.