Skip to content

Instantly share code, notes, and snippets.

@rpc180
rpc180 / gist:24e560c7eece19623f87c21bdcd51566
Last active December 3, 2023 16:56
Google Photos JSON Date Sorter
# Can run from anywhere
# Photos coded to be present in D:\photos subfolders
# Will also work on mp4 video files if present
# Folders labeled with dates will be created at script execution based on first photo with new date field
# Photos will be copied to D:\photos\date-taken
$startscript = get-date
$shortdate = get-date -format MM-dd-yy
$systemrunning = hostname
$runpath = get-location
@rpc180
rpc180 / Forgetful_Powershell
Created June 18, 2021 20:03
Useful Powershell Commands
# Search a folder directory for strings in specific file types only
Get-ChildItem *.* -Recurse -Include "*.json","*.xaml","*.ps1" | Select-string -pattern "Find Me"
@rpc180
rpc180 / wireshark-filters
Created June 11, 2021 20:20
Wireshark Display Filters
# Show DHCP inbound requests as well as DHCP INFORM
(ip.addr == 10.xx.xx.xx || ip.addr == 255.255.255.255) && dhcp
@rpc180
rpc180 / VB-WordSetupAllPictureSize
Created October 29, 2020 18:02
VB Script to Resize All MS Word Images
#
# Developer tab enabled in Word using File | Options | Customize Ribbon | CHECK Developer option in right column.
#
# Select Visual Basic under Developer tab and Double click on the created Module 1 to edit it
# Paste the following code into the module and then click the Play button at the top to run it on the current document
#
Sub SetupAllPictureSize()
Dim objInlineShape As InlineShape
Dim objShape As Shape
@rpc180
rpc180 / default.aspx
Last active September 18, 2020 20:57
Header Dump ASPX Webpage Blue/Green
<%@ Page Language="C#" AutoEventWireup="true" EnableSessionState="False" EnableViewState="False" EnableViewStateMac="False" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Header Dump - East US</title>
</head>
<body style="background-color:lightgreen;">
<h1>Header Dump - East US</h1><p>
@rpc180
rpc180 / AD_Obj_Create_Scripts
Last active September 17, 2020 13:59
Active Directory Object Creation Scripts
#
# Scripts to create the AD OUs, Groups, and users
# Accounts are created in a disabled state so that the password issue during bulk creation is not a problem, reset passwords and enable accounts as needed
# Create OUs first, Create Domain Groups Second, Create Users Last (User creation will autopopulate groups)
#
# Ensure network mapping to source .csv files prior to running scripts, and recommended to run scripts from powershell ISE interface
#
# CREATE OU STRUCTURE
@rpc180
rpc180 / pfblocker_grepping_for_domain
Last active August 29, 2020 16:01
How to find out which ban list contains domain entries
# From:
# reddit.com/pfsense pfBlockerNG invalid certificate with google.com; CN_DNSBL
# Basics on troubleshooting whitelist additions: https://www.reddit.com/r/pfBlockerNG/comments/apx9uc/whitelisting_sites_not_working/
# Find a feed that has a domain in it:
grep "google" /var/db/pfblockerng/dnsbl/*
# See if that is in the final database (not whitelisted by Alexa or other override):
grep "google" /var/unbound/pfb_dnsbl.conf
@rpc180
rpc180 / Skylines_Migrations
Created August 22, 2020 19:43
Folders to transfer to "move" Cities Skylines to another system and retain Mods/Mod Settings
# Cities Skylines Source/Destination Folders
C:\Users\AccountName\AppData\Local\Colossal Order\Cities_Skylines
C:\Program Files (x86)\Steam\steamapps\common\Cities_Skylines
@rpc180
rpc180 / choco_setup
Last active March 7, 2023 13:23
Chocolaty Installation List
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex
#Basic Computer Installation
choco install `
notepadplusplus `
7zip `
adobereader `
winscp `
putty `
wireshark `
@rpc180
rpc180 / OSCDIMG_notes
Last active March 7, 2024 09:06
Using oscdimg.exe to create a bootable Windows ISO with updated contents
# oscdimg.exe is installed along with Microsoft Windows 10 Deployment Toolkit
# located in "C:\Program Files (x86)\Windows Kits\10\Aessessment and Deployment Kit\Deployment Tools"
# Copy executable and etfsboot.com and efisys.bin to same folder as executable so it can resolve
# agrument locations are relative paths, does not seem to support absolute path from root
# 2#p0 stuff is not a typo.
oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,betfsboot.com#pEF,e,befisys.bin Win10_source\subfolder unattend_Win10Ent1607x64.iso
oscdimg.exe -m -o -u2 -udfver102 -bootdata:2#p0,e,bd:\workingmount\boot\etfsboot.com#pEF,e,bd:\workingmount\efi\microsoft\boot\efisys.bin d:\workingmount d:\support\Server2016_Test.iso