Skip to content

Instantly share code, notes, and snippets.

View lukasMega's full-sized avatar
🦡

Lukáš Melega lukasMega

🦡
  • Slovakia
View GitHub Profile
@lukasMega
lukasMega / geoip.sh
Created February 10, 2025 12:58 — forked from woods/geoip.sh
iptables geoip xtables firewall by country
# This is an example of how to use xtables / xt_geoip to block requests
# based on their source/destination country.
#
# It can be computationally expensive to have tons of iptables rules.
# According to the bottom of the following page, this xt_geoip is probably
# about as efficient as can be for doing this kind of thing:
# http://xtables-addons.sourceforge.net/geoip.php
# Install packages
apt-get install xtables-addons-common libtext-csv-xs-perl unzip
@lukasMega
lukasMega / STREAMDECK_HID.md
Created December 5, 2024 17:36 — forked from cliffrowley/STREAMDECK_HID.md
Notes on the Stream Deck HID protocol

Stream Deck Protocol

How to interface with a Stream Deck device.

Synopsis

The device uses the HID protocol to communicate with its software.

Configuration

@lukasMega
lukasMega / Ajazz_Stream_Deck_Protocol.md
Created December 5, 2024 17:36 — forked from ZCube/Ajazz_Stream_Deck_Protocol.md
Notes on the Ajazz Stream Deck HID protocol

Ajazz Stream Deck Protocol

How to interface with a Ajazz Stream Deck device.

Synopsis

The device uses the HID protocol to communicate with its software.

Configuration

The number of keys can be determined from the HID device descriptors. There is currently no known provision to determine their layout or size. The buttons on the current version of the device (AKP153)

@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 February 25, 2025 10:00
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