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.github.com/hugeblank/raisin/0c71e68ee0b228ba2aa33dc9918f05e10d6e1092/raisin.lua", | |
path = "raisin.lua", | |
versions = { | |
"0.0.0", | |
"0.0.1-test" | |
} | |
}, | |
{ |
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
--[[ nap by hugeblank | |
Nap is designed for use as a REST API parser, but works remarkably great with HTTP in general. | |
It uses metatables to detect indexing, and when called GETs/POSTs/ETC. the given data depending on the table passed in. | |
Ex: | |
nap = require("nap") | |
github = nap("https://api.github.com") | |
handle = github.repos['username']['repo'].git.trees.master({ | |
method = "GET", | |
query = {["recursive"] = 1} | |
}) |
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
--[[ | |
Requirable form of ElvishJerricco's JSON parsing API | |
Original: http://pastebin.com/4nRg9CHU | |
]] | |
local this = {} | |
------------------------------------------------------------------ utils | |
local controls = {["\n"]="\\n", ["\r"]="\\r", ["\t"]="\\t", ["\b"]="\\b", ["\f"]="\\f", ["\""]="\\\"", ["\\"]="\\\\"} | |
local function isArray(t) | |
local max = 0 |
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
-- SemVer parser by hugeblank https://github.com/hugeblank | |
-- Parses strings that meet SemVer 2.0.0 specs as documented here: https://semver.org/spec/v2.0.0.html | |
-- Feel free to use/redistribute/modify this file. Should you do so keep the above 3 lines as they are. | |
-- Any strings that don't meet SemVer specs the parse will return false, and the rule number violated | |
-- If successful, parser will return a table that can be compared with other SemVer tables. | |
local this, meta = {}, {} | |
meta.__eq = function(in1, in2) |
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
-- DynaHex by hugeblank | |
-- Dynamically load and unload palette segments | |
--[[ BEGIN LICENSE | |
I, hugeblank formally do not give a rats arse about what you do with this code. | |
END LICENSE ]] | |
local this = {} -- This API | |
local reserved = {} -- Colors set based on how many objects refer to them. If this number is 0 at any index then that color is not referred. | |
local objects = {} -- Objects that contain hexchex information | |
local orig = {} -- Original pallete colors |
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
os.pullEvent = os.pullEventRaw -- Lock down this computer, we don't really need direct access to it | |
local title = "Your Emus:" -- Replace this with whatever you want to have as the header of this menu | |
local emus = {"Project 1"} -- Your projects. | |
local open, selected, ctr = nil, 1, 0 -- emulator to open, is only set when a project is selected | the project that the cursor is hovering over | the position used to center the text. Half of the value of the largest string in your projects. | |
local x, y = term.getSize() -- Get the size of the terminal | |
for i = 1, #emus do -- For each of your projects | |
if (emus[i]):len() > ctr then -- If the length of this project string is larger than the current center value | |
ctr = (emus[i]):len() -- Set it to that value | |
end | |
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
local args = {...} | |
local convert = loadfile("/.harbor/harbor.lua")().convert -- loadfile in the only necessary harbor function | |
-- Executable compression | |
if not fs.exists("/.harbor/bbpack.lua") then -- If we don't have BBPack installed | |
local bbpdown = http.get("https://pastebin.com/raw/cUYTGbpb") -- get it via http | |
local bbpfile = fs.open("/.harbor/bbpack.lua", "w") -- open a file for it | |
bbpfile.write(bbpdown:readAll()) -- write contents of request | |
bbpfile:close() -- close and close | |
bbpdown:close() |
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 args = {...} | |
local env | |
if #args > 0 then | |
for i = 1, #args do | |
if _ENV[lib] then | |
env = _ENV[lib] | |
else | |
print(lib.." is not a library in _ENV") | |
end | |
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
os.loadAPI("/.harbor/bbpack.lua") -- Write to the file this string | Load the bbpack API locally | |
local bbpack = {} | |
bbpack = _G.bbpack | |
_G.bbpack = nil | |
local boot = " -- Create the boot function, as a string for recursion\ | |
os.loadAPI(\"/.harbor/bbpack.lua\") -- Load the LZW compression algorithm by BombBloke\ | |
local bbpack = {}\ | |
bbpack = _G.bbpack\ | |
_G.bbpack = nil\ | |
local args = {...} -- Pull the arguments into a table\ |
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
--[[ | |
Features: | |
- All arguments are put into a table, so that they don't have to be put in any particular order, like how it is in read(). | |
- Type error protection has been condensed into a more understandable form. | |
- Adds a few arguments, including those from read(), and others that would never make it into read(): | |
- replaceChar (_sReplaceChar) | |
- history (_tHistory) | |
- complete (_fnComplete) | |
- prefix (_sDefault) |
NewerOlder