Skip to content

Instantly share code, notes, and snippets.

@TheGroundZero
TheGroundZero / ha_awtrix_yearprogress.yaml
Last active January 26, 2024 10:53
AWTRIX Year Progress Flow using Home Assistant Automation
---
# https://flows.blueforcer.de/flow/jyNg0oGXOX6D
#
# Update the MQTT topic at the bottom of this automation.
# Don't forget to upload year.jpg to your AWTRIX clock in the ICONS folder
#
automation:
- id: awtrix_year_progress
alias: Year Progress
description: Publishes the current year progress in % to the Awtrix clock
@TheGroundZero
TheGroundZero / ha_darebee_daily.yaml
Last active July 18, 2023 15:23
Display DAREBEE daily challenge on Home Assistant dashboard
---
# Create an image entity showing the DAREBEE daily challenge
#
# https://www.home-assistant.io/integrations/image/
# https://darebee.com/daily
# https://sequr.be/blog/2023/07/darebee-daily-challenge-on-home-assistant-dashboard/
#
scrape:
- resource: https://darebee.com/
scan_interval: 3600 # Every hour
@TheGroundZero
TheGroundZero / ga_textstyle.gs
Created June 21, 2024 00:25
Google Apps Script to extract TextStyle information from a slide
/**
* Extract TextStyle info for the text inside slide element based on Body placeholder
* @param {Number} slidenumber Number of the slide to analyze (starting from 1)
*/
function analyseBodyStyles(slidenumber) {
const presentation = SlidesApp.getActivePresentation();
const slide = presentation.getSlides()[slidenumber-1];
const body = slide.getPlaceholders().find(ph => ph.asShape().getPlaceholderType() === SlidesApp.PlaceholderType.BODY);
const textRange = body.asShape().getText();
const textRuns = textRange.getRuns();
@TheGroundZero
TheGroundZero / enterprise-blocklist.txt
Last active March 10, 2025 15:34
Domains to block on an enterprise network to prevent bypass of security controls. The raw version of this file can be used as a custom blocklist.
# Apple iCloud Private Relay
# https://support.apple.com/en-us/101555
mask.icloud.com.
mask-h2.icloud.com.
mask-api.icloud.com.
# Firefox DoH canary
# https://support.mozilla.org/en-US/kb/canary-domain-use-application-dnsnet
use-application-dns.net.