Skip to content

Instantly share code, notes, and snippets.

View meee1's full-sized avatar

Michael Oborne meee1

View GitHub Profile
SELECT m.entity_id, COUNT(*) as count FROM states AS S
INNER JOIN states_meta AS M ON M.metadata_id = s.metadata_id
GROUP BY m.entity_id ORDER BY count DESC LIMIT 20;
#!/bin/sh
killall JLinkGDBServerCL.exe
killall socat
# Start JLink GDB Server with specified parameters
"/mnt/c/Program Files/SEGGER/JLink_V812a/JLinkGDBServerCL.exe" -singlerun -nogui -if swd -port 50000 -swoport 50001 -telnetport 50002 -device STM32H757ZI -nolocalhostonly -rtos GDBServer/RTOSPlugin_ChibiOS.so &
sleep 1
@meee1
meee1 / config.ini
Last active October 7, 2025 02:57
shelly script to victron mqtt - using https://github.com/mr-manuel/venus-os_dbus-mqtt-grid
; CONFIG FILE
; GitHub reporitory: https://github.com/mr-manuel/venus-os_dbus-mqtt-grid
; remove semicolon ; to enable desired setting
[DEFAULT]
; Set logging level
; ERROR = shows errors only
; WARNING = shows ERROR and warnings
; INFO = shows WARNING and running functions
; DEBUG = shows INFO and data/values
https://github.com/home-assistant/supervised-installer
https://github.com/home-assistant/os-agent/tree/main#using-home-assistant-supervised-on-debian
edit /etc/hassio.json
{
"supervisor": "ghcr.io/home-assistant/armv7-hassio-supervisor",
"machine": "odroid-c2",
"data": "/usr/share/hassio"
}
@meee1
meee1 / gist:f7533814565d1bd6239a7e9ce17f0424
Last active March 19, 2024 06:21
kali monitor mode awus036axml
kali - AWUS036AXML
sudo hcxdumptool -m wlan0
sudo iwconfig wlan0 channel 6
wireshark decoder
Within Wireshark, click on "Help->About->Folders->Personal Lua Plugins" and allow it to create a "plugins" folder as needed.
@meee1
meee1 / gist:4ccb62054c1e1c62108578b49322e5e5
Last active March 8, 2024 01:39
get large repo directorys
repo forall -c "git count-objects -vH | grep 'GiB' && pwd"
repo forall -c "git count-objects -vH | grep 'MiB' && pwd"
repo forall -c "git count-objects -v | grep size-pack | tr -d '\012\015' && pwd " | sort -nk2
repo forall -c "du .git -d 0 -L | tr -d '\012\015' && pwd " | sort -nk1
@meee1
meee1 / gist:d6cc3c2dcb102769be2217633f7f58c0
Last active February 20, 2024 12:46
gitlab 9.3.5 stuff
version: '3.6'
services:
gitlab:
image: gitlab/gitlab-ce:9.3.5-ce.0
container_name: gitlab
restart: always
hostname: 'gitlab'
environment:
GITLAB_OMNIBUS_CONFIG: |
# Add any other gitlab.rb configuration here, each on its own line
https://rtestardi.github.io/usbte/usbte.html
Failed to execute 'claimInterface' on 'USBDevice': Unable to claim interface.
chrome://device-log
USBError[11:28:32] Interface 0 uses driver "usbser" instead of WinUSB.
ref https://groups.google.com/a/chromium.org/g/webusb/c/qmbqfPNj97A
public static final String settingLoginPassword = "goodwe2010";
MONITOR_ADDRESS = Integer.parseInt((String)"C0", (int)16);
MONITOR_SN = new byte[]{50, 49, 48, 48, 48, 82, 69, 78, 49, 53, 51, 48, 48, 48, 48, 49};
INVENTER_DEFAULTSN = Integer.parseInt((String)"7F", (int)16);
INVENTERPACKAGE_HEAD = new byte[]{Integer.valueOf((String)"AA", (int)16).byteValue(), Integer.valueOf((String)"55", (int)16).byteValue()};
REGISTER_QUERY_CODE = new byte[]{Integer.valueOf((String)"00", (int)16).byteValue(), Integer.valueOf((String)"00", (int)16).byteValue()};
REGISTER_REQUEST_CODE = new byte[]{Integer.valueOf((String)"00", (int)16).byteValue(), Integer.valueOf((String)"80", (int)16).byteValue()};
@meee1
meee1 / gist:e6c2e886426fd97cac15d1353799e510
Created February 24, 2023 02:27 — forked from charlie-x/gist:96a92aaaa04346bdf1fb4c3621f3e392
recompile wsl2 kernel, add modules and CAN modules + can utils.
mines ubuntu 20.04 based, WSL2
in windows
wsl --list -v
* Ubuntu-20.04 Stopped 2
in wsl
# the old update routine
sudo apt-get update -y
# add tools to build kernel, apologies if i missed anything as i already have a bunch of dev stuff setup
sudo apt-get install -y autoconf bison build-essential flex libelf-dev libncurses-dev libssl-dev libtool libudev-dev