Skip to content

Instantly share code, notes, and snippets.

@cxmeel
cxmeel / PrintEnv.luau
Last active February 21, 2024 19:33
Pretty-prints the current state of the OS environment to the console
local process = require("@lune/process")
local serde = require("@lune/serde")
local AVAILABLE_FORMATS = {
json = "json",
table = "json",
yml = "yaml",
yaml = "yaml",
toml = "toml",
}
@cxmeel
cxmeel / .darklua.json
Last active February 19, 2024 23:01
Bundling lune projects and building to standalone binary
{
"bundle": {
"require_mode": "path",
"excludes": [ "@lune/**" ]
},
"generator": "dense"
}
@cxmeel
cxmeel / MD_BUTTONS_DOCS.md
Last active March 28, 2025 18:05
Documentation for markdown buttons.

Markdown Buttons

A collection of SVG buttons for displaying custom "buttons" in Markdown content. You are free to use these buttons wherever you like. All buttons were created in Figma, with (most) icons provided by the Iconify plugin.

Sponsor on GitHub View Itch.io Store

The SVG files can be found on this gist. They have been separated in order to reduce the amount of lag when loading this README file.

--!strict
local RunService = game:GetService("RunService")
local Camera = workspace.CurrentCamera
local Module = {}
Module.Position = UDim2.new(0, 0, 0, 0)
Module.Size = UDim2.new(1, 0, 1, 0)
local function UDim2Absolute(udim2: UDim2)
@cxmeel
cxmeel / README.md
Created October 23, 2023 17:05
Luau Snippets

Luau Snippets

A collection of Luau snippets that can be copied and pasted directly into your code.

UrlDecode

Decodes a URL-encoded string back into human-readable characters.

UrlDecode("https%3A%2F%2Fcreate%2Eroblox%2Ecom") -- "https://create.roblox.com"
@cxmeel
cxmeel / RobloxFonts.lua
Last active December 2, 2024 12:11
An almost complete list of Fonts available locally and via Roblox cloud fonts.
--!strict
-- This file is automatically generated by Font List Generate
-- by @cxmeel (cxmeels). Do not edit this file manually.
export type IFont = {
ContentUri: string,
Name: string,
Aliases: { string },
Weights: { Enum.FontWeight },
Styles: { Enum.FontStyle },
@cxmeel
cxmeel / README.md
Last active October 14, 2023 14:58
JavaScript Snippets

A collection of JavaScript snippets, mostly used in custom UserScripts. You can paste them into your code directly, or @require them using the GitHub raw link.

// equivalent to `const container = document.querySelector("div.container")`
const container = $("div.container")
@cxmeel
cxmeel / README.md
Last active May 29, 2023 07:09
A small utility module for creating React/Roact components with default props.

This has been replaced with default-props. See the project page here:

https://github.com/csqrl/default-props

withDefaultProps

A small utility module for creating React/Roact components with default props.

Setup for Roact

@cxmeel
cxmeel / semver.lua
Last active May 23, 2023 11:25
Basic semver string library implemented in Luau.
--!strict
--[[
Provides a set of functions for comparing semver strings.
See https://semver.org/ for more information.
Types:
type SemverRecord = {
major: number,
minor: number,
patch: number,