Skip to content

Instantly share code, notes, and snippets.

View marksie1988's full-sized avatar

Steven Marks marksie1988

View GitHub Profile
@marksie1988
marksie1988 / sunsynk-power-flow-card
Last active August 14, 2023 10:33
Lux config for the sunsynk-power-flow-card
type: custom:sunsynk-power-flow-card
cardstyle: lite
show_solar: 'yes'
battery:
energy: 12800
shutdown_soc: 1
show_daily: 'yes'
solar:
show_daily: 'yes'
mppts: two
@marksie1988
marksie1988 / alias_decorator.py
Created July 29, 2023 19:02
Allows adding aliases with deprecation warnings
import functools
from typing import Any, Callable, Dict, Optional, Set
import warnings
class FunctionWrapper:
"""Function wrapper"""
def __init__(self, func: Callable[..., Any]) -> None:
self.func = func
@marksie1988
marksie1988 / patch_snow.py
Created February 4, 2021 11:55
Script to get and update records in ServiceNow
# Need to install requests package for python
# easy_install requests
import requests
sn_username = ''
sn_password = ''
# this is the beginning of your URL e.g. company.service-now.com would be "company"
instance_name = ''
@marksie1988
marksie1988 / twitch-open-stream.py
Created January 28, 2021 09:41
Uses python to open a webbrowser when a streamer comes online
import webbrowser
from twitchAPI.twitch import Twitch
CHANNEL_NAME = "<change to channel name>"
# visit https://dev.twitch.tv/console/apps create an app
# redirect url: http://localhost:17563
twitch = Twitch('<app_key>', '<app_Secret>')
twitch.authenticate_app([])

Keybase proof

I hereby claim:

  • I am marksie1988 on github.
  • I am marksie1988 (https://keybase.io/marksie1988) on keybase.
  • I have a public key ASB9pNK9FW6yoxLwnm-bjCuBChn9c0KIqP6wSR7V39s20Qo

To claim this, I am signing this object: