Skip to content

Instantly share code, notes, and snippets.

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()
@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
@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="

Just a calendar widget V2

Description

This is just a 2x2 widget that displays the current calendar (Small Widget)

Some settings (color, font) can be changed, other areas (alignment, padding) are WIP

Feel free to change the widget background color, image, or even set the "invisible" background from mzeryck's script here

@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 / calendar_holidays_widget.js
Last active November 4, 2020 02:42
Scriptable - Another calendar widget with holidays
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: red; icon-glyph: calendar;
const spaceDays = 6
const dayFont = new Font('verdana', 10)
const dayColor = new Color('#000')
const todayColor = new Color('#fff')
const todayHilite = new Color('#000')
const dayXColor = new Color('#555', 0.5)
const monthColor = new Color('#CC3F0C')
// 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 / scriptable-calendar-widget.md
Last active April 10, 2021 18:39 — forked from rudotriton/scriptable-calendar-widget.md
Customizable iOS Calendar widget in Scriptable
@brainno722
brainno722 / README.md
Last active February 17, 2024 11:04
Medium widget with circle assets

Circle info widgets

Instructions

  1. Install Scriptable for iOS
  2. Copy/Paste the code into a new file
  3. Adjust colors/font
  4. Add the script to a widget (medium)
  5. It should appear similar to the screenshots

Transparent/no background

@brainno722
brainno722 / README.md
Last active February 17, 2024 11:04
Concentric circle info widgets (Small)

Concentric Circle Info Widget

Instructions

  1. Install Scriptable for iOS
  2. Copy/Paste the code into a new file
  3. Adjust colors/font
  4. Add the script to a widget (medium)
  5. It should appear similar to the screenshots

Transparent/no background