Skip to content

Instantly share code, notes, and snippets.

@jroehl
jroehl / README.md
Last active November 22, 2019 10:12

Interactive bash script to open the sqlite database directory (core data) of a specific app installed in Xcode simulator

Needs jq to be installed
Needs xcrun to be installed (xcode-select --install)
Needs /usr/libexec/PlistBuddy to be installed (xcode-select --install)

Usage

. <(curl -s https://gist.githubusercontent.com/jroehl/e5230754a95d7c243a3c6290668d94fb/raw/find-simulator-coredata.sh)

{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"definitions": {
"AppDefinition": {
"additionalProperties": false,
"properties": {
"bundle": {
"$ref": "#/definitions/Link<\"AppBundle\">",
"description": "Link to an AppBundle"
@jroehl
jroehl / README.md
Last active September 5, 2023 14:42

Bash script to delete all entries of a specific content type of a contentful space

Usage

bash &lt;(curl -s https://gist.githubusercontent.com/jroehl/e96378b14cf35213bfdae060d965ec6f/raw/unpublishAndDelete.sh) "contentTypeId"

blueprint:
name: "Remote Light Control (ZHA)"
description: >
Universal ZHA remote blueprint for any remote or wall switch.
**Short press ON** turns on lights at sun-elevation-based brightness,
activates switches, and presses button entities — all in parallel.
Brightness scales automatically with the sun: full brightness at night,
dimmer during the day. No time inputs needed — adapts to seasons.
blueprint:
name: Motion-activated Light (dual time profile + dual wait + lux + sensitivity)
description: >
Turn on lights on motion with two brightness profiles and two wait times
based on a time window (supports overnight). Optional ambient-lux guard,
sensor sensitivity control, transition, and cooldown.
domain: automation
input:
motion_entity: