Skip to content

Instantly share code, notes, and snippets.

Avatar
🎮
Focusing

Tom Stevens webbson

🎮
Focusing
View GitHub Profile
@webbson
webbson / Sitecore remove old item versions.ps1
Created Apr 7, 2021
This Sitecore PowerShell script removes old versions of items in all languages so that the items only contains a selected number of versions
View Sitecore remove old item versions.ps1
<#
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 / gosund-sp111-light.yaml
Last active Oct 31, 2020
esphome config gosund sp111 as light
View gosund-sp111-light.yaml
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 Oct 25, 2020
esphome config gosund sp111 as switch
View gosund-sp111.yaml
# 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 / nedis.yaml
Created Jun 12, 2020
Config for Nedis Wifi Smart Outdoors plug ESPHome custom firmware. Tuya convert esp8266
View nedis.yaml
# 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}
View gist:5c5baf247a67b4e9310512760bf329e7
Verifying my Blockstack ID is secured with the address 157sgkcu6teVWdEcgPWaPSWBX9qvNn7Tjm https://explorer.blockstack.org/address/157sgkcu6teVWdEcgPWaPSWBX9qvNn7Tjm
@webbson
webbson / telegrambot.php
Last active Jun 14, 2020
Telegram bot for Sonarr/Radarr
View telegrambot.php
<?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
View gist:fc1ea9332358a672e071
### 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:
View gist:0409c001a5f22b7336b6
Verifying that +webbson is my Bitcoin username. You can send me #bitcoin here: https://onename.io/webbson