Skip to content

Instantly share code, notes, and snippets.

Avatar

Lucas Gangstad LastTalon

View GitHub Profile
@LastTalon
LastTalon / testez.d.lua
Last active September 22, 2022 16:02
TestEZ Definitions
View testez.d.lua
type Expectation = {
to: Expectation,
be: Expectation,
been: Expectation,
have: Expectation,
was: Expectation,
at: Expectation,
never: Expectation,
a: (typeName: string) -> Expectation,
View code_of_conduct.md

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.
View # Roblox CI Workflow.md

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

View ci.yaml
name: CI
on:
pull_request:
push:
branches:
- master
jobs:
lemur:
View Scanner.rb
# 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
View global.py
def A():
def B():
global g
g = 5
return B
def C():
f = A()
f()
print g
View enclose.py
def A(x):
def B():
return x
return B
def C(y):
f = A(y)
print f()
C(2) # -> 2
View rScramble.lua
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]