Skip to content

Instantly share code, notes, and snippets.

View Dekkonot's full-sized avatar

Micah Dekkonot

  • Uplift Games
  • Washington State
  • 13:24 (UTC -07:00)
View GitHub Profile
@Dekkonot
Dekkonot / definition.d.lua
Created February 29, 2024 22:21
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 April 18, 2024 06:51
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 = {}
@Dekkonot
Dekkonot / sha1.lua
Last active October 13, 2023 02:07
Implementation of the SHA-1 hashing algorithm for Roblox
-- I claim no copyright over this source code and you can use it for whatever you want. Just don't sue me.
local ASSERTIONS_ENABLED = true -- Whether to run several checks when the module is first loaded and when a message is preprocessed.
local INIT_0 = 0x67452301
local INIT_1 = 0xEFCDAB89
local INIT_2 = 0x98BADCFE
local INIT_3 = 0x10325476
local INIT_4 = 0xC3D2E1F0