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() | |
| } |
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
| /** | |
| * S10 桌面小组件 | |
| * Author : BlueSky | |
| * Version : 2.0-201009 | |
| * API : https://tiyu.baidu.com/match/S10 | |
| * Gist : https://gist.github.com/BlueSky-07/70bcfedc4e5fe7fcf1b06db48124fffe | |
| * Readme : https://sspai.com/post/62980 | |
| */ | |
| /** |
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
| "use strict"; | |
| /** | |
| * This widget is from <https://github.com/jasonsnell/PurpleAir-AQI-Scriptable-Widget> | |
| * By Jason Snell, Rob Silverii, Adam Lickel, Alexander Ogilvie, and Brian Donovan. | |
| * Based on code by Matt Silverlock. | |
| */ | |
| const API_URL = "https://www.purpleair.com"; |