Skip to content

Instantly share code, notes, and snippets.

@ttscoff
ttscoff / 256color.rb
Last active July 14, 2022 23:57
256-color hex intepretation for terminal colorization
#!/usr/bin/env ruby
# frozen_string_literal: true
# 256-color hex interpretation for terminal colorization
#
# Usage
# "text".color256(foreground, background)
#
# print "Colorize this".color256('#f7921e', '#666')
@spencerwooo
spencerwooo / resinWidget.js
Last active December 6, 2022 22:57
Current Resin for Genshin Impact
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-brown; icon-glyph: magic;
const config = new Array()
// ========= ↓将生成的配置粘贴这以下↓=========
config[0] = "" // uid
config[1] = "cn_gf01" // cn_gf01 天空岛 or cn_qd01 世界树
config[2] = "" // cookie
// ========= ↑将生成的配置粘贴这以上↑ ========
@gildas-lormeau
gildas-lormeau / README.MD
Last active August 31, 2024 23:36
CLI to transform a SingleFileZ page into a SingleFile page
@mpociot
mpociot / README.md
Last active December 6, 2022 22:46
console.style

Use Tailwind classes in console.log

This script adds a new method called console.style to the global console object, that allows you to style a string - followed by Tailwind CSS classes to apply to this string.

For example:

console.style("I am styled", "p-4 bg-black text-white text-2xl");
@amirsaam
amirsaam / SubCounter.js
Last active October 29, 2023 00:52 — forked from spencerwooo/termiWidget.js
🤖 SubCounter | Terminal-like Widget for Scriptable iOS made with SubStats v2 API
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: red; icon-glyph: terminal;
// SubCounter.js for Scriptable: https://github.com/amirsaam/SubCounter-for-Scriptable
// Change NULL to your prefered Terminal username (only lowercase) you geek!
const user = "NULL"
// Change NULL to your usernames

⚠️ This guide has moved ⚠️

Updates for both 1.18.2 and newer versions can be found at https://minecraft.wiki/w/Tutorial:Custom_structures

Custom data pack structures in 1.18.2

This guide will showcase how to create a data pack that adds a custom structure to the world. There is also a data pack download of this complete example.

Always leave the world and rejoin to apply the new changes!

Pack.mcmeta

@francisfeng
francisfeng / save-tabs-safari-anybox.applescript
Last active January 17, 2025 12:44
Save all tabs of Safari’s current window to Anybox
tell application "Safari"
repeat with tabItem in tabs of window 1
set link to URL of tabItem
tell application id "cc.anybox.Anybox"
save link
end tell
end repeat
end tell
@Normal-Tangerine8609
Normal-Tangerine8609 / html-gradient.js
Created January 17, 2022 01:38
Scriptable HTML Gradient
/*
* HTMLGradient
*
* HTMLGradient(gradient: string): Promis<gradient>
*
* example
* ------------
* const widget = new ListWidget()
* widget.backgroundGradient = await HTMLGradient("to left, red, green 25%, blue-yellow")
* widget.presentSmall()
@chris1111
chris1111 / Terminal Profiler.scpt
Last active November 16, 2022 09:02
Terminal Profiler Applescript.scpt
# Apple Script by chris1111
# Copyright (c) 2021 chris1111 All rights reserved.
set Term to choose from list {"Pro", "Homebrew", "Basic", "Grass", "Man Page", "Novel", "Ocean", "Red Sands", "Silver Aerogel", "Solid Colors"} with title "Setup Terminal Profiles" with prompt "Which profiles do you want to uses?" default items "Pro" OK button name {"Profiles"} cancel button name {"Cancel"}
tell application "Terminal"
activate
end tell
do shell script "killall -c Terminal"