A Dropbox script that can be used in ComputerCraft. Also provides an FS like API which could be wrapped like a virtual file system.
The syntax is quite simple:
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 |
----------------------------------------------------------------------------- | |
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 | |
----------------------------------------------------------------------------- |
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 |
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 |
--[[ | |
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 |
--- 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() |
{ | |
"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.`" |
import time, hashlib | |
def GenRGBColour(string): | |
md=hashlib.md5() | |
md.update(string) | |
HexColour=md.hexdigest() | |
return [int(HexColour[0:2], 16), int(HexColour[2:4], 16), int(HexColour[4:6], 16)] | |
def GenRandomColour(): | |
return GenRGBColour(str(time.time())) |
* { | |
animation-name: example; | |
animation-duration: 10s; | |
animation-iteration-count: infinite; | |
animation-timing-function: linear; | |
} | |
/* Standard syntax */ | |
@keyframes example { | |
0% {transform:rotate(0deg)} |