Skip to content

Instantly share code, notes, and snippets.

View cdchris12's full-sized avatar
🤠

Chris Davis cdchris12

🤠
View GitHub Profile
@cdchris12
cdchris12 / light-state-sync.yaml
Last active May 20, 2024 11:00 — forked from fireboy1919/light-state-sync.yaml
Synchronize States Between Two Lights
blueprint:
name: Synchronize brightness states
description: Synchronize the on/off state of 2 entities
domain: automation
input:
entity_1:
name: First entity
selector:
entity: {}
entity_2:
@cdchris12
cdchris12 / gravityview-trigger-gform_after_submission-form-12.php
Last active March 5, 2019 18:36 — forked from zackkatz/gravityview-trigger-gform_after_submission-form-12.php
GravityView - Trigger the `gform_after_submission` action when an entry is edited, but ONLY for Form #20.
<?php
/**
* GravityView doesn't trigger the `gform_after_submission` action when editing entries. This does that,
* but ONLY FOR FORM #20.
*
* @param array $form
* @param int $entry_id ID of the entry being updated
* @param GravityView_Edit_Entry_Render $object
*
@cdchris12
cdchris12 / notify_added_lastweek.py
Last active February 21, 2017 17:41 — forked from blacktwin/notify_added_lastweek.py
Send an email with what was added to Plex in the past week using PlexPy.
#!/usr/bin/python
"""
Send an email with what was added to Plex in the past week using PlexPy.
Email includes title (TV: Show Name: Episode Name; Movie: Movie Title), time added, image, and summary.
"""
import requests
import sys
import time
import os
@cdchris12
cdchris12 / go.py
Last active May 23, 2016 17:18 — forked from raylu/Makefile
Go question
#!/usr/bin/env python
# Go is a 2 player board game with simple rules. Two players alternate turns
# placing stones on a grid. If a stone is surrounded on 4 sides by stones of
# the opponent, it is captured. If a group of stones are surrounded, they are
# captured.
# See http://en.wikipedia.org/wiki/Rules_of_Go#Capture for a visual explanation.
# Below is an implementation of a Go board. Please write some code in the
# move() method to check for captures and output something when a capture