Skip to content

Instantly share code, notes, and snippets.

View webbson's full-sized avatar
🎮
Focusing

Tom Stevens webbson

🎮
Focusing
View GitHub Profile
@webbson
webbson / Sitecore remove old item versions.ps1
Created April 7, 2021 07:21
This Sitecore PowerShell script removes old versions of items in all languages so that the items only contains a selected number of versions
<#
This script will remove old versions of items in all languages so that the items only contains a selected number of versions.
#>
$item = Get-Item -Path "master:\content"
$dialogProps = @{
Parameters = @(
@{ Name = "item"; Title="Branch to analyse"; Root="/sitecore/content/Home"},
@{ Name = "count"; Value=10; Title="Max number of versions"; Editor="number"},
@{ Name = "remove"; Value=$False; Title="Do you wish to remove items?"; Editor="check"}
@webbson
webbson / nedis.yaml
Created June 12, 2020 19:50
Config for Nedis Wifi Smart Outdoors plug ESPHome custom firmware. Tuya convert esp8266
# https://esphome-configs.io/guides/tuya-convert/#introduction
substitutions:
plug_name: poolheater
# Higher value gives lower watt readout
current_res: "0.00221"
# Lower value gives lower voltage readout
voltage_div: "1910"
esphome:
name: ${plug_name}
@webbson
webbson / gosund-sp111-light.yaml
Last active October 31, 2020 12:15
esphome config gosund sp111 as light
substitutions:
plug: "Kitchen window"
plug_internal: kitchen_window
voltage_divider: "771"
current_resistor: "0.0012"
esphome:
name: $plug_internal
platform: ESP8266
board: esp8285
@webbson
webbson / gosund-sp111.yaml
Last active October 25, 2020 17:50
esphome config gosund sp111 as switch
# Just change name here
substitutions:
plug: "Kitchen window"
plug_internal: kitchen_window
voltage_divider: "771"
current_resistor: "0.0012"
esphome:
name: ${plug_internal}
platform: ESP8266
@webbson
webbson / telegrambot.php
Last active June 14, 2020 12:18
Telegram bot for Sonarr/Radarr
<?php
function processMessage($message) {
$groupchat = '-XXXX'; // Group chat id
// process incoming message
$message_id = $message["message_id"];
$chat_id = $message["chat"]["id"];
$response = array("chat_id" => $chat_id);
$plextoken = "YYYY"; // Plex token
$plexbaseurl = "https://ASFASFASF.plex.direct:32400"; // PLEX DIRECT URL
@webbson
webbson / gist:5c5baf247a67b4e9310512760bf329e7
Created February 27, 2019 07:11
blockstack verification
Verifying my Blockstack ID is secured with the address 157sgkcu6teVWdEcgPWaPSWBX9qvNn7Tjm https://explorer.blockstack.org/address/157sgkcu6teVWdEcgPWaPSWBX9qvNn7Tjm
### Keybase proof
I hereby claim:
* I am webbson on github.
* I am webbson (https://keybase.io/webbson) on keybase.
* I have a public key whose fingerprint is 9095 01ED 219A 095B F765 78F9 D833 E590 E2C2 5927
To claim this, I am signing this object:
Verifying that +webbson is my Bitcoin username. You can send me #bitcoin here: https://onename.io/webbson