Skip to content

Instantly share code, notes, and snippets.

View planecore's full-sized avatar

Matan Mashraki planecore

View GitHub Profile
@planecore
planecore / Coronavirus.js
Last active November 11, 2022 16:27
Coronavirus Scriptable Widget
// 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) {
@planecore
planecore / enable_sentry.py
Created February 11, 2022 14:05
Enable Sentry Mode
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()