Skip to content

Instantly share code, notes, and snippets.

@helloj
helloj / genfstab
Created April 6, 2017 07:46
Alpine linux genfstab
#!/bin/sh
# Alpine Linux genfstab
# default location for mounted root
SYSROOT=${SYSROOT:-/mnt}
in_list() {
local i="$1"
shift
while [ $# -gt 0 ]; do
@helloj
helloj / simpleclass.lua
Last active September 5, 2022 13:39
Lua simple class
function simpleclass(base)
return setmetatable(base, {
__call = function(t, ...)
local obj = setmetatable({}, t)
if rawget(t, '__new') then
t.__new(obj, ...)
end
return obj
end
})