Skip to content

Instantly share code, notes, and snippets.

View developersteve's full-sized avatar
🍽️
Spin all the plates

developersteve developersteve

🍽️
Spin all the plates
View GitHub Profile
/*!
* GSAP 3.12.5
* https://gsap.com
*
* @license Copyright 2024, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license or for Club GSAP members, the agreement issued with that membership.
* @author: Jack Doyle, [email protected]
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).window=t.window||{})}(this,function(e){"use strict";function _inheritsLoose(t,e){t.prototype=Object.create(e.prototype),(t.prototype.constructor=t).__proto__=e}function _assertThisInitialized(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function r(t){return"string"==typeof t}function s(t){return"function"==typeof t}function t(t){return"number"==typeof t}function u(t){return void 0===t}function v(t){return"object"==typeof t}function w(t){return!1!==t}function x(){return"undefined"!=typeof window}function y(t){return s(
/*!
* ScrollToPlugin 3.12.5
* https://gsap.com
*
* @license Copyright 2024, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license or for Club GSAP members, the agreement issued with that membership.
* @author: Jack Doyle, [email protected]
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).window=e.window||{})}(this,function(e){"use strict";function l(){return"undefined"!=typeof window}function m(){return f||l()&&(f=window.gsap)&&f.registerPlugin&&f}function n(e){return"string"==typeof e}function o(e){return"function"==typeof e}function p(e,t){var o="x"===t?"Width":"Height",n="scroll"+o,r="client"+o;return e===T||e===i||e===c?Math.max(i[n],c[n])-(T["inner"+o]||i[r]||c[r]):e[n]-e["offset"+o]}function q(e,t){var o="scroll"+("x"===t?"Left":"Top");return e===T&&(null!=e.pageXOffset?o="page"+t.toUpperCase()+"Offset":e=null!=i[o]?i:c),function(){return e[o]}}functi
/*!
* ScrollTrigger 3.12.5
* https://gsap.com
*
* @license Copyright 2024, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license or for Club GSAP members, the agreement issued with that membership.
* @author: Jack Doyle, [email protected]
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).window=e.window||{})}(this,function(e){"use strict";function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(){return Ce||"undefined"!=typeof window&&(Ce=window.gsap)&&Ce.registerPlugin&&Ce}function z(e,t){return~Le.indexOf(e)&&Le[Le.indexOf(e)+1][t]}function A(e){return!!~t.indexOf(e)}function B(e,t,r,n,o){return e.addEventListener(t,r,{passive:!1!==n,capture:!!o})}function C(e,t,r,n){return e.removeEventListener(t,r,!!n)}function F(){retur
@developersteve
developersteve / index.md
Last active March 20, 2025 03:30
Home Assistant localtuya template for the 8 in 1 water quality tester

Updated configuration template for the localtuya integration to save having to map all the DPS entries manually.

Add the contents of below to a Hydro.yaml template then add the device and configure it from a template as part of the device setup flow

** updated with validated matching data formatting chanhges based on measurements from the tuya app **

- sensor:
    friendly_name: Temperature
    entity_category: None
@developersteve
developersteve / app.rb
Created March 18, 2019 04:31
TelstraDev messaging ruby app example
require 'Telstra_Messaging'
api_instance = Telstra_Messaging::AuthenticationApi.new
client_id = 'Secret' # String |
client_secret = 'key' # String |
grant_type = 'client_credentials' # String |
result = api_instance.auth_token(client_id, client_secret, grant_type)
@developersteve
developersteve / callback
Created September 17, 2018 22:44
SMS broker callback
<?php
require_once(__DIR__ . '/vendor/autoload.php');
require_once(__DIR__ . '/inc.php');
require("phpMQTT.php");
$server = "iot.broker.com";
$port = 1883;
$username = "";
$password = "";
/****************************************
* Include Libraries
****************************************/
#include <Adafruit_NeoPixel.h>
#include <WiFi.h>
#include <PubSubClient.h>
#define PIN 25
Adafruit_NeoPixel strip = Adafruit_NeoPixel(16, PIN, NEO_GRB + NEO_KHZ800);
@developersteve
developersteve / gist:17203742744b2c1b5c4059d36c31e281
Created September 2, 2018 22:44
Nginx notifyURL to slack channel for debugging
server
{
listen 443 http2 ssl;
listen [::]:443 http2 ssl;
server_name [domain url in here];
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains";
proxy_cookie_domain ~(?P<secure_domain>([-0-9a-z]+\.)?[-0-9a-z]+\.[a-z]+)$ "$secure_domain; secure";
ssl_protocols TLSv1.2 TLSv1.1 TLSv1 TLSv1.3;
@developersteve
developersteve / file.php
Created August 17, 2018 01:24
MessagingAPI PHP example
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Telstra_Messaging\Api\AuthenticationApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client()
);
$client_id = ""; // string |
$client_secret = ""; // string |
$grant_type = "client_credentials"; // string |
@developersteve
developersteve / app.py
Created November 8, 2017 04:18
TelstraDev MessagingAPI - Basic python call create sms
import requests
from var_dump import var_dump
url = "https://tapi.telstra.com/v2/messages/sms"
payload = {'to': '000000000000',
'body': 'Hello World',
'from': '000000000000',
'validity': 1,
'scheduledDelivery': 60,