Skip to content

Instantly share code, notes, and snippets.

@remixedMind
remixedMind / shelly_with_ha.js
Created October 5, 2025 04:29 — forked from aigarius/shelly_with_ha.js
Shelly script to revert to direct switch control if Home Assistant is not available
// Preconditions:
// Shelly connected to a manual switch and to a smart light
// Shelly set to disconnected mode and to restore power to on after power loss
// Input mode is button (might need a minor change for switch - untested)
// Shelly is added to Home Assistant
// An automation is created in Home Assistant to toggle the light when single button press is
// detected on the Shelly (other automations may also exist)
let online_status = 0;
// Change this to the URL of your Home Assistant base URL + "/api/ping"
@remixedMind
remixedMind / shelly_smart_bulb_control.js
Created October 5, 2025 04:28 — forked from camerongray1515/shelly_smart_bulb_control.js
Shelly Smart Bulb Control with Fallback
// Shelly 1 Mini Gen4 script
// Input: detached push button (input:0)
// Relay: switch:0
// Virtual boolean: id=200 ("Confirm")
let SW_INPUT = 0;
let SW_OUTPUT = 0;
let CONFIRMED_ID = 200;
let TIMEOUT_MS = 1000;
@remixedMind
remixedMind / change_vlan_ip_mask.bat
Created April 13, 2024 20:11 — forked from stoyanovgeorge/change_vlan_ip_mask.bat
A batch script for Windows 10 which can change the IP address, the network mask, the gateway, the DNS and the VLAN ID of an interface. You need to execute the script with admin rights.
@echo off
:: Configuration Variables
set "ifName=Ethernet 2"
set ipAddress=10.88.167.35
set subnetMask=255.255.255.240
set vlanID=702
:: set defaultGateway=x.x.x.x
:: set primaryDNS=x.x.x.x
:: set alternateDNS=x.x.x.x

Proxmox PVE 6.x Post Installation Steps

This cheatsheet helps to set up your Proxmox Virtual Environment (PVE) host after fresh installation. Designed and tested on PVE version 6.x.

Note about sudo

I do not prepend sudo command to any of commands listed here, but keep in mind that nearly all commands requires su privileges, so use sudo if your account happen to not have root access.

How to edit config files

The simplest way to edit config file is to use vim.tiny editor, for example to edit vzdump.conf file use this command:

@remixedMind
remixedMind / PVE-host-backup.md
Created May 10, 2021 13:07 — forked from mrpeardotnet/PVE-host-backup.md
Proxmox PVE Host Config Backup Script

Proxmox PVE Host Config Backup Script

This script can be used to backup essential configuration files from the Proxmox Virtual Enivronment (PVE) host.

The script will create backups using tar with specified backup prefix and date and time stamp in the file name. Script will also delete backups that are older then number of days specified.

Create backup script file

To create backup script that will be executed every day we can create backup script in /etc/cron.daily/ folder. We need to make it writeable by root (creator) only, but readable and executable by everyone:

touch /etc/cron.daily/pvehost-backup