Skip to content

Instantly share code, notes, and snippets.

View Dekkonot's full-sized avatar

Micah Dekkonot

View GitHub Profile
@Dekkonot
Dekkonot / crossroads.project.toml
Created April 7, 2025 21:26
what if crossroads but toml?
name = "Classic: Crossroads"
emitLegacyScripts = true
[tree]
"$className" = "DataModel"
[tree.Lighting]
"$path" = "src/Lighting"
[tree.Lighting."$properties"]
@Dekkonot
Dekkonot / date_expansion.luau
Created January 16, 2025 22:25
Implementation of today and tomorrow for Lune's datetime
local datetime = require("@lune/datetime")
local function tomorrow(date: datetime.DateTime): datetime.DateTime
local time: any = table.clone(date:toUniversalTime())
time.day += 1
local success, future = pcall(datetime.fromUniversalTime, time)
if success then
return future
else
time.day = 1
--!native
--!optimize 2
type vector = Vector3
-- stylua: ignore
local HEX_TO_BINARY = {
["0"] = "0000", ["1"] = "0001", ["2"] = "0010", ["3"] = "0011",
["4"] = "0100", ["5"] = "0101", ["6"] = "0110", ["7"] = "0111",
["8"] = "1000", ["9"] = "1001", ["a"] = "1010", ["b"] = "1011",
["c"] = "1100", ["d"] = "1101", ["e"] = "1110", ["f"] = "1111",
--!strict
--!native
--!optimize 2
local BLOCK_FRONT = table.create(80, 0)
local BLOCK_BACK = table.create(80, 0)
--stylua: ignore
local K_FRONT = {
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b,
@Dekkonot
Dekkonot / APIV2-Dump.json
Created July 22, 2024 23:08
API Dump v2 of release 635
This file has been truncated, but you can view the full file.
{
"classes": [
{
"name": "Accessory",
"isUserFacing": true,
"baseClass": "Accoutrement",
"isPublic": true,
"isScriptCreatable": true,
"security": "None",
"members": [
@Dekkonot
Dekkonot / definition.d.lua
Last active October 27, 2024 02:05
Example definitions file
-- This represents a type.
-- It isn't exported into the global environment unless it has `export` before the name.
export type ExampleType = {
example_field: string,
example_method: (any) -> string
}
-- This represents a global table, rather than a type
declare ExampleLibrary: {
function_name: (any) -> string
---
globals:
buffer.create:
args:
- type: number
must_use: true
buffer.fromstring:
args:
- type: string
@Dekkonot
Dekkonot / roblox.xsd
Last active October 21, 2024 22:04
XML Schema for Roblox's XML files
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:group name="DataTypes">
<xs:choice>
<xs:element name="Axes">
<xs:complexType>
<xs:complexContent>
<xs:extension base="Axes">
<xs:attributeGroup ref="DataTypeAttributes" />
</xs:extension>
@Dekkonot
Dekkonot / crossroads.lua
Last active June 15, 2020 07:29
Read of crossroads.rbxm
This file has been truncated, but you can view the full file.
local file = {
{
AllowThirdPartySales = false,
AttributesSerialize = "",
ClassName = "Workspace",
CollisionGroups = "Default^0^1",
CurrentCamera = 3,
DistributedGameTime = 0,
ExplicitAutoJoints = true,
FallenPartsDestroyHeight = -500,
@Dekkonot
Dekkonot / base91.lua
Created October 14, 2019 04:29
Base91 codec for Lua
-- http://base91.sourceforge.net/
-- Based roughly on the reference implementation, though this is entirely written from scratch
-- Licensed under WTFPL (http://www.wtfpl.net/txt/copying/)
local ASSERTIONS_ENABLED = false -- Whether to run several checks when the module is first loaded
local MAKE_JSON_SAFE = false -- If this is true, " will be replaced by ' in the encoding
local CHAR_SET = [[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!#$%&()*+,./:;<=>?@[]^_`{|}~"]]
local encode_CharSet = {}