Skip to content

Instantly share code, notes, and snippets.

View fesdonomist's full-sized avatar
🫓

Thomas Duckworth fesdonomist

🫓
View GitHub Profile
@fesdonomist
fesdonomist / memory_info.sh
Last active November 24, 2024 12:06
Get readable memory information without needing sudo for dmidecode on Linux - taken from plasma/kinfocenter MR !204
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
# SPDX-FileCopyrightText: 2024 Thomas Duckworth <tduck973564@gmail.com>
o="$(udevadm info -q property -p /sys/devices/virtual/dmi/id --no-pager)"
# Calculate minimum width required for all output
width="$(echo "$o"| grep -e "MEMORY_ARRAY" -e "MEMORY_DEVICE" | awk -F '=' '
{
@Transfusion
Transfusion / interpreter_transfusion_fixed.py
Created November 14, 2020 08:17
obama's interpreter
# Dependencies
import os
import sys, traceback
import readline
from platform import python_version
version = "1.0-stable"
# Inbuilt commands