Skip to content

Instantly share code, notes, and snippets.

View Ale32bit's full-sized avatar
💤
Postponing projects, as usual

Alessandro Proto Ale32bit

💤
Postponing projects, as usual
View GitHub Profile
@Ale32bit
Ale32bit / Flux.lua
Last active April 10, 2025 21:17
Flux: event-driven CC
--[[
Flux by AlexDevs (c) 2025
This software is licensed under the MIT license.
]] --
---Assert a value type of arguments
---@private
---@param value any Value to check against.
---@param index number|string Position of the argument in the function. Starts at 1.
--[[
-- List items in Create Vault!
-- AlexDevs.me - MIT License
--
-- Link Display Link to Target Block,
-- placed on top of Smart Observer facing the vault.
--
-- Configure Display Link to "List matching items"
-- in "Millibuckets" mode. Set Line to 1.
@Ale32bit
Ale32bit / memorystream.lua
Last active March 18, 2024 19:56
CC virtual file handle with read and write capabilities
--[[
MemoryStream.lua for CC (c) 2024 AlexDevs
]]
local expect = require("cc.expect").expect
local function contains(arr, val)
for i, v in ipairs(arr) do
if v == val then
return true
@Ale32bit
Ale32bit / webpackage.lua
Created September 19, 2023 07:45
Load packages from the web without downloading to files. Science isn't about *why* - it's about *why not*.
--[[
WebPackage by AlexDevs
Load packages from the web without downloading to files.
(Requires HTTP to be enabled ofc)
Usage:
require("webpackage")
local myPackage = require("https://pastebin.com/raw/pe3mgfdi")
@Ale32bit
Ale32bit / tenebra.lua
Last active September 18, 2023 14:30
Tenebra Staking Node for CC: Tweaked
--[[
Tenebra Staking Node for CC: Tweaked by AlexDevs
]]--
local args = {...}
local defaultSyncNode = "https://tenebra.lil.gay"
local privateKey = args[1]
local syncNode = args[2] or defaultSyncNode
/*
Respects Bot by AlexDevs
The only good respects bot
Copyright (c) 2023 AlexDevs
Press F to pay respects
*/
const path = require("path");
@Ale32bit
Ale32bit / begone-gg-sans.css
Last active June 1, 2024 11:32
Removes gg sans from discord
:root {
--font-primary: Whitney, "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
--font-display: Whitney, "Noto Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
@Ale32bit
Ale32bit / devbin.conf
Last active November 27, 2022 21:56
DevBin reverse proxy config for NGINX
server {
listen 80;
server_name devbin.dev www.devbin.dev d.devbin.dev;
client_max_body_size 10M;
location / {
proxy_pass http://127.0.0.1:3003;
proxy_set_header Host $host;
@Ale32bit
Ale32bit / shield.lua
Created September 26, 2022 14:24
CraftOS Shield wrapper
--[[
Shield by AlexDevs
Protect a function from termination by wrapping it.
Usage: shield(function[, ...args])
Example: local input = shield(read, "*")
(c) 2022 AlexDevs
The MIT License
@Ale32bit
Ale32bit / readBDFFont.lua
Created September 15, 2022 14:43 — forked from MCJack123/readBDFFont.lua
BDF font loader for Lua 5.4+
-- MIT License
--
-- Copyright (c) 2019 JackMacWindows
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
-- in the Software without restriction, including without limitation the rights
-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-- copies of the Software, and to permit persons to whom the Software is
-- furnished to do so, subject to the following conditions: