Skip to content

Instantly share code, notes, and snippets.

View emendoza2's full-sized avatar

Elijah Mendoza emendoza2

View GitHub Profile
@emendoza2
emendoza2 / saver.js
Created January 6, 2023 08:54
Form Saver Bookmarklet
// Source code for the bookmarklet.
// This code appends a few buttons to a page to save and load form values from local storage for persistence
function serializeInputs() {return Array.from(document.querySelectorAll("input, textarea")).map(({id, tagName, name, value}) => ({id, tagName, name, value}))}
function restoreInputs(serialized) {serialized.forEach(({id, tagName, name, value}) => {var $el = document.querySelector(id ? `#${id}` : `${tagname}[name="${name}"`); $el.value ??= value})}
function save() {
localStorage.setItem("formFields", JSON.stringify(serializeInputs()))
}
function load() {
@emendoza2
emendoza2 / Main.lua
Created September 30, 2018 08:52
Codea Community AutoInstall
--# Main
--Codea Community Single Install
--Installer created by @Briarfox
--- This will pull the Codea Community project into Codea for you
-- Instructions:
-- * Create a new project in Codea named Codea Community If you chose another name please change the variable Below
--This is case sensitive
ProjectName = "Codea Community"
-- * Paste this into the Main (not from the raw view, as iSafari will escape special characters)
@emendoza2
emendoza2 / Main.lua
Created September 30, 2018 08:51
Codea Community AutoInstall
--# Main
--Codea Community Single Install
--Installer created by @Briarfox
--- This will pull the Codea Community project into Codea for you
-- Instructions:
-- * Create a new project in Codea named Codea Community If you chose another name please change the variable Below
--This is case sensitive
ProjectName = "Codea Community"
-- * Paste this into the Main (not from the raw view, as iSafari will escape special characters)
@emendoza2
emendoza2 / 1aTabOrder
Last active September 30, 2018 08:51
Codea Community Release v1.1.1.4 -Community for Codea (patched)
Codea Community Tab Order Version: 1.1.1.4
------------------------------
This file should not be included in the Codea project.
#Main
#ChangeLog
#Bootstrap
#ccVars
#Community
#Pending
#Delete
@emendoza2
emendoza2 / Main.lua
Created September 18, 2017 12:37
Voronoi Maps AutoInstall
--# Main
--Voronoi Maps Single Install
--Installer created by @Briarfox
--- This will pull the Voronoi Maps project into Codea for you
-- Instructions:
-- * Create a new project in Codea named Voronoi Maps If you chose another name please change the variable Below
--This is case sensitive
ProjectName = "Voronoi Maps"
-- * Paste this into the Main (not from the raw view, as iSafari will escape special characters)
@emendoza2
emendoza2 / Main.lua
Created September 15, 2017 12:02
Pixel Art AutoInstall
--# Main
--Pixel Art Single Install
--Installer created by @Briarfox
--- This will pull the Pixel Art project into Codea for you
-- Instructions:
-- * Create a new project in Codea named Pixel Art If you chose another name please change the variable Below
--This is case sensitive
ProjectName = "Pixel Art"
-- * Paste this into the Main (not from the raw view, as iSafari will escape special characters)
@emendoza2
emendoza2 / Main.lua
Created September 10, 2017 07:58
Pixel Art AutoInstall
--# Main
--Pixel Art Single Install
--Installer created by @Briarfox
--- This will pull the Pixel Art project into Codea for you
-- Instructions:
-- * Create a new project in Codea named Pixel Art If you chose another name please change the variable Below
--This is case sensitive
ProjectName = "Pixel Art"
-- * Paste this into the Main (not from the raw view, as iSafari will escape special characters)
@emendoza2
emendoza2 / Main.lua
Created August 26, 2017 10:14
FallingSand AutoInstall
--# Main
--FallingSand Single Install
--Installer created by @Briarfox
--- This will pull the FallingSand project into Codea for you
-- Instructions:
-- * Create a new project in Codea named FallingSand If you chose another name please change the variable Below
--This is case sensitive
ProjectName = "FallingSand"
-- * Paste this into the Main (not from the raw view, as iSafari will escape special characters)
@emendoza2
emendoza2 / slither_clone.lua
Last active May 9, 2017 05:28
A Slither.io Clone Created using Codea
--# Button
Button = class()
-- Fast Mesh Button Class courtesy of @Vega
function Button:init(text,x,y,width,height)
self.state = "normal"
self.text = text
self.textColor = color(255,255,255,192)