Skip to content

Instantly share code, notes, and snippets.

@Data-Monkey
Data-Monkey / piholeGroupStatus.sh
Created October 21, 2024 07:08
Home Assistant switch to enable/disable PiHole6 groups
#!/bin/bash
# requires jq
# uses the PiHole 6 API to enable / disable and check the status of a group.
# usage: piholeGroupStatus.sh PiHoleAPIAddress PiHoleAPIPWD GroupName Action
# Action can be enable / disable / status
# How to use in Home Assistant
@573
573 / readme.js
Created April 30, 2019 11:04
Add this bookmarklet for archive.today
javascript:void(open('http://archive.today/?run=1&url='+encodeURIComponent(document.location)))
@woogists
woogists / wc-bookings-automatically-confirm-cod-bookings.php
Created March 9, 2018 16:25
[WooCommerce Bookings] Automatically confirm bookings purchased via COD
/**
* Will put bookings into a Confirmed status if they were paid for via COD.
*
* @param int $order_id The order id
*/
function set_cod_bookings_confirmed_20170825( $order_id ) {
// Get the order, then make sure its payment method is COD.
$order = wc_get_order( $order_id );
if ( 'cod' !== $order->get_payment_method() ) {