Skip to content

Instantly share code, notes, and snippets.

View andrevinsky's full-sized avatar

Andrew Revinsky andrevinsky

View GitHub Profile
const range = function* (
from,
to,
step = from > to ? -1 : 1
) {
if (
step < 0
? from <= to
: from >= to
) {
@andrevinsky
andrevinsky / batch-delete-gmail-emails.js
Created March 5, 2021 21:13 — forked from gene1wood/batch-delete-gmail-emails.js
A Google Apps Script script to bulk delete large amounts of email in Gmail while avoiding the error #793 which Gmail encounters normally
/*
This script, when used with Google Apps Scripts will delete 500 emails and
can be triggered to run every minute without user interaction enabling you
to bulk delete email in Gmail without getting the #793 error from Gmail.
Configure the search query in the code below to match the type of emails
you want to delete
Browser to https://script.google.com/.
Start a script and paste in the code below.
After you past it in, save it and click the little clock looking button.