Skip to content

Instantly share code, notes, and snippets.

@b-turchyn
b-turchyn / hass.automation.turn-off-tv-late.yaml
Last active March 10, 2023 03:30
Home Assistant Automation - Turn Off TV When It's Too Late
alias: Turn Off TV When It's Too Late
description: ""
trigger:
- platform: state
entity_id:
- media_player.living_room_tv
for:
hours: 0
minutes: 0
seconds: 0
SELECT
`posts`.*,
(WITH `k` AS (
SELECT
`member_id`
FROM
`members_subscription_created_events`
WHERE
posts.id = members_subscription_created_events.attribution_id
UNION
@b-turchyn
b-turchyn / Macropad.ahk
Last active November 7, 2020 19:29
Preonic as a macropad
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; Adjust these as required.
#include lib\Midi.ahk
#include lib\OBS.ahk
#include lib\PlayMedia.ahk
@b-turchyn
b-turchyn / README.md
Created May 3, 2019 01:42
Tasker morning routine

Starts playing music and reads off today's weather when you turn off your alarm

Requirements

  • Sleep as Android
  • Tasker
  • AutoInput
  • Spotify
  • DarkSky API key
  • Spotify playlist URI
@b-turchyn
b-turchyn / Gemfile
Created April 30, 2019 15:50
Serve and automatically compile Sphinx documentation
source 'https://rubygems.org'
gem 'guard'
gem 'guard-shell'
gem 'guard-process'

Keybase proof

I hereby claim:

  • I am b-turchyn on github.
  • I am bturchyn (https://keybase.io/bturchyn) on keybase.
  • I have a public key whose fingerprint is 6498 BD58 75B0 C4F4 E552 88AA 1349 15D1 4792 3FCC

To claim this, I am signing this object: