Skip to content

Instantly share code, notes, and snippets.

Linux free command with percent

Introduction

This script is a simple and fast awk rewrite of the first two lines of the Linux free -wh command (with amount of memory fixed to mebibytes), calculating the percentage of the total for each value and running on Ubuntu or on the Raspberry Pi. It reads data from /proc/meminfo.

I developed this because free does not provide percentages.

Code

@Ircama
Ircama / PT-P300BT.md
Last active September 21, 2024 13:25
Print to Brother PTP300BT from a computer
@Ircama
Ircama / LgMagicRemoteKeys.md
Last active November 15, 2024 17:26
Replacing Netflix and Amazon keys of the webOS LG TV LG Magic Remote with other apps

Replacing Netflix and Amazon keys of the webOS LG TV LG Magic Remote with other apps

This procedure allows substituting one or both Netflix and Amazon keys of the Magic Remote Control Unit with other apps or TV control menus of the webOS LG TV.

Netflix and Amazon keys can be found just over the Red-Green-Yellow-Blue color buttons of such remote.

Assumption for this procedure is that you accept to uninstall the apps related to the keys to be substituted. Example: if you want to replace the Netflix key, you need to uninstall Netflix (possibly, you are not using Netflix if you do not need such key).

To uninstall Netflix or Amazon Prime, press the Home key of the Magic Remote, select the "LG Content Store" app, press "APP" at the top of the screen, press "My Apps", press the "Rem

@Ircama
Ircama / Digispark.md
Last active November 8, 2024 14:13
Configuring the Digispark ATtiny85 board for Arduino IDE and upgrading the bootloader

Configuring the Digispark ATTINY85 board for Arduino IDE and upgrading the bootloader

Warning: this document has to be updated by pointing to https://github.com/SpenceKonde/ATTinyCore

This note describes the configuration of an ATtiny85 based microcontroller development board named Digispark and similar to the Arduino line. It is available in many online marketplaces for roughly 1 dollar (e.g., Ebay, Amazon, AliExpress) and is shipped fully assembled, including a V-USB interface (a software-only implementation of a low-speed USB device for Atmel's AVR microcontrollers). Coding is similar to Arduino: it uses the familiar Arduino IDE and is already provided with a ready-to-use bootloader (