Skip to content

Instantly share code, notes, and snippets.

@heymatthew
heymatthew / batch-delete-gmail-emails.js
Last active August 14, 2023 19:55 — 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. This is for your triggers. You can set up how frequently you want the script to run (I did mine for every minute).
// Source : # https://productforums.google.com/d/msg/gmail/YeQVDuPIQzA/kpZPDDj8TXkJ
function batchDeleteEmail() {
var batchSize = 100 // Process up to 100 threads at once

Launch a one-off git server from any local repository.

I [tweeted this already][1] but I thought it could use some expansion:

Enable decentralized git workflow: git config alias.serve "daemon --verbose --export-all --base-path=.git --reuseaddr --strict-paths .git/"

Say you use a git workflow that involves working with a core "official" repository that you pull and push your changes from and into. I'm sure many companies do this, as do many users of git hosting services like Github.

Say that server, or Github, goes down for a bit.

To get Git to diff between your odt/odp/ods files you will need to do the following things:
Install a conversion tool
$ sudo yum install odt2txt
Create your git config info directory if it's not already there
$ mkdir -p ~/.config/git/info
Add in attributes (you can paste this straight in or edit the file accordingly)
$ cat > ~/.config/git/info/attributes <<DELIM
[alias]
co = checkout
br = branch
sb = show-branch --current --color
ci = commit -v
hist = log --pretty=format:\"%C(cyan)%h%Creset %Cgreen%ad%Creset | %C(yellow)%s%d%Creset [%C(white)%an%Creset]\" --graph --date=short
who = shortlog -s --
dump = cat-file -p
ri = rebase --interactive
smf = submodule foreach git fetch --all