This file contains hidden or 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
| // | |
| // hs.application.js | |
| // Hammerspoon 2 | |
| // | |
| // Created by Chris Jones on 23/10/2025. | |
| // | |
| "use strict"; | |
| // JS class to handle multiple watchers for hs.application events. |
This file contains hidden or 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
| func mightFail() -> Bool? { // Return type of this is actually Optional(Bool) because of the ? | |
| return nil | |
| } | |
| func main() { | |
| guard let result = mightFail() else { // This unwraps the Optional(Bool) | |
| print("lol get rekt") | |
| return | |
| } | |
This file contains hidden or 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
| alias: Universal TTS Announcement 2 | |
| description: Sends a TTS message, routing to Alexa or Cloud TTS based on the target entity. | |
| icon: mdi:bullhorn-variant-outline | |
| fields: | |
| message: | |
| name: Message | |
| description: The text you want to announce. | |
| required: true | |
| selector: | |
| text: |
This file contains hidden or 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
| diff --git Worker/AppState.swift Worker/AppState.swift | |
| index 06515fc..f09e3c7 100644 | |
| --- Worker/AppState.swift | |
| +++ Worker/AppState.swift | |
| @@ -33,14 +33,14 @@ final class AppState { | |
| // Approach 2: | |
| // | |
| // Trying to "un-own" the products array also doesn't work: | |
| - let localProducts = self.products | |
| +// let localProducts = self.products |
This file contains hidden or 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
| #!/bin/bash | |
| set -eu | |
| if [ $(basename ${PWD}) != "vendor" ]; then | |
| echo "ERROR: You're not in the vendor directory." | |
| exit 1 | |
| fi | |
| export MAKE="make -j12" |
This file contains hidden or 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
| #!/bin/bash | |
| # This script will: | |
| # * Download DJ Electric Samurai's Progressive Psytrance mixes from youtube | |
| # * split them into individual MP3s | |
| # * tag them with a reasonable amount of metadata | |
| # * import them into Music.app (née iTunes) | |
| # | |
| # Dependencies: | |
| # * yt-dlp | |
| # * mid3v2 (from the mutagen project) |
This file contains hidden or 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
| # eInk Waste Collection Renderer | |
| # v1.0 Copyright Chris Jones <[email protected]> | |
| # Licensed under the MIT License | |
| # This can be called as a Home Assistant service if you follow: https://www.home-assistant.io/integrations/python_script/ | |
| # Calendar is expected to be populated by the Waste Collection Schedule integration from HACS | |
| # (although I only tested with my home region, it's likely the data is formatted differently for other regions) | |
| # eInk tag to render to | |
| tag_entity = "open_epaper_link.000002838f103b16" |
This file contains hidden or 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
| --- | |
| providers: | |
| config: | |
| class: octodns.provider.yaml.YamlProvider | |
| directory: /config/ | |
| default_ttl: 3600 | |
| enforce_order: True | |
| route53: | |
| class: octodns_route53.Route53Provider | |
| access_key_id: env/AWS_ACCESS_KEY_ID |
This file contains hidden or 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
| hue_nicely: | |
| alias: A Hue Nicely | |
| mode: queued | |
| fields: | |
| bulbs: | |
| name: Bulbs | |
| description: Turn zigbee-connected Hue bulbs on smoothly | |
| required: true | |
| selector: | |
| entity: |
This file contains hidden or 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
| // Enforce thread muting | |
| // When you mute a thread in Gmail, it adds a "Muted" label | |
| // Unfortunately, it doesn't really completely mute the thread - e.g. emails added to the thread will still be marked as unread and show up against folder counts | |
| // | |
| // This script will ensure that all emails appearing on muted threads, will be marked read, and archived. | |
| // | |
| // By default it will only look for emails that are less than 3 days old, to limit the size of the query results. You can adjust that if you want to | |
| var age_max="3d" | |
| function enforceMutes() { |
NewerOlder