Skip to content

Instantly share code, notes, and snippets.

View crowbarsolutions's full-sized avatar

Crowbar Solutions crowbarsolutions

View GitHub Profile
blueprint:
# Custom control via IKEA Symfonisk Gen2
# Based on https://community.home-assistant.io/t/z2m-ikea-symfonisk-gen2-e2123-media-control-v1-55/559523 Shawsky
name: Z2M - IKEA Symfonisk sound controller GEN2 custom actions
description:
'Trigger custom actions with an IKEA Symfonisk sound controller GEN2 via Zigbee2MQTT (Z2M)'
domain: automation
input:
remote:
@crowbarsolutions
crowbarsolutions / _README.txt
Last active January 25, 2018 17:58
Delete Reddit Comments
- Using your favorite browser, goto your reddit profile page and open the comments list
- Open the browser developer tools (F12)
- Paste the code in this gist into the console and hit enter
- Observe how comments are deleted one by one
- When all comments on the page have been deleted, refresh the page and execute the script again on the remaining comments
@crowbarsolutions
crowbarsolutions / gist:d5ae9997bb86168515a5764ee587275b
Created December 8, 2016 02:26
Deletes all reddit comments/posts/whatever on your user page
(function deleteComments() {
var deleteButtons = document.querySelectorAll('[data-event-action="delete"]');
[].forEach.call(deleteButtons, function(element) {
element.click();
});
var trigger = setInterval(function(){
var yesButton = document.querySelector('.yes');
if (yesButton === null) {
clearInterval(trigger);
var nextButton = document.querySelector('span.next-button > a');
# Get all the provisioned packages
$Packages = (get-item 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Applications') | Get-ChildItem
# Filter the list if provided a filter
$PackageFilter = $args[0]
if ([string]::IsNullOrEmpty($PackageFilter))
{
echo "No filter specified, attempting to re-register all provisioned apps."
}
else
@crowbarsolutions
crowbarsolutions / CustomDataSourceRequestAttribute.cs
Last active April 12, 2023 09:16
Have Kendo or Telerik grid date time filters to ignore or not account for the time in the underlying data
using System.Web.Mvc;
using MyProject.ModelBinders;
using Kendo.Mvc.UI;
namespace MyProject.CustomAttributes
{
public class CustomDataSourceRequestAttribute : DataSourceRequestAttribute
{
public override IModelBinder GetBinder()
{