Skip to content

Instantly share code, notes, and snippets.

@watsuprico
watsuprico / envSandbox
Created May 2, 2020 02:01
ComputerCraft Environment Sandbox example. Places the 'user' into a seperate clone of the global environment. They can edit 'non-protected' values, but these edits are saved into a new 'usersapce.environment' table (therefore the user can only effect their environment). Optional read-only 'protected' environment available to prevent user changes…
local native_rawset = rawset
local native_rawget = rawget
local Userspace = { -- Session data
protected = { -- User can NOT override these
test = "Protected",
username="abba",
userID="1001",
logout=function() return "logOut" end
--[[
Windowed (API/Program)
For ComputerCraft
Free for use. :^) (But please do keep this here)
If you make any modifications that make this program better please tell me and send a copy. If your mod is good I'll add it to the newest update ;^)
v1.0 (7/5/16)-(REDO 7/7/16)-(7/11/16)
@watsuprico
watsuprico / S.S. Shrimp - Comp Code.c
Last active September 24, 2019 02:04
Shrimp Industries: S. S. Shrimp (Base v1.1) - SkillsUSA: Mobile Robotics (2019) Competition Code
#pragma config(Sensor, dgtl1, Green1, sensorLEDtoVCC)
#pragma config(Sensor, dgtl2, Green2, sensorLEDtoVCC)
#pragma config(Sensor, dgtl3, Yellow1, sensorLEDtoVCC)
#pragma config(Sensor, dgtl4, Yellow2, sensorLEDtoVCC)
#pragma config(Sensor, dgtl5, Red1, sensorLEDtoVCC)
#pragma config(Sensor, dgtl6, Red2, sensorLEDtoVCC)
#pragma config(Sensor, dgtl12, DEBUG, sensorTouch)
#pragma config(Motor, port2, RightTrackMotor, tmotorVex393_MC29, openLoop, reversed, driveRight)
#pragma config(Motor, port3, BottomLiftMotor, tmotorVex393_MC29, openLoop, reversed)
#pragma config(Motor, port4, TopLiftMotor, tmotorVex393_MC29, openLoop)