Skip to content

Instantly share code, notes, and snippets.

View lukasMega's full-sized avatar
🦡

Lukáš Melega lukasMega

🦡
  • Slovakia
View GitHub Profile
@lukasMega
lukasMega / Modbus XY-MD02 sensor.md
Last active June 24, 2024 09:25
Modbus RS-485 temperature & humidity sensor from Aliexpress
@lukasMega
lukasMega / FreshRSS_word_highlighter.md
Last active May 20, 2024 19:17
FreshRSS word highlighter

FreshRSS word highlighter

See also discussion and how to use: FreshRSS/FreshRSS#6475

source (CSS):

/* CustomHighligher v0.0.3 */
#stream mark {
@lukasMega
lukasMega / remove_bloatware_10pro
Created April 4, 2024 09:43 — forked from Gromina/remove_bloatware_10pro
OnePlus 10 pro bloatware removal script. run it adb shell
# Source: https://www.droidwin.com/remove-bloatware-debloat-oneplus-10-pro-no-root/
#
pm uninstall -k --user 0 com.android.apps.tag # Stock android fluff
pm uninstall -k --user 0 com.android.bips # Stock android fluff
pm uninstall -k --user 0 com.android.bluetoothmidiservice # Stock android fluff
pm uninstall -k --user 0 com.android.bookmarkprovider # Stock android fluff
pm uninstall -k --user 0 com.android.calllogbackup # Stock android fluff
pm uninstall -k --user 0 com.android.cellbroadcastreceiver.overlay.common # Stock android fluff
pm uninstall -k --user 0 com.android.cts.priv.ctsshim # Stock android fluff
pm uninstall -k --user 0 com.android.dreams.basic # Stock android AOD provider. This is needed for AOD to work fully
@lukasMega
lukasMega / My Unraid server (Odroid H3).md
Last active April 14, 2024 20:09
My Unraid server (Odroid H3)

Unraid

📦 Tweaks: Install additional packages

install bc

  • Why? Needed for script to enable ASPM
    • Why? In order to achieve lower idle power consumption, when PCI devices
@lukasMega
lukasMega / low-power home-server-i3.md
Last active June 6, 2024 12:47
Low-power minimalistic home server i3

My home-server (⚡ 2.0 — 2.8 W idle DC power consumption, 3 — 3.5 W on AC side)

HW configuration

MB:  Asus Pro H610T D4-CSM
CPU: Intel i3-13100 (TDP 60W)
RAM: 1x Crucial 32GB DDR4-3200 SODIMM (CT32G4SFD832A)  # max. is 2x32GB
SSD: 1x m.2 Samsung 980 Pro 1TB
PSU: 12V 150W from AKASA # (https://www.akasa.com.tw/update.php?tpl=product/product.detail.tpl&model=AK-PD150-02K)
@lukasMega
lukasMega / RRDTool_cpu_temp.md
Last active December 19, 2023 15:00
Create simple graph of CPU temperature using RRDTool

📈 Create simple graph of CPU temperature using RRDTool

RRDTool

RRDtool is the OpenSource industry standard, high performance data logging and graphing system for time series data. RRDtool can be easily integrated in shell scripts, perl, python, ruby, lua or tcl applications.

  • more info:

    RRDtool refers to Round Robin Database tool. Round robin is a technique that works with a fixed amount of data, and a pointer to the current element. Think of a circle with some dots plotted on the edge. These dots are the places where data can be stored. Draw an arrow from the center of the circle to one of the dots; this is the pointer. When the current data is read or written, the pointer moves to the next element. As we are on a circle there is neither a beginning nor an end, you can go on and on and on. After a wh

@lukasMega
lukasMega / Zyxel_GS1200_.md
Last active June 6, 2024 12:54
Zyxel GS1200 get info
@lukasMega
lukasMega / require-named-effect.md
Last active January 20, 2023 14:39
ESLint rule: disallow arrow function in react's `useEffect`
@lukasMega
lukasMega / require-named-effect.js
Created December 1, 2022 10:25 — forked from dgcoffman/require-named-effect.js
libs/eslint-rules/require-named-effect.js
const isUseEffect = (node) => node.callee.name === 'useEffect';
const argumentIsArrowFunction = (node) => node.arguments[0].type === 'ArrowFunctionExpression';
const effectBodyIsSingleFunction = (node) => {
const { body } = node.arguments[0];
// It's a single unwrapped function call:
// `useEffect(() => theNameOfAFunction(), []);`
if (body.type === 'CallExpression') {