Skip to content

Instantly share code, notes, and snippets.

View Dogers's full-sized avatar
🏠
Trying to work from home

Dogers

🏠
Trying to work from home
View GitHub Profile
@Dogers
Dogers / FireWatch.ps1
Created January 16, 2022 21:59
Powershell script for managing Windows Firewall rules for forcing Overwatch server regions
#Requires -Module NetSecurity
#Requires -RunAsAdministrator
$Rules = @{
"NA West" = @(
"24.105.8.0/21"
);
"NA East" = @(
"24.105.40.0/21"
);
@Dogers
Dogers / rawprinttest.py
Created December 10, 2018 11:39
Send a file to Windows printer in RAW format
import win32print
import sys
from pathlib import Path
# Python 3 only..
if sys.version_info[0] < 3:
raise Exception("Python 3 or a more recent version is required.")
printers = win32print.EnumPrinters(4)
printercount = 0