Skip to content

Instantly share code, notes, and snippets.

Avatar
👷‍♂️
Making

Cody Gagnon codycodes

👷‍♂️
Making
View GitHub Profile
@joogps
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
trigger:
- platform: event
event_type: homekit_tv_remote_key_pressed
event_data:
entity_id: media_player.living_room_tv
action:
- service: webostv.button
data_template:
entity_id: "{{ trigger.event.data['entity_id'] }}"
@GeekAndDadDad
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
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
albertnis / bedside_button.yaml
Created Feb 17, 2020
Making a custom multi-click push button using ESPHome
View bedside_button.yaml
esphome:
name: bedside_button
platform: ESP8266
board: esp12e
wifi:
ssid: "ssid"
password: "example"
logger:
@hepcat72
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
jfierstein / check_mail.py
Created Apr 22, 2019
Python script for scraping Gmail inbox for Amazon package emails with today as delivery date (written for Home Assistant)
View check_mail.py
import sys, smtplib, time
import datetime
import imaplib
import email
import json
EMAIL = "<YOURADDRESS>@gmail.com"
PWD = "<YOURSECRETPASSWORD>"
SMTP_SERVER = "imap.gmail.com"
SMTP_PORT = 993
@mcfrojd
mcfrojd / Shield_Intents.MD
Last active May 19, 2022
Working INTENTS to use with Community Hass.io 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
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 http://miglen.com/
// @version 0.5
// @description News Feed Eradicator for LinkedIn
// @author Miglen Evlogiev (hi@miglen.com)
// @match https://www.linkedin.com/*
// @grant none
// @downloadURL https://gist.github.com/miglen/4f1bccf15b63944675d34149dff0bc3d/raw/news-feeds-eradicator-linkedin.user.js#.user.js
// @updateURL https://gist.github.com/miglen/4f1bccf15b63944675d34149dff0bc3d/raw/news-feeds-eradicator-linkedin.user.js#.user.js
@rex
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
thefloodshark / .js
Created Apr 2, 2018
Tampermonkey Userscript - Website Auto-Refresh Timer
View .js
// ==UserScript==
// @name Auto-Refresh
// @include https://www.example.com
// ==/UserScript==
//--- https://stackoverflow.com/questions/25484978/i-want-a-simple-greasemonkey-script-to-reload-the-page-every-minute
setTimeout(function(){ location.reload(); }, 20*1000);