This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const YOUTUBE_API = "https://youtube.googleapis.com/youtube/v3" | |
| const API_KEY = "YOUR_KEY_HERE" | |
| const channelIdArray = [ | |
| "UCT6iAerLNE-0J1S_E97UAuQ", // YongYea | |
| "UC9PBzalIcEQCsiIkq36PyUA", // Digital Foundry | |
| "UCoTIpyf8_RGzJ1LPTmvadaA", // CENTRAL | |
| "UCNvzD7Z-g64bPXxGzaQaa4g", // gameranx | |
| "UCcGL_0yoZTskvlgAixaEjEg", // whatoplay | |
| "UCawsJGDMV6IOm6z9yiOyIsQ", // Cronosfera | |
| "UC-zfTtp6tir7yJIrpsgS0dA", // Intoxi Anime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Adapted from Sandy J Macdonald's gist at https://gist.github.com/sandyjmacdonald/b465377dc11a8c83a8c40d1c9b990a90 to configure all buttons and switch off all lights in loop | |
| import time | |
| import board | |
| import busio | |
| import usb_hid | |
| from adafruit_bus_device.i2c_device import I2CDevice | |
| import adafruit_dotstar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This file should be saved as code.py | |
| # At MagTag startup (or at wakeup time), keep one one of the 4 button pressed. | |
| # The MagTag will switch to the program you choose and remember that decision at each wakeup. | |
| # The trick is to have for each button one CircuitPython program to import. | |
| # You can customise the app_to_start list, here is the current setting: | |
| # no button => magtag_weather | |
| # 1 (D15) => magtag_showtimes | |
| # 2 (D14) => magtag_tree | |
| # 3 (D12) => magtag_spacex | |
| # 4 (D11) => magtag_year_progress_percent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Modified from @mutsuda's https://medium.com/@mutsuda/create-an-ios-widget-showing-google-spreadsheets-data-856767a9447e | |
| // by @levelsio | |
| // HOW TO | |
| // 1) Make a Google Sheet, we'll pull the first cell e.g. A1 | |
| // 2) Publish your Google Sheet, File -> Publish To Web | |
| // 3) Copy the SHEET_ID in the URL, put it in here below: | |
| const endpoint = "https://spreadsheets.google.com/feeds/cells/SHEET_ID/1/public/full?alt=json" | |
| // 4) Install Scriptable @ https://apps.apple.com/us/app/scriptable/id1405459188 | |
| // 5) Copy this entire script in to Scriptable (tip: you can send it to your iPhone via Whatsapp/Messenger/Telegram etc) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Running 1.0 | Matthias Konig | 02.11.2020 | |
| /*------------------------------------------------------------------------------ | |
| Hauptprogramm | |
| ------------------------------------------------------------------------------*/ | |
| // Konstanten | |
| const maxYearDist = 1500; | |
| const maxMonthDist = 200; | |
| const color1 = Color.orange(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Variables used by Scriptable. | |
| // These must be at the very top of the file. Do not edit. | |
| // icon-color: red; icon-glyph: music; | |
| // insert your Spotify client id and secret here | |
| const clientId = "xxx" | |
| const clientSecret = "xxx" | |
| let widget = new ListWidget() | |
| widget.setPadding(22,10,10,10) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // These three lines demonstrate how this code works. | |
| let img = await Photos.fromLibrary() | |
| let newImg = await processImage(img) | |
| QuickLook.present(newImg) | |
| // This function takes an image and returns a processed image. | |
| async function processImage(image) { | |
| const imageId = "imageId" | |
| const canvasId = "canvasId" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // set up keychain and token | |
| const namespace = "dscrd.wdgt" | |
| const token = `${namespace}.usertoken` | |
| if (!Keychain.contains(token) || !Keychain.get(token)) { | |
| let alert = new Alert() | |
| alert.title = "Enter Discord User Token" | |
| alert.addTextField("<discord_token>") | |
| await alert.presentAlert() | |
| Keychain.set(token, alert.textFieldValue(0) || "") | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const url = `https://api.coronavirus.data.gov.uk/v1/data?filters=areaName=United%2520Kingdom;areaType=overview&latestBy=newCasesByPublishDate&structure=%7B%22date%22:%22date%22,%22value%22:%22newCasesByPublishDate%22%7D` | |
| const req = new Request(url) | |
| const res = await req.loadJSON() | |
| if (config.runsInWidget) { | |
| let widget = createWidget(res.data[0].value, new Date(res.data[0].date)) | |
| Script.setWidget(widget) | |
| Script.complete() | |
| } |