Skip to content

Instantly share code, notes, and snippets.

View benwerd's full-sized avatar
🎯
Focusing

Ben Werdmuller benwerd

🎯
Focusing
View GitHub Profile
@benwerd
benwerd / gmailAutoArchive.js
Last active July 8, 2021 20:28
Automatically archive unimportant emails after a week
// I run this on a timer from scripts.google.com. You'll need to manually approve permissions the first time you run it.
function gmailAutoArchive() {
let delayDays = 7; // I use seven days; you can change the archival threshold in days by changing this number.
let search = `in:inbox {-in:important category:social category:updates category:promotions category:forums} -in:starred older_than:${delayDays}d`;
let offset = 0;
let threadCount = 1;
let limit = 100; // GmailApp bulk methods can only handle 100 threads at a time
This post links my 3Box profile to my Github account! Web3 social profiles by 3Box.
✅ did:3:bafyreidwvql7d5qcobduo4jxuwgcuaovarkz4qbacotydvt724xxswzf5a ✅
Create your profile today to start building social connection and trust online at https://3Box.io/
@benwerd
benwerd / cla.txt
Last active February 5, 2019 21:46
Unlock Contributor License Agreement
Unlock, Inc
Individual Contributor License Agreement ("Agreement") V2.0
http://www.apache.org/licenses/
Thank you for your interest in Unlock, Inc (Unlock).
In order to clarify the intellectual property license
granted with Contributions from any person or entity, Unlock
must have a Contributor License Agreement ("CLA") on file that has
been signed by each Contributor, indicating agreement to the license
terms below. This license is for your protection as a Contributor as

Keybase proof

I hereby claim:

  • I am benwerd on github.
  • I am benwerd (https://keybase.io/benwerd) on keybase.
  • I have a public key whose fingerprint is 575E AE13 9686 565E B5E1 40D0 799C 0492 10BA 8E81

To claim this, I am signing this object:

@benwerd
benwerd / example.php
Created April 12, 2012 19:29 — forked from drewjoh/example.php
A Simple Postmark PHP Class with Attachments And Batches
<?php
require("postmark.php");
$postmark = new Postmark("your-api-key","from-email","optional-reply-to-address");
$result = $postmark->to("reciver@example.com")
->subject("Email Subject")
->plain_message("This is a plain text message.")
->attachment('File.pdf', $file_as_string, 'application/pdf')