Skip to content

Instantly share code, notes, and snippets.

@justarandomgeek
justarandomgeek / mega_reader.ino
Created April 24, 2021 22:02
arduino mega eeprom read/write
/*
D = address 16..23
C = address 8..15
A = address 0..7
L = data 0..7
B0 = !OE
B1 = !WE
B2 = !CE
*/
@justarandomgeek
justarandomgeek / plugin.lua
Last active February 28, 2021 22:07
sumneko plugin.lua for factorio
--##
---@class diff
---@field start integer # The number of bytes at the beginning of the replacement
---@field finish integer # The number of bytes at the end of the replacement
---@field text string # What to replace
local replace_remotes
local type_list
0eNrFW9uO47YZfpWFbjvaSqKOg7bAJi3aiy0CpAFyEQwMWqZtYiRRpaSZTBd+gLxFL9IXy5OUpGwdSYnUzGQvdj2mxI/kf/x+kv5i7bMGlRQXtXX/xcIpKSrr/qcvVoVPBcx4W/1SIuvewjXKrTurgDn/1ve63Fm4OKCfrXv3cifp94Rp3bCWrmv7ho2LIxl09qSd1wcFRoOmZ5Q+Dnr7l4c7CxU1rjFq1y2+vOyKJt8jytbUI9QU4tO5ttkHBy5JxXqRgo/KkGzXubNexCeDP2CK0vapkMoE1RugkgLZzzCTQUYfgyum+zFgqEw5NSXZbo/O8AkTyt9LMU0bXO9IiYrdCdYM9AizCt11TyiCh12Fiop3qGmDWqSinWDFQVz+34kiVAxlgA/WfXh5uFwkKwDdCsSY87kHk7kPJOJJ8Pw1vNAML9DWW3iF9WTLDPUU5W9TFFeGQk8THTLAQzfiEdOq3mnb/N+tdkZVDbmTO/xLXkIKaz6Q9dsv/7UuJiYxFDf/7gKFjUTdTNKGPqGDSgNRK7tIhhF3GLwz81+IC/u69CWHcaZGAiTgibGROLI5cs8fTlI5PV89PV+G6xotPrmhx1PwSK5dig5T3Sp16XqmsoqlMMBUVLPF+MvulWakQp1zyDxM+ug1Dlbi4nHZx/6k9DCZDtypgyU8SxmFZ9c3VVcohenDKCXpI6qZwjIyBwGdYQttMV3hctCJCaJmnWBTk10GmyI93xLRfMTQdOK+dOKRqZ0BLY+MTWcnzSpuH3g4CvPpmpSyyd0wVkxew3bHRKpi6SfLWBs32wpxgLUuV1Ve52E3Ba5bmx+bee9RqID7DO0OuOKfN38TLnikJN+JlY+auRRKdBg/EV+6R9o++YORx4GJx3ku9ysmmhq2crUsDpa1cqfCwU+CHO7F/5C1fPST2AGJ5wbsw/VDEHrA8cM4CmQm4DmGliTNPN4gQ5A9KYnwsykAEABrVpSTA9qRI+cnFHbUVVuEiSISeaaJQ+oxnm7euDEA5tdSHNO
function LuaObjectType(obj)
local t = rawget(obj, "luaObjectType")
if t == nil then
--[[No way to avoid a pcall unfortunately]]
local success, help = pcall(function(obj) return obj.help() end, obj)
local luaObjectType
if not success then
--[[Extract type from error message]]
t = string.sub(help, 1, string.find(help, " ") - 1)
else
0eNrVnNmSqzgSht/F18UEYudEzMXs+77PREeFDLKtKUC0gHK7O+rdJwVeJCxMp457JubmVBxX8VkS4tevzBTfbLbVwFrJm37z6ZsNL0TTbT7965tNx/cNrdRn/allm08b3rN687JpaK3+p/6up03vFaLe8ob2Qm4+Xja8KdlXm0/k42WVULKCl0zaAcHHFy8b1vS852xqz/if02sz1Fsm4RsetuRl04oOrhWN+nrgecHL5gQ/IviKkktWTL+DT+HyXorqdcsO9J3DtXDBjlc9kwvj8M5lP8An1wZMf+HtJTupHhRiUGOZaoPxxfhx00xf2ykYUf/AJazRe8fLsesfH2r8Zj0Orl9Ys5IPtccq4EleeK2omKXL5Nblb/3lRPvi8f8JXMxlMfD+/Ht740Jk4yKXtqVmW5YGKkJOjXhqS/DxxMngazPBX3kslhhEYxDtycAwAo0RXBkhihFqjPDKiFCMSGNEV0aMYsQaI74yEhQj0RjJlZGiGKn1Kc9QjExjZFdGjmLkGiO/zTEfBfmBPsm0mYqbqj/UKbe5SnCT9Uc65TZbCW66/lin3OYrwU3Yn+iU24wluCn7U51ym7MEN2l/plNus5bgpu3PdYq2OmWLy5Nk5VyDk9n6kC1ocIzU4PA70GDVfE25EkcZntYiDZQ6arEyWjonc9TjE6sqcdRJuaMqt7x504XZd1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