Skip to content

Instantly share code, notes, and snippets.

View codycodes's full-sized avatar

Cody Gagnon codycodes

View GitHub Profile
@carmelodevuz
carmelodevuz / Readme.md
Last active February 13, 2024 19:52
Metronic Angular Skeleton (demos 1-8)

Basic skeleton preparation:

  1. Remove unnecessary modules in the folder src/app/modules. (!!!Except auth, i18n and errors folders).
  2. Comment unnecessary routes in the src/app/pages/routing.ts file. [9-45] rows.
  3. Clear Dashboard src/app/pages/dashboard.component.html file.
  4. Clear Dashboard module src/app/pages/dashboard.module.ts file (!remove WidgetsModule from the code, rows [5, 17].
  5. Remove Widgets src/_metronic/partials/content/widgets folder and the file src/app/_metronic/partials/index.ts file comment row [3].
  6. Clear Aside menu in the file src/app/_metronic/layout/components/aside/aside-menu/aside-menu.component.html. Keep only Dashboard menu item. (For demo1 also need to clear src/app/_metronic/layout/components/sidebar/sidebar-menu/sidebar-menu.component.html file)
  7. Clear Header menu in the file src/app/_metronic/layout/components/header/header-menu/header-menu.component.html. Keep only dashboard menu item.
  8. In case if you don't need Aut
@joogps
joogps / automations.yaml
Last active July 16, 2023 13:33
Home Assistant automation for calling webostv.button on HomeKit Remote key presses
- 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'] }}"
@GeekAndDad
GeekAndDad / RemindersListToTextEdit.scpt
Last active September 25, 2020 19:02
Hacked together AppleScript to get a list from Reminders and make a new TextEdit document with the items in the list suitable for printing.
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
@rmcdongit
rmcdongit / macOS_SytemPrefs.md
Last active April 19, 2024 05:35
Apple System Preferences URL Schemes

macOS 10.15 System Preference Panes

Below are a list of System Preference pane URLs and paths that can be accessed with scripting to assist users with enabling macOS security settings without having to walk them through launching System Preferences, finding panes, and scrolling to settings. Not all panes have an accessible anchor and some are OS specific.

To find the Pane ID of a specific pane, open the System Preferences app and select the desired Preference Pane. With the pane selected, open the ScriptEditor.app and run the following script to copy the current Pane ID to your clipboard and display any available anchors:

tell application "System Preferences"
	set CurrentPane to the id of the current pane
	set the clipboard to CurrentPane
@Andromelus
Andromelus / cookie-typescript-utils.ts
Last active October 6, 2020 17:02 — forked from joduplessis/cookie-typescript-utils.ts
Setting, deleting and retrieving cookies in Typescript.
@albertnis
albertnis / bedside_button.yaml
Created February 17, 2020 07:07
Making a custom multi-click push button using ESPHome
esphome:
name: bedside_button
platform: ESP8266
board: esp12e
wifi:
ssid: "ssid"
password: "example"
logger:
@hepcat72
hepcat72 / completion_notifier.scpt
Last active April 2, 2020 22:46
Applescript to post webhooks triggered by newly completed iOS reminders in specific list(s)
--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 April 22, 2019 05:01
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
EMAIL = "<YOURADDRESS>@gmail.com"
PWD = "<YOURSECRETPASSWORD>"
SMTP_SERVER = "imap.gmail.com"
SMTP_PORT = 993
@mcfrojd
mcfrojd / Shield_Intents.MD
Last active March 30, 2024 16:53
Working INTENTS to use with Community Hass.io Add-ons: Android Debug Bridge for your Nvidia Shield TV

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: >-
@miglen
miglen / news-feeds-eradicator-linkedin.user.js
Last active July 4, 2022 12:19
News Feed Eradicator for LinkedIn
// ==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