Skip to content

Instantly share code, notes, and snippets.

View karpada's full-sized avatar

karpada

  • Yahoo!
  • Tel-Aviv
View GitHub Profile
function gmailAutoarchive() {
var labels = GmailApp.getUserLabels();
var pattern = new RegExp("^autoarchive(\\d+)d");
for (var a = 0; a < labels.length; a++) {
var label = labels[a].getName()
match = pattern.exec(label)
if (!match || !(match[1])) {
Logger.log("Ignoring label " + label);
continue
}
@karpada
karpada / Tampermonkey_script.js
Created January 21, 2020 12:32
Auto Duo Security - Send push automatically
// ==UserScript==
// @name Auto Duo Security - Send push automatically
// @match https://*.duosecurity.com/*
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js
// ==/UserScript==
waitForKeyElements ("#auth_methods > fieldset > div.row-label.push-label > button.auth-button.positive", function(jNode) {
jNode.click()