Skip to content

Instantly share code, notes, and snippets.

View lukasMega's full-sized avatar
🦡

Lukáš Melega lukasMega

🦡
  • Slovakia
View GitHub Profile
@lukasMega
lukasMega / UniFi_AP_useful_commands.md
Last active October 29, 2024 20:45
Unifi AP useful commands (tested on U6-Lite)

Unifi AP useful commands

tested on U6-Lite using SSH:

  • log in to AP: $ ssh ubnt@<IP>
  • default username & password: ubnt & ubnt

@lukasMega
lukasMega / iPad_checks.MD
Last active January 6, 2022 19:12
iPad checks
@lukasMega
lukasMega / Update Portainer.md
Last active April 22, 2024 12:18
Portainer update (docker)
@lukasMega
lukasMega / Find JS variables are leaking into the global scope.md
Created February 25, 2022 09:29
Find what JavaScript variables are leaking into the global scope
@lukasMega
lukasMega / RPi Zero 2 with Dietpi.md
Last active April 20, 2024 21:35
RPi Zero 2 + DietPi

RPi 5 notes

DietPi

Installed packages (2024-01-23):

Installed packages (2024-01-23)
@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') {
@lukasMega
lukasMega / require-named-effect.md
Last active January 20, 2023 14:39
ESLint rule: disallow arrow function in react's `useEffect`
@lukasMega
lukasMega / Zyxel_GS1200_.md
Last active June 6, 2024 12:54
Zyxel GS1200 get info
@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