Skip to content

Instantly share code, notes, and snippets.

View e1ectr0cut1e's full-sized avatar
👾

Hex e1ectr0cut1e

👾
View GitHub Profile
#include <Arduino.h>
#include <ESP8266WiFi.h>
const char* ssid = "SSID";
const char* password = "12345678";
const char* loggerIP = "192.0.0.2";
const uint32_t loggerSerial = 3110000000;
const uint16_t loggerPort = 8899;
#!/data/data/com.termux/files/usr/bin/sh
TMP_DIR=$PREFIX/../tmp
secontext=$(sudo ls -Zd "$PREFIX" | awk '{ print $1 }')
owner=$(sudo stat -c '%U' "$PREFIX")
group=$(sudo stat -c '%G' "$PREFIX")
mkdir -p "$TMP_DIR"
#
# SUN-5/6/8/10/12K-SG04LP3 and SUN-5/6/8/10/12/15/20/25K-SG01HP3-EU-AM2 | 5-32kW and 5-128kW | Three Phase | 4 MPPT | Hybrid Inverter | LV and HV Battery Supported
#
# Reference: https://github.com/user-attachments/files/16798469/MODBUS.RTU.V105.1-20231006.pdf and https://github.com/user-attachments/files/16597916/MODBUSRTU.V104.3.1.1111_SG01-HP3-AM2.pdf
#
# Tested with 25K-SG01HP3 12K-SG04LP3 and LSW3_15_FFFF_1.0.91R Stick Logger
#
info:
manufacturer: Deye
@e1ectr0cut1e
e1ectr0cut1e / ghost_img2webp.sh
Last active January 12, 2026 20:36
Convert Ghost CMS images to WebP
#!/bin/sh
apk update
apk add coreutils mariadb-client mariadb-connector-c libwebp-tools
MYSQL_HOST=db
MYSQL_USER=root
MYSQL_PASS=example
MYSQL_DB=ghost
GHOST_PATH=/var/lib/ghost
type: custom:yasno-card
city: "Київ"
dso: "ПРАТ «ДТЕК КИЇВСЬКІ ЕЛЕКТРОМЕРЕЖІ»"
group: "1.1"
@e1ectr0cut1e
e1ectr0cut1e / buildroot-docker-compose.yml
Created January 10, 2024 02:32
Docker Compose File for Buildroot
services:
set-permissions:
image: alpine
user: root
volumes:
- buildroot:/mnt/buildroot
command: chown -R 1000:1000 /mnt/buildroot
build:
image: buildroot/base:20211120.1925
volumes:
@e1ectr0cut1e
e1ectr0cut1e / wg-apply
Last active October 13, 2021 11:11
Apply Wireguard configuration without restart
#!/bin/bash
if [ -z "$1" ]; then
echo "Usage: $0 <WG_IFACE>" > /dev/stderr
exit 1
fi
wg addconf wg0 <(wg-quick strip wg0)
#!/usr/bin/env python3
import datetime
import fcntl
import glob
import html.parser
import logging
import os
import re
import shutil
import socket
/*
* gcc -fPIC -Wall -ldl -shared -o pwd_override.so -Wl,-soname,pwd_override.so pwd_override.c
*/
#define _GNU_SOURCE
#include <pwd.h>
#include <stdio.h>
#include <dlfcn.h>
@e1ectr0cut1e
e1ectr0cut1e / bspatch.patch
Last active December 24, 2018 21:29
KingstVIS 3.1.1 dark theme fix