Skip to content

Instantly share code, notes, and snippets.

View supermamon's full-sized avatar

Raymond Velasquez supermamon

View GitHub Profile
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: orange; icon-glyph: award;
// https://twitter.com/simonbs/status/1512069641102790673
const data = await (new Request('https://rickies.co/api/chairmen.json')).loadJSON()
const img = await (new Request('https://rickies.co/images/rickies-trophy-glow.png')).loadImage()
@supermamon
supermamon / pushcut-mutate-for-widget.json
Created December 1, 2021 10:48
Node-RED workflow to mutate JSON payload to Pushcut widget data format.
[
{
"id": "2fb1e3e3.67ea9c",
"type": "tab",
"label": "/pushcut widget mutate",
"disabled": false,
"info": ""
},
{
"id": "14f45599.1f7022",
@supermamon
supermamon / prayer-times.js
Created October 16, 2021 06:16
Prayer times from jamemasjid.co.uk
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: cyan; icon-glyph: pray;
/* **********************************************
by : @supermamon
on : 16 Oct 2021
ver: 1.0.0
for: https://www.reddit.com/r/Scriptable/comments/q8r061/make_widget_table_from_data_scraped_from_website/
********************************************** */
@supermamon
supermamon / the-golf-club-widget.js
Created September 28, 2021 02:50
The Golf Club Widget
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-green; icon-glyph: globe-africa;
/* **********************************************
The Golf Club Wdiget
By: @supermamon
On: 2021-09-28
For: reddit.com/r/Scriptable/comments/pwnrq5/leaderboard_table_formatted_for_ios_widget/
********************************************** */
@supermamon
supermamon / dual-temp.js
Created June 29, 2021 12:33
bare minimum dual temperature widget for scriptable
// bare minimum dual temperature widget for scriptable
// by @supermamon
// 29 June 2021
// get from https://openweathermap.org/appid
const api_key = 'your-api-key'
// get location
const loc = await Location.current()
@supermamon
supermamon / code.js
Last active January 3, 2024 13:01
Example Google Apps Script WebApp to read/append to a Spreadsheet
/*
How to setup
============
1. Go to https://script.google.com and login
2. Click New Project
3. Give the project a name be clicking on "Untitled Project" and giving a new name
4. Copy this whole code and overwrite everything on Code.gs file. Click on the Save icon to save.
5. Go to Google drive and open the worksheet that you want to manipulate
6. Take a look at the url. It should be in this format -- https://docs.google.com/spreadsheets/d/spreadheet-id-as-some-long-seemingly-random-characters/edit#gid=478439860
@supermamon
supermamon / config.json
Last active May 3, 2023 22:52
Mars Rover Camera for Homebridge
"platforms": [
{
"platform": "Camera-ffmpeg",
"name": "Camera FFmpeg",
"cameras": [
{
"name": "Curiosity NAVCAM",
"videoConfig": {
"source": "-f image2 -loop 1 -s 720x480 -pix_fmt yuvj422p -i /homebridge/cams/curiosity-NAVCAM-curr.jpg"
}
@supermamon
supermamon / TapFunctions.js
Created December 1, 2020 23:01
PoC of tap targets calling functions
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: blue; icon-glyph: magic;
// PoC: run functions from tap targets
if (args.queryParameters.fn) {
switch (args.queryParameters.fn) {
case 'fn1':
fn1()
break;
@supermamon
supermamon / require-example.js
Last active January 10, 2022 19:41
port of node's `require` for Scriptable.app
const require = importModule('scriptable-require')
const moment = await require('moment', true)
log(moment().format('dddd'))
// get it here instead
// https://github.com/supermamon/scriptable-scripts/tree/master/xkcd-widget