Skip to content

Instantly share code, notes, and snippets.

@EggToaster
EggToaster / Script.lua
Created October 5, 2024 14:10
A script to turn two string values to two string=>hex=>B64 value, then append it in file(Dual battery rename creator)
---@diagnostic disable: need-check-nil --SHUTUP DAMN LOGS
function toHex(str)
return (str:gsub(".", function(char) return string.format("%02x", char:byte()) end))
end
function toB64(data)--ew, b64 sucks
local b='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
return ((data:gsub('.', function(x)
local r,b='',x:byte()
for i=8,1,-1 do r=r..(b%2^i-b%2^(i-1)>0 and '1' or '0') end
return r;
1. (sv_cheats 1) in title screen on console
2. (sv_airaccelerate 0) in console, anywhere
3. (sv_airstrafeaccelerate insert-speed-not-0) in console, anywhere
4. Enjoy! Holding space and W does not work, and you will have to Bhop like in Gsc/Src games.
@EggToaster
EggToaster / frickoffcpuz.lua
Last active October 8, 2024 03:07
Convert CPU-Z output to actual .rom file
--!/usr/bin/env lua
---@diagnostic disable: need-check-nil
-- frickoffcpuz.lua
--
-- Converts BIOS file generated from CPU-Z to actual BIOS file so you
-- can use it with many programs.
-- CPU-Z will generate txt file with both binary data and ASCII data,
-- but doesn't work with many programs as they except binary data.
--
@EggToaster
EggToaster / timeso.lua
Last active May 17, 2024 08:30
Get FreeSO time with Lua
local m = os.date("!%M") -- UTC minutes
local s = os.date("!%S") -- UTC seconds
s = m * 60 + s -- combining seconds and minutes
local h = math.floor(s / 300) -- freeso hour calculation
if h == 0 then -- 0:xx to 24:xx
h = 24
end
m = math.floor(s % 300 / 5) -- freeso minutes calculation