Skip to content

Instantly share code, notes, and snippets.

View karpada's full-sized avatar

karpada

  • Yahoo!
  • Tel-Aviv
View GitHub Profile
@karpada
karpada / portugal_places_map.html
Created April 7, 2026 06:34
Portual Road Trip
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Portugal Places Map</title>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"/>
<style>
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f5f4f0; }
@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()
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
}