Skip to content

Instantly share code, notes, and snippets.

View clemone210's full-sized avatar

Timo clemone210

  • Trier, Germany
  • 03:36 (UTC +02:00)
View GitHub Profile
@clemone210
clemone210 / fix.md
Last active March 22, 2024 00:28
Homeassistant Unifi Protect integration fails to initialize with Unifi v3.2.12 version and HA Core 2024.3.1 Supervisor 2024.03.0 Operating System 12.1

How to fix Homeassistant Unifi Protect not starting after update v3.2.12

The issue is described here: home-assistant/core#112298

This is how you can fix it temporarily

  1. Use either SSH to connect to your Homeassistant instance or use the Addon "Advanced SSH & Web Terminal" in unprotected mode.
  2. run docker exec -it homeassistant bash
  3. inside the container run vi /usr/local/lib/python3.12/site-packages/pyunifiprotect/data/types.py
  4. use / to search and then enter "DELETE", hit enter to go to the correct line.
@clemone210
clemone210 / fanspeed.sh
Last active January 8, 2024 16:16
Script to set the fan speed on HP Server trough iLO firmware
#!/bin/bash
# Variables
ilo_user="#" # Replace with your iLO username
ilo_pass="#" # Replace with your iLO password
ilo_host="#" # Replace with your iLO hostname or IP address
# Options to enable older key exchange and host key methods
ssh_options="-o KexAlgorithms=diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 -o HostKeyAlgorithms=ssh-rsa,ssh-dss -o StrictHostKeyChecking=no"
@clemone210
clemone210 / netmaker-ssh-vpn-boot-problem.md
Last active October 11, 2023 15:00
Netmaker / Netclient VPN error when using listen address

1. Create a Pre-Start Check Script

Firstly, create a script that will check if the desired IP address is available.

sudo nano /usr/local/bin/check_netmaker_ip.sh

Add the following content:

#!/bin/sh
@clemone210
clemone210 / McFit_capacity.scriptable
Last active March 26, 2024 14:16
McFit Trier scriptable script to check current capacity
/**
* Script for scriptable to get the current capacity of McFit Gyms
*/
let gymId = 1613591080
let param = args.widgetParameter
if (param != null && param.length > 0) {
gymId = param
}
const currentGymCapacity = await fetchGymCapacity(gymId)
@clemone210
clemone210 / docker-compose.yaml
Last active June 6, 2023 09:04
archiveteam warrior docker-compose.yaml
version: '3'
services:
watchtower:
image: containrrr/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --label-enable --cleanup --interval 3600
restart: on-failure
labels:
com.centurylinklabs.watchtower.enable: true
@clemone210
clemone210 / docker-compose.yaml
Created April 28, 2023 14:42
Cloudflare Zero Trust Tunnel docker-compose file.
version: "3.9"
services:
tunnel:
container_name: cloudflared-tunnel
image: cloudflare/cloudflared
restart: unless-stopped
command: tunnel run
environment:
- TUNNEL_TOKEN=yourtoken
@clemone210
clemone210 / install-docker.sh
Last active April 28, 2023 14:57
One-line command to install docker + docker-compose on ubuntu
sudo apt-get remove docker docker-engine docker.io containerd runc && sudo apt-get update && sudo apt-get install ca-certificates curl gnupg && sudo mkdir -m 0755 -p /etc/apt/keyrings && curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg && echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && sudo apt-get update && sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin