Skip to content

Instantly share code, notes, and snippets.

View rubicon's full-sized avatar
💯

Dax Davis rubicon

💯
View GitHub Profile
@rubicon
rubicon / philips_hue_scenes.md
Created November 3, 2024 10:58 — forked from Hypfer/philips_hue_scenes.md
Philips Hue Scenes

Hue Scenes

This gist contains the full list of all scenes available in the scene gallery of the official hue app at the time of writing (2023-09-28)

The contents were collected in a tedious clean-room approach, setting a group of lights to a scene and then noting the different x,y values + its name.

Thanks a lot to @coderph0x who did most of the legwork!

@rubicon
rubicon / my_pmpro_email_recipient.php
Created May 14, 2024 15:24 — forked from strangerstudios/my_pmpro_email_recipient.php
The gist below disables the user notification when an admin changes their membership level or expiration date. Change line 6 to disable other or more PMPro emails.
/*
Disable the "Admin Change" emails in Paid Memberships Pro
*/
function my_pmpro_email_recipient($recipient, $email)
{
if($email->template == "admin_change" || $email->template == "admin_change_admin") //could check for a different template here
$recipient = NULL;
return $recipient;
}
add_filter("pmpro_email_recipient", "my_pmpro_email_recipient", 10, 2);
@rubicon
rubicon / dashboard.php
Created April 30, 2024 16:41 — forked from ipokkel/dashboard.php
Custom PMPro Dashboard and Memberslist pages displaying renwal dates for recurring subscriptions under the Expires column
<?php
/* Custom Dashboard page displaying renwal dates for recurring subscriptions under the Expires column
* Replace wp-content/plugins/paid-memberships-pro/adminpages/memberslist.php with this file.
* This page will be overwritten with every update of the Paid Memberships Pro core plugin
* As this is a custom override of a core file it is a "use-at-own-risk" option.
*/
/**
* The Memberships Dashboard admin page for Paid Memberships Pro
@rubicon
rubicon / featured-image-in-quick-edit.php
Created December 21, 2023 10:27 — forked from bagerathan/featured-image-in-quick-edit.php
[Featured image in quickedit] #wp
@rubicon
rubicon / sup-sub.css
Last active November 28, 2024 02:55 — forked from unruthless/CSS for <sup> and <sub>
CSS: <sup> and <sub>
sub,
sup {
/* Specified in % so that the sup/sup is the
right size relative to the surrounding text */
font-size: 75%;
/* Zero out the line-height so that it doesn't
interfere with the positioning that follows */
line-height: 0;
@rubicon
rubicon / gravity_forms_get_credit_card_details.php
Last active November 28, 2024 02:20 — forked from DeveloperWil/Gravity Forms Get Credit Card Details
Enables the credit card fields for Gravity Forms and provides a function to get the credit card details which are not available through the filter $form or $entry
<?php
//Turn on our credit card field for admin and front-end
add_action("gform_enable_credit_card_field", "enable_creditcard");
function enable_creditcard($is_enabled)
{
return true;
}
//Email encoded card details when the form is submitted.
add_action('gform_after_submission', 'email_encoded_cc', 10, 2);
function email_encoded_cc($entry, $form)
@rubicon
rubicon / panel-redirect.js
Created November 3, 2022 06:55 — forked from Acqua-H/panel-redirect.js
Add items to the Home Assistant sidebar to any path in Home Assistant
/*************************************************************************************************************************
* Purpose: Add items to the Home Assistant sidebar to any path in Home Assistant
* Many thanks to balloob https://gist.github.com/balloob for his initial code (see link in Change Log)
* -------------------------------------------------------------------------------------------------------
* Resources and References:
* - Current Code Source https://gist.github.com/Acqua-H/a33ef5bd5a95f14c5888494565bb0436
* - HA Forum Thread https://community.home-assistant.io/t/how-to-add-a-restart-home-assistant-button-to-sidebar/214179/2
* - Acqua https://github.com/Acqua-H/ | https://community.home-assistant.io/u/acqua/
* -------------------------------------------------------------------------------------------------------
* Change Log:
@rubicon
rubicon / actionable-notifications-subflow-for-ios.json
Created December 31, 2021 07:27 — forked from sstratoti/actionable-notifications-subflow-for-ios.md
iOS Subflow for HomeAssistant Companion notifications
[
{
"id": "6dc0247c.d7210c",
"type": "subflow",
"name": "iOS Actionable Notification",
"info": "[Documentation](https://zachowj.github.io/node-red-contrib-home-assistant-websocket/cookbook/actionable-notifications-subflow-for-ios.html)\n",
"category": "",
"in": [
{
"x": 100,
@rubicon
rubicon / espvibration1.yaml
Last active November 28, 2024 02:26 — forked from jeffehobbs/vibration_sensor_ESP32_HA_how_to.txt
Vibration Sensor for ESPHome/Home Assistant
# Names and defines the hardware
esphome:
name: espvibration1
platform: ESP32
board: nodemcu-32s
# Defines WiFi network/password
wifi:
ssid: "YOUR WIFI NETWORK"
password: "YOUR WIFI PASSWORD"
@rubicon
rubicon / discover_scenes.py
Created October 29, 2021 18:07 — forked from sdague/discover_scenes.py
Discover hue groups and scenes
#!/usr/bin/env python
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT