Skip to content

Instantly share code, notes, and snippets.

View Ezard's full-sized avatar

Ben Ezard Ezard

View GitHub Profile
@Ezard
Ezard / script.sh
Created September 23, 2023 23:03
Get number of lines of files per directory
for dir in *; do echo -n "$dir: "; ( ( find ./$dir -name '*.kt' -print0 | xargs -0 cat ) | wc -l ); done
@Ezard
Ezard / lua_object_to_json.lua
Created January 27, 2016 03:06
Converts any Lua object into a JSON object, including nested objects
function is_array(t)
for k, v in pairs(t) do
if tonumber(k) == nil then
return false
end
end
return true
end