Skip to content

Instantly share code, notes, and snippets.

@RosemaryOrchard
RosemaryOrchard / Off-On-App
Last active Jul 10, 2022
TimeGuard FSTWifi Switch Logs
View Off-On-App
# Switching Permament Off to Permanent On with the App
[10/07/2022 14:17:56] [DEBUG] [timeguard_mqtt] [protocol_handler:44] [31.193.128.139:9997 -> 172.22.0.1:61424] [parsing:success] fa d4 0d 00 ff ff ff ff 08 0e 01 00 f1 5f 63 6f 78 56 34 12 02 d5 ce 2d df
[10/07/2022 14:17:56] [DEBUG] [timeguard_mqtt] [protocol_handler:44] [31.193.128.139:9997 -> 172.22.0.1:61424] [parsing:success] fa d4 18 00 ff ff ff ff 09 0e 0c 00 f2 55 98 15 78 56 34 12 00 6a 3b 00 90 84 6a 62 00 09 94 62 1c 1d 2d df
[10/07/2022 14:17:56] [DEBUG] [timeguard_mqtt] [protocol_handler:44] [172.22.0.1:61424 -> 31.193.128.139:9997] [parsing:success] fa d4 0d 00 f5 00 00 00 08 07 01 00 f1 00 00 00 78 56 34 12 02 2d 35 2d df
[10/07/2022 14:17:56] [DEBUG] [timeguard_mqtt] [protocol_handler:44] [31.193.128.139:9997 -> void(172.22.0.1):61424] [parsing:success] fa d4 0d 00 f5 00 00 00 08 07 01 00 f1 00 00 00 78 56 34 12 02 2d 35 2d df
[10/07/2022 14:17:56] [DEBUG] [timeguard_mqtt] [protocol_handler:44] [172.22.0.1:61424 -> 31.193.128.139:9997] [p
View save_mail_attachment.applescript
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
using terms from application "Mail"
on perform mail action with messages theMessages for rule theRule
-- The folder to save the attachments in (must already exist)
set attachmentsFolder to ((path to home folder) & "Documents:Attachments") as string
-- Save in a sub-folder based on the name of the rule in Mail
@RosemaryOrchard
RosemaryOrchard / export-project-list.md
Last active Jan 28, 2022
Export a list of your active projects from OmniFocus
@RosemaryOrchard
RosemaryOrchard / wake-up-light-alarm-with-sunrise-effect.yaml
Created Nov 2, 2021 — forked from sbyx/wake-up-light-alarm-with-sunrise-effect.yaml
Home Assistant Blueprint: Wake-up light alarm with sunrise effect
View wake-up-light-alarm-with-sunrise-effect.yaml
blueprint:
name: Wake-up light alarm with sunrise effect
description: 'A wake-up light alarm with a brightness and color temperature sunrise
effect. Note: Requires date_time_iso sensor in configuration, not manually executable!'
domain: automation
input:
light_entity:
name: Wake-up light entity
description: The light to control. Turning it off during the sunrise will keep
it off. Color temperature range is auto-detected.
@RosemaryOrchard
RosemaryOrchard / of-append-to-task-name.omnifocusjs
Created Jul 17, 2021
OmniFocus Automation Action: This will append the provided text to the end of the title of the currently selected task(s)
View of-append-to-task-name.omnifocusjs
/*{
"type": "action",
"targets": ["omnifocus"],
"author": "Rosemary Orchard",
"identifier": "com.rosemaryorchard.omnifocus.append-to-task-title",
"version": "1.0",
"description": "This action will append the provided text to the end of the title of the currently selected task(s).",
"label": "Append to Task Title",
"shortLabel": "Append to Task Title",
"image": "plus.rectangle.fill"
View ProcessInboxTasks.omnifocusjs
/*{
"author": "Rosemary Orchard",
"targets": ["omnifocus"],
"type": "action",
"identifier": "com.rosemaryorchard.Process Inbox Tasks",
"version": "0.1",
"description": "A plug-in to help me automatically process tasks in my inbox by adding tags and replacing text.",
"label": "Process Inbox Tasks",
"mediumLabel": "Process Inbox Tasks",
"paletteLabel": "Process Inbox Tasks",
@RosemaryOrchard
RosemaryOrchard / media-endpoint-ui.php
Created Nov 24, 2019
A sample UI for a Media Endpoint
View media-endpoint-ui.php
<?php
$myURL = 'URL_GOES_HERE';
$myLoginURL = 'URL_GOES_HERE';
function urlMatches($url1, $url2)
{
if ($url1 == $url2) return true;
if ($url1 . '/' == $url2) return true;
if ($url1 == $url2 . '/') return true;
View media-endpoint.php
<?php
$token_endpoint = 'https://tokens.indieauth.com/token';
$base_url = 'https://media.aaronpk.com/';
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: Authorization');
if(isset($_SERVER['HTTP_ACCEPT']) && strpos($_SERVER['HTTP_ACCEPT'], 'text/plain') !== false) {
$format = 'text';
} else {