Skip to content

Instantly share code, notes, and snippets.

@zalmyr
zalmyr / keybase.md
Last active September 15, 2016 19:49

Keybase proof

I hereby claim:

  • I am zalmyr on github.
  • I am zalmy (https://keybase.io/zalmy) on keybase.
  • I have a public key whose fingerprint is B2FF 6890 A16F 1E50 9EE8 C888 222C A36B B83A 96F4

To claim this, I am signing this object:

@zalmyr
zalmyr / clean.bat
Last active January 19, 2023 17:51
BATCH: Clean Windows 7 Temp Files
REM Created by Zalmy Rosenberg © 2015
REM start /wait taskkill /im iexplore.exe /t /f
REM start /wait taskkill /im firefox.exe /t /f
REM start /wait taskkill /im chrome.exe /t /f
set user=C:\Users
set dest2=AppData\Local\Microsoft\Windows\Temporary Internet Files
set ffPath=AppData\Local\Mozilla\Firefox\Profiles
@zalmyr
zalmyr / Get-WindowsKey.ps1
Last active August 29, 2015 14:10
Powershell: Get-WindowsKey
function Get-WindowsKey {
param ($targets = ".")
$hklm = 2147483650
$regPath = "Software\Microsoft\Windows NT\CurrentVersion"
$regValue = "DigitalProductId"
Foreach ($target in $targets) {
$productKey = $null
$win32os = $null
$wmi = [WMIClass]"\\$target\root\default:stdRegProv"
@zalmyr
zalmyr / wol.ps1
Created September 17, 2014 18:45
Wake On LAN Powershell
#These are the parameters to the script. The only mandatory param here is the mac address
#[net.ipaddress]::Broadcast will resolve to something like 255.255.255.255
param (
$targetMac,
$network = [net.ipaddress]::Broadcast,
$subnet = [net.ipaddress]::Broadcast
)
#We start the try, catch error handling here.
#if something in try block fails, the catch block will write the error