Skip to content

Instantly share code, notes, and snippets.

View LastTalon's full-sized avatar

Lucas Gangstad LastTalon

View GitHub Profile
@LastTalon
LastTalon / testez.d.lua
Last active January 12, 2024 18:32
TestEZ Definitions
type Expectation = {
to: Expectation,
be: Expectation,
been: Expectation,
have: Expectation,
was: Expectation,
at: Expectation,
never: Expectation,
a: (typeName: string) -> Expectation,

Roblox OSS Community Code of Conduct

Conduct

  • We are committed to providing a friendly, safe and welcoming environment for all, regardless of level of experience, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, nationality, or other similar characteristic.
  • Please avoid using overtly sexual aliases or other nicknames that might detract from a friendly, safe and welcoming environment for all.

A CI Workflow for testing in roblox. It includes style checking, testing in Roblox and Lemur, and coverage reporting of Lemur tests.

name: CI
on:
pull_request:
push:
branches:
- master
jobs:
lemur:
# Allows the user to scan through a string one character at a time.
# The scanner automatically gets a new line if it needs one and returns
# the new line character to notify the user that a line break has occurred.
class Scanner
# Initializes the scanner with a new line.
def initialize
@cur_line = gets
end
def A():
def B():
global g
g = 5
return B
def C():
f = A()
f()
print g
def A(x):
def B():
return x
return B
def C(y):
f = A(y)
print f()
C(2) # -> 2
function shuffle(message)
local shuffle = {}
for i=1, string.len(message) do
shuffle[i] = string.sub(message, i, i)
end
local k = 0
local temp = nil
for n = #shuffle, 1, -1 do
k = math.random(1, n)
temp = shuffle[k]