Skip to content

Instantly share code, notes, and snippets.

@jasonk
jasonk / Home Assistant - Mass delete devices.md
Last active September 6, 2025 12:47
Home Assistant - Mass delete devices

After running rtl_433 with the MQTT Discovery add-on for a while, I ended up with hundreds of my neighbors devices in my Home Assistant instance. This was when I found out there was no easy way to delete them and was faced with the prospect of going to each one in the GUI, picking "delete" from a menu and the confirming it hundreds of times.

I'm too lazy for that, so I did this instead, based on some code from the forums I came up with this.

How to use it

To use this:

  1. Create a new Area in your Home Assistant (I called mine "Garbage"), and change the GARBAGE_ID variable in the code to have the ID of your new area.
  2. In the devices list you can hit the "select" button and put checkmarks next to all the devices you want to get rid of. Then use the menu in th
@SwitHak
SwitHak / 20211210-TLP-WHITE_LOG4J.md
Last active August 16, 2025 16:12
BlueTeam CheatSheet * Log4Shell* | Last updated: 2021-12-20 2238 UTC

Security Advisories / Bulletins / vendors Responses linked to Log4Shell (CVE-2021-44228)

Errors, typos, something to say ?

  • If you want to add a link, comment or send it to me
  • Feel free to report any mistake directly below in the comment or in DM on Twitter @SwitHak

Other great resources

  • Royce Williams list sorted by vendors responses Royce List
  • Very detailed list NCSC-NL
  • The list maintained by U.S. Cybersecurity and Infrastructure Security Agency: CISA List
# From: http://blog.coretech.dk/kea/automate-importing-and-creating-drivers-packages-in-sccm-2012-r2/
# Imports drivers into SCCM from the directory specified in $sourceDir
# Creates driver packages in the directory specified in $packageDir
# The script does not use any MS-provided Configuration Manager PowerShell cmdlets, nor does it use any Configuration Manager DLL files/assemblies.
# It's all implemented in WMI, which is good because it bypasses several bugs in SCCM 2012 R2 CU3 that were preventing this process from working when we tried it with the CM PowerShell cmdlets!
# Drivers will be grouped into Administrative Categories and corresponding Driver Packages based on the folder structure of $sourceDir:
# root
@ser1zw
ser1zw / send.ps1
Created December 23, 2012 21:59
Send E-mail from eml file in PowerShell
################################################################################
# Send E-mail from eml file in PowerShell
# Tested on PowerShell 2.0
#
# Usage:
# 1. Configure the variables defined in Main()
# $server = "localhost"
# $port = "25"
# $mailfrom = "[email protected]"
# $rcptto = "[email protected]"