Skip to content

Instantly share code, notes, and snippets.

View Pome-ro's full-sized avatar
🐲
Roll for Initiative!

Tom Pomeroy Pome-ro

🐲
Roll for Initiative!
View GitHub Profile
@Pome-ro
Pome-ro / Battleship.ps1
Created February 2, 2023 01:44
GPT Battle Ship PowerShell
# Function to display the game board
function DisplayBoard {
Write-Host " A B C D E F G H I J"
for ($i=0; $i -lt 10; $i++) {
Write-Host ($i + 1) " " $board[$i]
}
}
# Function to get user input for ship placement
function GetInput {
@Pome-ro
Pome-ro / Dirk-Stonefist.md
Last active December 13, 2022 16:33
Character Sheet for interacting with ChatGPT

Character Name: Durk Stonefist (Male)


Class & Level Background Race Alignment Experience Points
Fighter, Level 1 Soldier Dwarf Lawful Good 150/300

Armor Class:

Function Remove-Symbols {
param(
[string]
$string
)
[regex]$reg = "[^\p{L}\p{Nd}]"
return $string -replace $reg
}
<#
The CSV should have a list of serialnumbers
#>
$CSV = "~\Desktop\devices.csv"
$Devices = Import-Csv $CSV
$OU = ""
foreach ($SerialNumber in $Devices) {
Write-Host "Modifying " $Item "to $OU" -ForegroundColor Green
@Pome-ro
Pome-ro / Remove-ADUserFromGroup.ps1
Created April 19, 2021 15:19
Remove User from Group shell menu
function Remove-ADUserFromGroup {
[CmdletBinding()]
param (
[Parameter(mandatory)]
[string]
$identity,
[Parameter(mandatory)]
[string]
$credential
)
@Pome-ro
Pome-ro / Test-DC.ps1
Created December 10, 2018 21:29
Test the Difficulty Class of a given trap/event/skill in D&D
function Test-DC {
param (
# Parameter help description
[Parameter()]
[int]
$DC,
[Parameter()]
[int]
$Bonus,
[Parameter()]
@Pome-ro
Pome-ro / Send-GHCWebhookMessage.ps1
Created March 7, 2018 02:31
Send-GHCWebhookMessage - Used for sending Text only messages to a Google Hangouts Chat Room Webhook.
function Send-GHCWebhookMessage {
[CmdletBinding()]
param (
# uri
[Parameter(Mandatory)]
[string]
$URI,
# Message
[Parameter(Mandatory)]
[string]
@Pome-ro
Pome-ro / New-Blogpost.ps1
Last active November 20, 2017 04:29
Script to generate a new blog post for your github pages jekyll site.
[CmdletBinding()]
param (
# Name
[Parameter(Mandatory)]
[string]
$Name,
# Date
[Parameter()]
[String]
$Date = (Get-Date -Format yyyy-M-d),
# Com Object for making SNMP calls
$SNMP = new-object -ComObject olePrn.OleSNMP
# Printer objects from our print server
$All_Printers = get-printer -ComputerName $Config.PrintServer
# Array of printers to output, which will contain toner data, and some data from our print server.
$Printers = New-Object System.Collections.ArrayList
if ($i -eq $null) {$i = 8080}
$i++
$Colors = @{
BackgroundColor = "#12A5EC"
FontColor = "#FFFFFFFF"
}
$Data = @();
$Data += [PSCustomObject]@{"DataName" = "DataSet 1"; "Dogs" = 54; "Cats" = 23; "Birds" = 12}