This file contains 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 resolvers: Map<string, (structure: string) => string> = new Map([ | |
["plc", (structure) => { | |
return `https://plc.directory/did:plc:${structure}` | |
}], | |
["web", (structure) => { | |
return `https://${structure}/.well-known/did.json` | |
}], | |
// Room for future DID methods | |
]) |
This file contains 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
local shatter = require("shatter") -- Load the shatter API | |
local mods = peripheral.wrap("back") -- get the modules list | |
if not mods.canvas then -- ensure glasses are present | |
error("Overlay Glasses required") -- error if they aren't there | |
end | |
_G.glasses, handler = shatter(mods.canvas()) -- get the terminal object, and put it in the global scope (for alpha setting [and more!] in the shell) | |
parallel.waitForAll(handler, -- put the handler function in parallel | |
function() | |
term.redirect(glasses) -- redirect to overlay | |
glasses.setBackgroundAlpha(.4) -- set the alpha value of the background to .4, for visibility. |
This file contains 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
#!/bin/zsh | |
# Tiktok speech to text parser | |
# by hugeblank, April 2022 | |
# API endpoint & oneshot reading and playing discovered by @scanlime | |
# https://twitter.com/scanlime/status/1512288857596653568 | |
# First argument - string of text to read | |
# Second argument - voice to use | |
# Usage examples: |
This file contains 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
#!/bin/zsh | |
echo 🎧 `headsetcontrol -b | grep "Battery:" | awk {'printf $2'}` |
This file contains 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 stylesheet is generated, DO NOT EDIT */ | |
/* Copyright 2009, 2015 Red Hat, Inc. | |
* | |
* Portions adapted from Mx's data/style/default.css | |
* Copyright 2009 Intel Corporation | |
* | |
* This program is free software; you can redistribute it and/or modify it | |
* under the terms and conditions of the GNU Lesser General Public License, | |
* version 2.1, as published by the Free Software Foundation. | |
* |
This file contains 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
--[[ Raisin by Hugeblank | |
This code is my property, but I will let you use it so long as you don't redistribute this manager for | |
monetary gain and leave this comment block untouched. Add/remove code as you wish. Should you decide to freely | |
distribute with additional modifications, please credit yourself. :) | |
Raisin can be found on github at: | |
`https://github.com/hugeblank/raisin` | |
Demonstrations of the library can also be found at: | |
`https://github.com/hugeblank/raisin-demos` |
This file contains 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
{ | |
{ | |
source = "https://raw.githubusercontent.com/hugeblank/raisin/master/raisin.lua", | |
path = "raisin.lua", | |
versions = { | |
">= 0.2.0", | |
} | |
}, | |
{ | |
source = "https://raw.githubusercontent.com/hugeblank/qs-cc/377de7135a291a9a3b79e01034432389295f45b9/src/allium/color.lua", |
This file contains 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
local element = require("interactables") -- This is the backbone of this program | |
local text = "Click me!" -- Text to place on button | |
local cbuddon = element.button(5, 5, #text+2, 3) -- Create a button element | |
local function render(sel, lock) -- Rendering function | |
if lock then -- If it is locked gray it out | |
paintutils.drawFilledBox(5, 5, #text+6, 7, colors.gray) | |
elseif sel then -- Otherwise if it's selected make it bright | |
paintutils.drawFilledBox(5, 5, #text+6, 7, colors.lime) | |
else -- Otherwise make it dark |
This file contains 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
local this = {} | |
local function base() | |
-- Base instance declaration, a template for all elements | |
local inst = {links = {}, object = {}} -- Template for all interactable elements | |
inst.object.link = function(...) -- Base and universal function for adding links | |
local l = {...} -- pack all links given | |
for i = 1, #l do -- For each link | |
inst.links[#inst.links+1] = l[i] -- Subscribe it to any emission we provide | |
end |
This file contains 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
--[[ Depman by hugeblank | |
Simple and free to use dependency managment framework to be packaged with your software. | |
The end user is not only allowed to modify the code below, but is encouraged to. | |
Please do not modify this comment block, but do credit yourself and any other | |
contributors in the box below. | |
]] | |
--[[ Depman Instance Information | |
Maintained by: | |
Modified for: |
NewerOlder