Skip to content

Instantly share code, notes, and snippets.

View erikLundstedt's full-sized avatar
🐧

erik lundstedt erikLundstedt

🐧
View GitHub Profile
@erikLundstedt
erikLundstedt / quantity_unit.php
Last active May 26, 2024 18:35 — forked from randompherret/quantity_unit.php
Script to import conversion factors into grocy
<?php
include_once("./secrets.php");
$quantity_units = [
"Cup" => [
"name" => "Cup",
"description" => "",
"name_plural" => "Cups"
],
"Gallon" => [
"name" => "Gallon",
@erikLundstedt
erikLundstedt / shell.lua
Last active September 30, 2022 12:54 — forked from dukeofgaming/os.capture
Capture console output from Lua system call
---
-- Function to retrieve console output
--
local shell={}
function shell.capture(cmd)
local handle = assert(io.popen(cmd, 'r'))
local output = assert(handle:read('*a'))
handle:close()