Skip to content

Instantly share code, notes, and snippets.

View its2loud's full-sized avatar

chris its2loud

View GitHub Profile
import gatt
import threading
manager = gatt.DeviceManager(adapter_name='hci0')
class AnyDevice(gatt.Device):
def services_resolved(self):
super().services_resolved()
device_proprietary_service = next(
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
tell application "Mail"
repeat with eachMessage in theMessages
try
say content of eachMessage as string
end try
end repeat
end tell
end perform mail action with messages
NOW=$(date +"%y%m%d")
for f in "$@"
do
SPATH=${f%/*}"/"
FILENAME=${f##*/}
PREFIX=${FILENAME:0:6}
TRIM=${FILENAME:7}
case $PREFIX in
[0-9][0-9][0-1][0-9][0-3][0-9] )
DESTINATION=$SPATH$NOW"_"$TRIM