Skip to content

Instantly share code, notes, and snippets.

View Quenty's full-sized avatar
🎉
Follow me on Twitter @Quenty

James Onnen Quenty

🎉
Follow me on Twitter @Quenty
View GitHub Profile
products:
robux_1:
name: 1 Robux
price: 1
robux_2:
name: 2 Robux
price: 2
robux_3:
name: 3 Robux
price: 3
https://www.intel.com/content/www/us/en/download/19390/intel-wireless-bluetooth-for-intel-wireless-7260-family-and-intel-dual-band-wireless-ac-3160.html
local BINDABLE_FUNCTION_NAME = "BindableFunctionForTaskFarm"
local function setupTaskFarm(tasks)
local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore"))
local Promise = require("Promise")
local RandomUtils = require("RandomUtils")
local PromiseUtils = require("PromiseUtils")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local printRender = false
UserInputService.InputBegan:ConnectParallel(function(inputObject)
print("Running parallel (ConnectParallel) ", tick())
printRender = true
end)
@Quenty
Quenty / StaticEventHandersDoNotPreventGC.cs
Created December 14, 2020 22:26
C# verification that events GC when connected with static functions. This snippet proves that this is the case.
using System;
namespace TestEventBehaviorConsoleApp
{
class MessageEventArgs : EventArgs
{
public string Message { get; set; }
public MessageEventArgs(string message)
{
local function readonly(_table)
return setmetatable(_table, {
__index = function(self, index)
error(("Bad index %q"):format(tostring(index)), 2)
end;
__newindex = function(self, index, value)
error(("Bad index %q"):format(tostring(index)), 2)
end;
})
end
---
-- @classmod CameraChallenge
-- @author Quenty
local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore"))
-- Challenge:
-- 1. Make `camera' always point to the the current or last known camera.
-- a. Problem: CurrentCamera can be nil.
-- b. Guarantee that `camera' is never nil.
---
-- @module WaveCollapseUtils
-- @author Quenty
local WaveCollapseUtils = {}
local EDGE_DATA = {
{
2, -- Edge index (forward)
1, -- Neighbor's edgeindex (backward)
local function cross(vector0, vector1)
local ux, uy = vector0[1], vector0[2]
local vx, vy = vector1[1], vector1[2]
return ux*vy - uy*vx
end
local function area(points)
local area = cross(points[#points], points[1])
for i=1, #points-1 do
@Quenty
Quenty / IgnoreCameraClient.lua
Created August 29, 2019 21:19
IgnoreCameraClient.lua
--- Utilizes a hack to force the popper camera to blacklist the parts in question
-- @classmod IgnoreCameraClient
-- @author Quenty
local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Nevermore"))
local RunService = game:GetService("RunService")
local HttpService = game:GetService("HttpService")
local BaseObject = require("BaseObject")