Skip to content

Instantly share code, notes, and snippets.


Cody Gagnon codycodes

View GitHub Profile
joogps / automations.yaml
Last active Mar 13, 2022
Home Assistant automation for calling webostv.button on HomeKit Remote key presses
View automations.yaml
- alias: Call webostv.button on HomeKit Remote key presses
- platform: event
event_type: homekit_tv_remote_key_pressed
entity_id: media_player.living_room_tv
- service: webostv.button
entity_id: "{{['entity_id'] }}"
GeekAndDadDad / RemindersListToTextEdit.scpt
Last active Sep 25, 2020
Hacked together AppleScript to get a list from Reminders and make a new TextEdit document with the items in the list suitable for printing.
View RemindersListToTextEdit.scpt
tell application "Reminders"
set listNames to {}
repeat with aList in lists
copy name of aList to end of listNames
end repeat
set listName to choose from list listNames with prompt "Select the list to print:"
-- now find list object for the choosen list
set listToPrint to ""
repeat with aList in lists
Andromelus / cookie-typescript-utils.ts
Last active Oct 6, 2020 — forked from joduplessis/cookie-typescript-utils.ts
Setting, deleting and retrieving cookies in Typescript.
View cookie-typescript-utils.ts
albertnis / bedside_button.yaml
Created Feb 17, 2020
Making a custom multi-click push button using ESPHome
View bedside_button.yaml
name: bedside_button
platform: ESP8266
board: esp12e
ssid: "ssid"
password: "example"
hepcat72 / completion_notifier.scpt
Last active Apr 2, 2020
Applescript to post webhooks triggered by newly completed iOS reminders in specific list(s)
View completion_notifier.scpt
--Look for newly completed reminders (since the last check) and if there is a new one, make a webhook post with date, title, and list JSON values
--by Robert W. Leach, based on scripts by Craig Eley, Samantha Hilton, and Nick Morris
--This is not foolproof. If you have more than 1 device you use to "complete" reminders and a reminder is completed while offline, after which, a reminder is completed from a second online device, the completion of the reminders in the offline device (once it comes online) will be missed. However, it's done this way so that the script doesn't take forever looking at all reminders each time.
--Schedule it to run as frequently as you would like using osascript in a cron job and forget about it. Run once manually in order to "allow" this script to run in the security settings by responding to the resulting dialog.
--Cron job every 30 minutes looking for newly completed reminders in list "MyReminders" example (execute `crontab -e` in terminal and enter): */30 * * * * osascript /Us
jfierstein /
Created Apr 22, 2019
Python script for scraping Gmail inbox for Amazon package emails with today as delivery date (written for Home Assistant)
import sys, smtplib, time
import datetime
import imaplib
import email
import json
mcfrojd / Shield_Intents.MD
Last active May 19, 2022
Working INTENTS to use with Community Add-ons: Android Debug Bridge for your Nvidia Shield TV
View Shield_Intents.MD

Latest Update 2021-03-06 : New image showing the new "Services" in Home Assistant and got some tips from the comments below.

Credits and thanks: Home Assistant Forum users & Github users: @ocso, @wiphye, @teachingbirds, @tboyce1, @simbesh, @JeffLIrion @ff12 @rebmemer @siaox @DiederikvandenB @Thebuz @clapbr @Finsterclown

Start apps on your android device (in the examples below, my Nvidia Shield TV) from Home Assistant

alt text

Starts Youtube App

entity_id: media_player.shield
command: &gt;-
miglen / news-feeds-eradicator-linkedin.user.js
Last active Mar 25, 2022
News Feed Eradicator for LinkedIn
View news-feeds-eradicator-linkedin.user.js
// ==UserScript==
// @name News Feed Eradicator for LinkedIn
// @namespace
// @version 0.5
// @description News Feed Eradicator for LinkedIn
// @author Miglen Evlogiev (
// @match*
// @grant none
// @downloadURL
// @updateURL
rex / copy-all-safari-urls.applescript
Created Aug 15, 2018
Applescript snippet to copy all URLs from all open tabs in front-most Safari window
View copy-all-safari-urls.applescript
# Auth: Christopher Stone
# dCre: 2017/11/15 00:00
# dMod: 2017/11/15 00:03
# Appl: Safari
# Task: Put URLs of all tabs of the front window on the clipboard.
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @Safari, @Put, @URLs, @All, @Tabs, @Front, @Window, @Clipboard
thefloodshark / .js
Created Apr 2, 2018
Tampermonkey Userscript - Website Auto-Refresh Timer
View .js
// ==UserScript==
// @name Auto-Refresh
// @include
// ==/UserScript==
setTimeout(function(){ location.reload(); }, 20*1000);