Skip to content

Instantly share code, notes, and snippets.

🦑
Under the sea

SquidDev SquidDev

🦑
Under the sea
Block or report user

Report or block SquidDev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Parser.info
-----------------------------------------------------------------------------
Info file generated by Happy Version 1.19.9 from src/Parser.y
-----------------------------------------------------------------------------
state 53 contains 7 shift/reduce conflicts.
terminal '[' is unused
terminal ']' is unused
-----------------------------------------------------------------------------
@SquidDev
SquidDev / clone.lua
Last active Jun 29, 2019
A tiny git clone library
View clone.lua
local preload = type(package) == "table" and type(package.preload) == "table" and package.preload or {}
local require = require
if type(require) ~= "function" then
local loading = {}
local loaded = {}
require = function(name)
local result = loaded[name]
if result ~= nil then
View fuzzy_match.lua
--- Port of https://github.com/forrestthewoods/lib_fts/blob/master/code/fts_fuzzy_match.js
-- to Lua
--- Check if ptrn is found sequentially within str
local function matchSimple(str, ptrn)
local ptrnCtr, strCtr = 1, 1
local ptrnLen, strLen = #ptrn, #str
while ptrnCtr <= ptrnLen and strCtr <= strLen do
local ptrnChar = ptrn:sub(ptrnCtr, ptrnCtr):lower()
View repl.lua
local loading = {}
local oldRequire, preload, loaded = require, {}, { startup = loading }
local function require(name)
local result = loaded[name]
if result ~= nil then
if result == loading then
error("loop or previous error loading module '" .. name .. "'", 2)
end
View bsrocks.lua
--[[
The MIT License (MIT)
Copyright (c) 2015-2016 SquidDev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
View Howl.lua
local loading = {}
local oldRequire, preload, loaded = require, {}, { startup = loading }
local function require(name)
local result = loaded[name]
if result ~= nil then
if result == loading then
error("loop or previous error loading module '" .. name .. "'", 2)
end
View aeslua.lua
local function _W(f) local e=setmetatable({}, {__index = _ENV or getfenv()}) if setfenv then setfenv(f, e) end return f(e) or e end
local bit=_W(function(_ENV, ...)
--[[
This bit API is designed to cope with unsigned integers instead of normal integers
To do this we add checks for overflows: (x > 2^31 ? x - 2 ^ 32 : x)
These are written in long form because no constant folding.
]]
local floor = math.floor
View CCTweaks-Versions.json
{
"homepage": "https://github.com/SquidDev-CC/CC-Tweaks",
"promos": {
"1.7.10-latest": "0.2.3.4",
"1.7.10-recommended": "0.2.3.4",
"1.8-latest": "0.2.3.4",
"1.8-recommended": "0.2.3.4"
},
"1.7.10": {
"0.2.3.4": "Computronics Multiperipheral Compatability\nUpdate Patcher version fixing issue with `peripheral.getMethods.`"
View Make It Right.css
* {
animation-name: example;
animation-duration: 10s;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
/* Standard syntax */
@keyframes example {
0% {transform:rotate(0deg)}
View bin-example.lua
local parsel = setmetatable({}, {__index = _G})
setfenv(assert(loadfile("lib/parsel.lua") or loadfile("../lib/parsel.lua"), "Cannot find parsel"), parsel)()
local textutils = assert(loadfile("lib/pprint.lua") or loadfile("../pprint.lua"), "Cannot find pprint")()
local a = parsel.symbol "a"
local abtest = (a/"b"/"test"):many()
local braces = abtest:between("{", "}")
local p = (abtest .. braces) % function(res) return { outer = res[1], inner = res[2]} end
You can’t perform that action at this time.