Skip to content

Instantly share code, notes, and snippets.

View jimdiroffii's full-sized avatar
🏠
Working from home

Jim Diroff II jimdiroffii

🏠
Working from home
View GitHub Profile
@jimdiroffii
jimdiroffii / updateOps.bat
Created January 28, 2021 07:48
Change a Simphony POS configuration without a CAL
@echo off
set /p id="Enter ServiceHost ID: "
set /p ws="Enter Workstation ID: "
REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Micros\CAL\Config"
powershell -Command "(gc C:\Micros\Simphony\POSClient\Cfg\PosConfiguration.ini) -replace 'ClientID=\d\d\d\d\d\d', 'ClientID=%id%' | Out-File -encoding ASCII C:\Micros\Simphony\POSClient\Cfg\PosConfiguration.ini"
@jimdiroffii
jimdiroffii / generateclientcert.ps1
Last active January 4, 2021 21:57
Azure Powershell - Generate root and client certificates
# With previous session from root generation still open
New-SelfSignedCertificate -Type Custom -DnsName <clientcertificatename> -KeySpec Signature `
-Subject "CN=<clientcertificatename>" -KeyExportPolicy Exportable `
-HashAlgorithm sha256 -KeyLength 4096 `
-CertStoreLocation "Cert:\CurrentUser\My" `
-Signer $cert -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.2")
@jimdiroffii
jimdiroffii / move-mouse.ahk
Created September 14, 2020 15:18
Mouse Automation Example in AutoHotKey
^!m::
Loop 15
{
MouseMove, 766, 421
click 766, 421
Send 18{Enter}
MouseMove, 579, 75
Click 579, 75
MouseMove, 766, 421
}
@jimdiroffii
jimdiroffii / process-monitor.au3
Created September 14, 2020 15:17
Process monitor for Windows
#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_icon=..\Icon\<iconfile.ico>
#AutoIt3Wrapper_outfile=ProcessMonitor.exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
#Include<file.au3>
Dim $date = @MON & @MDAY & @YEAR
Dim $ProcessName1 = "<process1name.exe>"
Dim $ProcessName2 = "<process2name.exe>"
@jimdiroffii
jimdiroffii / set-static.bat
Created September 14, 2020 15:17
Set Static IP in Windows
rem Setting Static IP for interface "Local Area Connection"
netsh interface ip set address name = "Local Area Connection" static 192.168.1.1 255.255.255.0 192.168.1.254 1
netsh int ip set dns name = "Local Area Connection" source= static addr = 208.67.220.220
netsh int ip add dns name = "Local Area Connection" addr = 208.67.222.222 index =2
@jimdiroffii
jimdiroffii / enable-dhcp.bat
Created September 14, 2020 15:16
Enable DHCP in Windows
rem Setting DHCP for interface "Local Area Connection"
netsh interface ip set address "Local Area Connection" dhcp
netsh interface ip set dns "Local Area Connection" dhcp
@jimdiroffii
jimdiroffii / remove-kds.bat
Created September 14, 2020 15:15
Remove all KDS services from a Micros Simphony servicehost
rem Stop and Disable KDS Services
net stop "MICROS KDS Controller"
sc config "MICROS KDS Controller" start= disabled
rem Stop and Disable IIS Services
net stop "IISADMIN"
sc config "IISADMIN" start= disabled
net stop "W3SVC"
sc config "W3SVC" start= disabled
@jimdiroffii
jimdiroffii / copy-filetype.bat
Created September 14, 2020 15:02
Copy files of a certain type
for /R %%x in (*.jpg,*.png) do copy "%%x" C:\<targetdir>
@jimdiroffii
jimdiroffii / combine-csv.py
Created September 14, 2020 15:00
Combine multiple CSV files into one file
import os
import glob
import pandas as pd
os.chdir("C:/Users/ishmael/Downloads/csv")
extension = 'csv'
all_filenames = [i for i in glob.glob('*.{}'.format(extension))]
combined_csv = pd.concat([pd.read_csv(f) for f in all_filenames ])
@jimdiroffii
jimdiroffii / set-ip-address-interactive.bat
Created September 14, 2020 14:58
Interactively set an IP address in the CMD line of Windows
@echo off
echo Choose:
echo [A] Set Static IP
echo [B] Set DHCP
echo.
:choice
SET /P C=[A,B]?
for %%? in (A) do if /I "%C%"=="%%?" goto A
for %%? in (B) do if /I "%C%"=="%%?" goto B