Skip to content

Instantly share code, notes, and snippets.

@RosemaryOrchard
RosemaryOrchard / sampleButtonWidget.json
Created October 7, 2023 21:38
Sample button widget
{
"children": [
{
"type": "row",
"children": [
{
"children": [
{
"value": "star",
"properties": {
@RosemaryOrchard
RosemaryOrchard / audible_add_goodreads_search.js
Created August 7, 2023 14:31
Bookmarklet to add Search In Goodreads links to Audible Wish Lists
javascript: (() => {
Array.from(document.querySelectorAll('.productListItem')).forEach((book, bookIndex) => {
const title = book.querySelector('ul li .bc-size-headline3').innerText;
const author = book.querySelector('ul .authorLabel a').innerText;
const searchQuery = `${title.split(':')[0]} ${author}`;
const url = `https://www.goodreads.com/search?q=${searchQuery.split(" ").map(text => encodeURIComponent(text)).join("+")}`;
const buttonArea = book.querySelector('.adblBuyBox');
const goodreadsButtonDiv = document.createElement('div');
goodreadsButtonDiv.classList.add('bc-row');
document.windows[0].selection.tasks.forEach(task => {
const childTask = new Task("");
moveTasks([childTask], task);
task.completedByChildren = true;
});
@RosemaryOrchard
RosemaryOrchard / Off-On-App
Last active July 10, 2022 14:29
TimeGuard FSTWifi Switch Logs
# 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
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 January 28, 2022 01:06
Export a list of your active projects from OmniFocus
@RosemaryOrchard
RosemaryOrchard / wake-up-light-alarm-with-sunrise-effect.yaml
Created November 2, 2021 21:13 — forked from sbyx/wake-up-light-alarm-with-sunrise-effect.yaml
Home Assistant Blueprint: Wake-up light alarm with sunrise effect
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 July 17, 2021 19:40
OmniFocus Automation Action: This will append the provided text to the end of the title of the currently selected task(s)
/*{
"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"
/*{
"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 November 24, 2019 07:27
A sample UI for a Media Endpoint
<?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;