Skip to content

Instantly share code, notes, and snippets.

View Midnightific's full-sized avatar
🌌
lost among the stars

Griffin Midnightific

🌌
lost among the stars
View GitHub Profile
--[[
Copyright 2024 Cameron Campbell
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:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE U
-- Licensed under the MIT License, Copyright (c) 2024 jack.ink
local function resume_with_error_check(thread: thread, ...: any): ()
local success, message = coroutine.resume(thread, ...)
if not success then
print(string.char(27) .. "[31m" .. message)
end
end
@boatbomber
boatbomber / release.luau
Last active April 8, 2025 22:54
Release workflow using Lune
--[[
release.luau - A Lune script for publishing Roblox games
MPL 2.0 License
(c) 2024, Zack Ovits
usage: lune run release
--]]
-- Lune libraries
local stdio = require("@lune/stdio")
@Midnightific
Midnightific / RobloxEntityTypes.lua
Last active September 6, 2024 09:02
Contains type definitions for Roblox game entities, including characters and players. Defines structures for Humanoid, Clothing, Player GUI, Scripts, and other related components.
--!strict
--@class RobloxEntityTypes
--@author Midnightific
--[=[
@class RobloxEntityTypes
Contains type definitions for Roblox game entities, including characters and players.
Defines structures for Humanoid, Clothing, Player GUI, Scripts, and other related components.
@jemmanuel
jemmanuel / reallocation.md
Created April 10, 2020 14:26
Optimal memory reallocation and the golden ratio

This is based on a neat little post that I saw on Simon Frankau‘s blog that I thought I’d provide a few more details on, as well as bringing it to a wider audience. Some higher-level data structures in object-oriented programming languages have dynamic memory allocation. This is used to create objects (usually things that behave like lists) that can grow and shrink as the program executes. When initializing a regular array in C or Java, you have to specify the size of the array on creation, for example with

int myArray[] = new int[10];