Skip to content

Instantly share code, notes, and snippets.

Avatar

Rich Armstrong richarmstrong

View GitHub Profile
@richarmstrong
richarmstrong / onthisday.gs
Created Dec 17, 2018
Label all gmail conversations you were having on this day in the past.
View onthisday.gs
// This function finds all the conversations you were having on this day in the past years (since Gmails release in 2005),
// and adds the "On This Day" label to them. Put it in a new apps script project and set it to run at 3am every day.
// It'll first clear out the label and then add all relevant messages.
function onThisDay(){
var onThisDayLabel = GmailApp.getUserLabelByName("On This Day")
var date = new Date()
var yesterday = new Date();
yesterday.setDate(yesterday.getDate() - 1);
var tomorrow = new Date();
tomorrow.setDate(tomorrow.getDate() + 1);
View keybase.md

Keybase proof

I hereby claim:

  • I am richarmstrong on github.
  • I am richarmstrong (https://keybase.io/richarmstrong) on keybase.
  • I have a public key ASCcnnXY97j_cHK_agTkPzxtnKgpSfFuqXgL3ikcrA3AEAo

To claim this, I am signing this object: