This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name FeatherTest Variable Support | |
// @namespace http://mysite | |
// @include http*://mysite/* | |
// @description Add support for FeatherTest variable access. Matt Collinge. | |
// @version 1.0 | |
// @grant all | |
// ==/UserScript== | |
function featherTestSupport() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'feathertest' | |
console.log('%cSUDO - HOMEPAGE', 'color:orange'); | |
location.href = '/site_root/' | |
60000 | |
console.log('%cSUDO - '+location.href, 'color:orange'); | |
console.log('%cSUDO - meta_title = '+$('meta[name="title"]').attr('content'), 'color:orange'); | |
console.log('%cSUDO - meta_og:title = '+$('meta[property="og:title"]').attr('content'), 'color:orange'); | |
console.log('%cSUDO - meta_description = '+$('meta[name="description"]').attr('content'), 'color:orange'); | |
console.log('%cSUDO - meta_og:description = '+$('meta[property="og:description"]').attr('content'), 'color:orange'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'feathertest' | |
console.log('%cSUDO - HOMEPAGE', 'color:orange'); | |
location.href = '/site_root/' | |
60000 | |
console.log('%cSUDO - '+location.href, 'color:orange'); | |
// Output JSON-LD on page | |
$('script[type="application/ld+json"]').each(function(index,json){ console.log('%cSUDO - '+JSON.stringify(JSON.parse(json.innerHTML),null,2), 'color:orange') }); | |
// Output the contents of some JavaScript variables | |
window.postMessage({ "action": "variable", "value": "myVar.hierarchy"}, window.origin); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo Calling energenie socket... | |
wget --quiet --background --output-document="callenergenie.log" "http://192.168.1.99/callenergenie.php?delay=10&switch=2&state=off" | |
echo Sleeping for 2 seconds | |
sleep 2 | |
echo Done. | |
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Energenie Remote Call to Secondary Pi | |
Before=multi-user.target | |
After=network.target | |
Conflicts=shutdown.target | |
[Service] | |
ExecStart=/bin/true | |
ExecStop=/bin/sh /home/osmc/callenergenie.sh | |
Type=oneshot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* MattC - Call this with various parameters.. | |
callenergenie.php? | |
delay = time in seconds to sleep before calling Energenie | |
switch = which socket to talk to | |
state = turn socket on/off | |
e.g. callenergenie.php?delay=5&switch=2&state=off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Adafruit_NeoPixel.h> | |
#ifdef __AVR__ | |
#include <avr/power.h> | |
#endif | |
#define PIN 6 // pin on the Arduino is connected to the LED ring | |
#define NUMPIXELS 24 // Number of pixels on the LED ring | |
#define POT_PIN 0 // Potentiometer pin | |
#define BUTTON_PIN 2 // Button pin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alerts=$(az resource list --output tsv --resource-type "Microsoft.Insights/metricAlerts" --query [].id) | |
alerts=${alerts// /SPACEFIX} | |
for alert in $alerts | |
do | |
az resource show --ids "${alert//SPACEFIX/ }" --query properties.scopes[0] --output tsv | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logicapps=$(az resource list --output tsv --resource-type "Microsoft.Logic/workflows" --query [].id) | |
for logicapp in $logicapps | |
do | |
echo "$logicapp" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo Finding what Alerts exist already ... | |
./listAlertIds.sh > listAlertIds.tmp | |
echo Finding what Logic Apps exist ... | |
./listLogicApps.sh > listLogicApps.tmp | |
echo Logic Apps without an Alert are ... | |
comm -23 <(sort -u ./listLogicApps.tmp) <(sort -u ./listAlertIds.tmp) |
OlderNewer