Skip to content

Instantly share code, notes, and snippets.

@brainno722
brainno722 / Scriptable widget Harry potter FORKED
Last active December 30, 2021 06:59 — forked from aashrith825/Scriptable widget Harry potter
Scriptable widget with custom font, greetings, calendar events, football api, Fitbit api and Unsplash images
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-purple; icon-glyph: image;
// download harrypotter font from fontspace.com/phoenix-phonts and install it using fontcase app
/*
* Change the widget values and test out the widget in this section.
* ===================================================================
*/
@brainno722
brainno722 / home_widget_online
Created October 28, 2020 20:35 — forked from sharn25/home_widget_online
Home Widget with random images from internet based upon bjayers
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: teal; icon-glyph: magic;
// To use, add a parameter to the widget with a format of: image.png|padding-top|text-color|ture for online server image or false to load local image|Image filers eg: nature,blur
// The image should be placed in the iCloud Scriptable folder (case-sensitive).
// The padding-top spacing parameter moves the text down by a set amount.
// The text color parameter should be a hex value.
// For example, to use the image bkg_fall.PNG with a padding of 40 and a text color of red,
// the parameter should be typed as: bkg_fall.png|40|#ff0000|true|nature
@brainno722
brainno722 / scriptable-calendar-widget.md
Last active April 10, 2021 18:39 — forked from rudotriton/scriptable-calendar-widget.md
Customizable iOS Calendar widget in Scriptable
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: yellow; icon-glyph: cloud;
// Widget Params
// Don't edit this, those are default values for debugging (location for Cupertino).
// You need to give your locations parameters through the widget params, more info below.
const widgetParams = JSON.parse((args.widgetParameter != null) ? args.widgetParameter : '{ "LAT" : "46.062" , "LON" : "13.242" , "LOC_NAME" : "Udine" }')
// WEATHER API PARAMETERS !important
@brainno722
brainno722 / greetingsweatherdatecountdownbattery.js
Created October 9, 2020 14:34 — forked from flasozzi/greetingsweatherdatecountdownbattery.js
Greetings, weather, date, countdown, battery (Frankenstein) widget for iOS using Scriptable.
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: blue; icon-glyph: calendar-alt;
// CREDITS
// Greetings code Autumn Vibes by u/ben5292001
// Battery code by u/_Bisho_
// Weather stack code by u/coderjones
// Countdown code and assemble by u/flasozzi
@brainno722
brainno722 / dailyScripture_widget.js
Last active October 5, 2020 09:31 — forked from mattapperson/Scriptable DailyText widget.js
Scriptable Daily Scripture Widget with Picsum/Unsplash Background
// Inspired/Forked from https://gist.github.com/mattapperson/114e5267d5bc736fbe616b6205f3df92 (Scriptable DailyText widget.js)
let dailyText = await loadText()
let widget = await createWidget(dailyText)
if (config.runsInWidget) {
await widget.presentSmall()
} else {
// await widget.presentSmall()
// opens the Scripture URL in Safari when tapped on the widget
let url = "https://www.biblegateway.com/passage/?search="
@brainno722
brainno722 / WikipediaWiget.js
Created October 5, 2020 08:35 — forked from rsalzer/WikipediaWiget.js
Code for a widget for the Scriptable-App (iOS) which shows you random wikipedia previews
const lang = "en" //use the language of your choice "en", "de", "it", "fr", etc.
const url = `https://${lang}.wikipedia.org/api/rest_v1/page/random/summary`
const req = new Request(url)
const res = await req.loadJSON()
const i = new Request(res.thumbnail.source);
const img = await i.loadImage();
let widget = createWidget(res.title, img, res.content_urls.mobile.page)
if (config.runsInWidget) {
// create and show widget
const getURL = year => `https://nolaborables.com.ar/api/v2/feriados/${year}`
const months = ['Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'];
const days = ['Domingo', 'Lunes', 'Martes', 'Miercoles', 'Jueves', 'Viernes', 'Sabado'];
const dayOfWeek = (day, month, year) => days[new Date(year, month, day).getDay()];
const getYear = () => (new Date()).getFullYear();
const getNextHoliday = function(holidays){
const now = new Date()