Skip to content

Instantly share code, notes, and snippets.

View jag-k's full-sized avatar
Make a Weather in OpenWeather

Jag_k jag-k

Make a Weather in OpenWeather
View GitHub Profile
@jag-k
jag-k / README.md
Last active April 10, 2025 23:36
Convert your MacOS apps icons to FlexBar Icon Pack!

MacOS Icon Extractor and Converter

This script extracts icons from MacOS applications and system resources, then converts them to a specific JSON format with Base64-encoded images.

Usage:

# Just run a script with default settings
uv run flexbar_macos_icon_extractor.py
// This script shows a random Scriptable API in a widget. The script is meant to be used with a widget configured on the Home Screen.
// You can run the script in the app to preview the widget or you can go to the Home Screen, add a new Scriptable widget and configure the widget to run this script.
// You can also try creating a shortcut that runs this script. Running the shortcut will show widget.
let api = await randomAPI()
let widget = await createWidget(api)
if (config.runsInWidget) {
// The script runs inside a widget, so we pass our instance of ListWidget to be shown inside the widget on the Home Screen.
Script.setWidget(widget)
} else {
// The script runs inside the app, so we preview the widget.
@jag-k
jag-k / HASS Persons.js
Last active January 13, 2024 20:25
HASS Persons bundle
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: blue; icon-glyph: users;
// Config
// You can change the config here
const WIDGET_TITLE = 'Persons at home';
// =========================================
// PLEASE, DON'T CHANGE ANYTHING BELOW THIS COMMENT,
// IF YOU DON'T KNOW WHAT YOU ARE DOING
// =========================================
@jag-k
jag-k / CoffeeLike Widget.js
Created September 28, 2021 13:33
CoffeeLike Widget for Scriptable.app
'use strict'
ADMIN_TAB = MenuTab(
"Админ-панель",
MenuGroup(
"Страницы",
MenuItem(
"Главная",
"main_page"
),
MenuItem(
"Шапка сайта",
@jag-k
jag-k / lab3.py
Last active October 6, 2020 00:45
# Var 9
# %%
# =============================================================================
from logging import debug, basicConfig, DEBUG
# basicConfig(level=DEBUG)
ID_KEY = "id"
# %%
# =============================================================================
@jag-k
jag-k / color_class.py
Created May 10, 2020 13:50
Cross-platform colored text in console
import sys
from platform import system
from typing import Tuple
class Color:
COLOR_SYMBOL = "\x1b"
# ATTRIBUTES
NORMAL = 0
from io import TextIOWrapper
from sys import stdout
from typing import List
def print_matrix(matrix: List[List[int]], file: TextIOWrapper = stdout) -> None:
width, height = len(matrix), len(matrix[0])
# max length for beautify
l: int = len(str(1 + max(
width,
def split_string(string):
buf = []
result = []
buffer = ""
for i in string:
if i in "()[]{}\"'":
continue
if i in ".?!\n":
result.append(buf + [buffer])
buffer = ""
/usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js run start --scripts-prepend-node-path=auto
> [email protected] start /Users/jagk/Yandex.Disk.localized/Projects/secothon
> node backend/server.js
MIGRATION
The "<include>" tag is deprecated. Please use the "<${dynamic}/>" tag or regular text replacement instead. See: https://github.com/marko-js/marko/wiki/Deprecation:-include-tag
at backend/view/pages/admin.marko:89:0