Skip to content

Instantly share code, notes, and snippets.

View nothans's full-sized avatar
🏠
Working from home

Hans Scharler nothans

🏠
Working from home
View GitHub Profile
@binocularity
binocularity / CheerLights_Mathematica.txt
Created October 18, 2022 20:15
@cheerlights dynamic updating with dropped network mangement in @WolframResearch Mathematica from @binocularity
req = HTTPRequest[
"http://api.thingspeak.com/channels/1417/field/2/last.json"];
f[] := (
colour = HatchFilling[];
reqStat = Quiet[ URLRead[ req, TimeConstraint -> 2]];
If[ Not[FailureQ[reqStat]],
( rawData = Import[req];
colour = RGBColor[Lookup[ rawData, "field2"]]; )
];
colour
@gwthompson
gwthompson / Cheerlights.js
Created February 5, 2021 00:56 — forked from anilkpatro/Cheerlights.js
Cheerlights Scriptable script
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: gray; icon-glyph: magic;
// CHEERLIGHTS
// https://cheerlights.com/
// The size of the widget preview in the app - "small", "medium" or "large"
const widgetPreview = "small";
@anilkpatro
anilkpatro / Cheerlights.js
Created February 4, 2021 17:44
Cheerlights Scriptable script
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: gray; icon-glyph: magic;
// CHEERLIGHTS
// https://cheerlights.com/
// The size of the widget preview in the app - "small", "medium" or "large"
const widgetPreview = "small";
@rw950431
rw950431 / read_thingspeak.py
Created March 29, 2016 03:35
Read last update from thingspeak
#!/usr/bin/env python
import urllib2,json
READ_API_KEY='your_read_api_key'
CHANNEL_ID=<your channel id>
def main():
conn = urllib2.urlopen("http://api.thingspeak.com/channels/%s/feeds/last.json?api_key=%s" \
% (CHANNEL_ID,READ_API_KEY))
response = conn.read()