This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Workaround to set mail as read using astroid | |
set -e | |
echo "[mailsync]: hack" | |
ls ~/Mail | while read x; do | |
notmuch tag +unread +reunread -- path:$x/INBOX/new/** and not tag:unread | |
notmuch tag -unread -reunread -- tag:reunread | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function scanOnce() { | |
// Make sure running in Zamok and this specific API is available | |
var autofill = window.Zamok && window.Zamok.API && window.Zamok.API.Autofill; | |
if (!autofill) return Promise.reject("Either not in Zamok or 'zamok-api-autofill' solution is not enabled"); | |
// Enable and wait for a single scan. Returns parsed data. | |
return autofill.scan(); | |
} | |
scanOnce() | |
.then(data => console.log('Card scan successful', data)) // Do something with parsed data object |