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()
;;; rational-module.el -*- lexical-binding: t; -*-
;;; License
;; Copyright (C) 2022
;; SPDX-License-Identifier: MIT
;; Author: Erik Lundstedt, System Crafters Community
;;; Commentary:

Keybase proof

I hereby claim:

To claim this, I am signing this object:

@erikLundstedt
erikLundstedt / rc.lua
Created October 5, 2020 12:52
awesome swallow alfa
--https://www.reddit.com/r/awesomewm/comments/h07f5y/does_awesome_support_window_swallowing/
function isFood(c)
if (c.class and c.class:match("Vivaldi-stable")) and true or false then
notify("vivaldi")
return true
elseif( c.class and c.class:match("kitty")) and true or false then
notify("kitty")
return true
else