Skip to content

Instantly share code, notes, and snippets.

View madc's full-sized avatar

Matthias Esterl madc

View GitHub Profile
### Keybase proof
I hereby claim:
* I am madc on github.
* I am matthiasesterl (https://keybase.io/matthiasesterl) on keybase.
* I have a public key ASBTMaDljXoVLqcbVm_Z-UmmZpVchjmkVZh1ayFXr4XdHAo
To claim this, I am signing this object:
/** Automate Slack invitations
* See https://github.com/ErikKalkoken/slackApiDoc/blob/master/users.admin.invite.md
*/
const inviteToSlack =
(token, email) => new Promise((resolve, reject) => {
const data = querystring.stringify({
resend: true,
token,
email,
});
/*
DISCLAIMER: Use at your own risk!
Discussion: https://github.com/directus/directus/discussions/18297#discussioncomment-5695833
Based on: https://gist.github.com/lukas-schaetzle/f93eff3d961ac595d0e1ab4be5f34536
Tested with Directus 10.11.2 and PostgreSQL
This will delete all flow execution logs, revisions and acitivites which are older
than the specified MinTimestamp and are not in the top <specified MinItems> latest