Skip to content

Instantly share code, notes, and snippets.

View simstems's full-sized avatar

Stephen Morrison simstems

View GitHub Profile
@simstems
simstems / Get-Info.ps1
Last active June 5, 2025 22:23
Get PC info using PowerShell (Name, Brand, Model, Serial)
Get-CimInstance -ClassName Win32_ComputerSystem | Select-Object Name, Manufacturer, Model
wmic bios get serialnumber
@simstems
simstems / BulkReplacer.py
Last active July 24, 2024 21:29
Bulk find and replace text in a .txt file using python
# A.I. assisted with the creation of this code.
import sys
import os
import re
import random
import string
from pykml import parser
import pandas as pd
# Patterns to match
@simstems
simstems / PowerPy.py
Last active October 26, 2022 21:08
Demonstrate how to use PowerShell in Python to get a full path to a specific file under the current user.
# Demonstrate how to use PowerShell in Python to get a full path to a specific file under the current user.
import subprocess
#Functions
def RunCommand(Command):
process = subprocess.Popen(["powershell", Command], stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
output = process.stdout.readlines()
return output
def get_Path(path):
cleanPath = RunCommand(path)
@simstems
simstems / AmmoCounterTest.cc
Last active June 7, 2018 02:58
Turns an LED on for as long as the IR sensor (by Ammo Counter) is crossed.
/*
AmmoCounterTest
Turns an LED on for as long as the IR sensor is crossed.
modified 8 June 2018
by Stephen Morrison
GNU GENERAL PUBLIC LICENSE