This file contains 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
blueprint: | |
name: Motion-activated Light (Single entity) | |
description: Turn on a light when motion is detected and turn it off after specified time. | |
domain: automation | |
source_url: https://gist.github.com/christovic/88bddda364af9c6ed6f67ebbaf9e5b09 | |
input: | |
motion_entity: | |
name: Motion Sensor | |
selector: | |
entity: |
This file contains 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
blueprint: | |
name: Motion-activated Light | |
description: Turn on a light when motion is detected. | |
domain: automation | |
source_url: https://gist.github.com/christovic/8acb058b915394997946e35e3a126d2a | |
input: | |
motion_entity: | |
name: Motion Sensor | |
selector: | |
entity: |
This file contains 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
blueprint: | |
name: Motion-activated Light | |
description: Turn on a light when motion is detected. | |
domain: automation | |
source_url: https://gist.github.com/christovic/b5a2cbcfba81edc81a2bc3d2f96c7f11 | |
input: | |
motion_entity: | |
name: Motion Sensor | |
selector: | |
entity: |
This file contains 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
sudo apt install -y zip git wget | |
mkdir ubuntu; cd ubuntu | |
function post_chroot { | |
cat <<EOT >> build.sh | |
apt update | |
apt-get install -y libelf-dev build-essential pkg-config bc bison flex libssl-dev kmod | |
cd linux-raspberrypi-kernel_1.20200512-2 | |
make bcm2711_defconfig | |
make prepare |
This file contains 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 | |
# We can find the index of the item in the array by extracting the key, finding the lines with | |
# 'string' in them, and then finding the search string. | |
cd /System/Volumes/Data/.Spotlight-V100 | |
search_string=$1 | |
let index="`plutil -extract Exclusions xml1 -o - VolumeConfiguration.plist | grep string | grep -wn "${search_string}" | cut -d ':' -f 1` - 1" |
This file contains 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 | |
launchctl stop com.apple.metadata.mds && launchctl start com.apple.metadata.mds | |
vers=$( sw_vers | grep BuildVersion | awk '{print substr($2,0,2)}' ) | |
sdir="/.Spotlight-V100" | |
if [[ "${vers}" > "18" ]]; then | |
sdir="/System/Volumes/Data${sdir}" |