Skip to content

Instantly share code, notes, and snippets.

Avatar

Matan Mashraki planecore

View GitHub Profile
@planecore
planecore / Coronavirus.js
Last active Sep 13, 2022
Coronavirus Scriptable Widget
View Coronavirus.js
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-green; icon-glyph: user-md;
// change "country" to a value from https://coronavirus-19-api.herokuapp.com/countries/
const country = "Israel"
const url = `https://coronavirus-19-api.herokuapp.com/countries/${country}`
const req = new Request(url)
const res = await req.loadJSON()
if (config.runsInWidget) {
View enable_sentry.py
from decouple import config
import teslapy
with teslapy.Tesla(config('EMAIL')) as tesla:
if not tesla.authorized:
tesla.refresh_token(refresh_token=config('TOKEN'))
tessie = tesla.vehicle_list()[0]
tessie.sync_wake_up()