Skip to content

Instantly share code, notes, and snippets.

@Anaminus
Anaminus / WoodReskewer.lua
Last active May 28, 2021 14:07
Some men just want to watch the wood burn.
-- LocalScript; Parent = ReplicatedFirst
-- Adornments not supported.
local WoodReviewerUserIDs = {
[102925343] = true,
}
if not WoodReviewerUserIDs[game:GetService("Players").LocalPlayer.UserId] then
return
@Anaminus
Anaminus / hist.go
Created September 15, 2015 11:23
HistoryStack
package hist
type Value interface{}
// Implements both an undo and redo stack using a circular buffer.
type HistoryStack struct {
buffer []Value
head, tail, cur int
ud, rd bool
}
Original:
<string name="Name">TEST</string>
Result Status:
pass file loads, property value is "TEST"
load file loads, property value is default value
fail file does not load, with an error message
@Anaminus
Anaminus / BalanceCardGame.md
Last active August 29, 2015 14:22
Balance - Card Game

Balance - Card Game

  • 2 or more players.
  • 1 or more standard 52-card decks, each with 0-2 jokers.
  • Aces have a value of 1.
  • Face cards and jokers have a value of 10.
  • Everything else is face-value.

Play

@Anaminus
Anaminus / SolitaireRPG.md
Last active April 11, 2017 17:03
Solitaire RPG

Solitaire RPG

A game about battling monsters, using a standard deck of playing cards.

Character rolling

To roll a new character, select a level to begin. The default is level 8, though you may select any level, including level 0.

Draw a number of cards equal to your chosen level. These will be your

@Anaminus
Anaminus / splash-patch.lua
Created March 12, 2015 06:14
Replaces Roblox Studio's splash screen with another image.
-- Replaces Roblox Studio's splash screen with another image.
--
-- Usage:
--
-- lua splash-patch.lua [STUDIO_PATH] [IMAGE_PATH]
--
-- Specifying no options prompts for input.
-- First KB of original splash image file
@Anaminus
Anaminus / b64fastenc.lua
Last active September 29, 2020 01:40
Lua - Base64 Fast Encode
local encodeByte = {
'A','B','C','D','E','F','G','H',
'I','J','K','L','M','N','O','P',
'Q','R','S','T','U','V','W','X',
'Y','Z','a','b','c','d','e','f',
'g','h','i','j','k','l','m','n',
'o','p','q','r','s','t','u','v',
'w','x','y','z','0','1','2','3',
'4','5','6','7','8','9','-','_',
}
@Anaminus
Anaminus / rbxtype-proposal.md
Created October 8, 2014 05:34
Proposal to add function that returns internal value type

Proposal to add function that returns internal value type

ROBLOX provides many value types other than the Lua primitives, so it should be possible to distinguish these types beyond Lua userdata. Like the type function, a similar function which distinguishes these types should be implemented. Such a function could be used to enforce stricter typing of values, improving error detection and logging.

Function name

@Anaminus
Anaminus / fastwait.lua
Created August 16, 2014 19:13
Fast wait
function fast(f)
local function run()
if f() ~= false then
Spawn(run)
end
end
Spawn(run)
end
local time = 1
@Anaminus
Anaminus / DrawArcs.lua
Last active September 29, 2020 01:40
DrawArcs
-- LOVE2D 0.9.0
-- main.lua
-- Left-click somewhere to add point
-- Left-click and drag green point to move it
-- Right-click green point to remove it
-- Left-click and drag red point to modify starting angle
-- Backspace to remove all points
local Vector2;Vector2 = {