Skip to content

Instantly share code, notes, and snippets.

View karoltheguy's full-sized avatar

Carol Ouellet karoltheguy

View GitHub Profile
@karoltheguy
karoltheguy / Edge - New Tab.reg
Last active March 30, 2026 18:08
Change Edge - Custom New Tab page
Windows Registry Editor Version 5.00
; Bogus MDM Enrollment - Key 1 of 2
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Enrollments\FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF]
"EnrollmentState"=dword:00000001
"EnrollmentType"=dword:00000000
"IsFederated"=dword:00000000
; Bogus MDM-Enrollment - Key 2 of 2
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Provisioning\OMADM\Accounts\FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF]
"Flags"=dword:00d6fb7f
"AcctUId"="0x000000000000000000000000000000000000000000000000000000000000000000000000"
@karoltheguy
karoltheguy / Get-Certificate-Expiry.ps1
Created September 29, 2023 22:01
Gets SSL certificate expiry days
$minimumCertAgeDays = 30
$timeoutMilliseconds = 6000
$urls = @(
"https://allthingsagile.co/",
"https://www.google.com/"
)
# disabling the cert validation check. This is what makes this whole thing work with invalid certs...
[Net.ServicePointManager]::ServerCertificateValidationCallback = { $true }
@karoltheguy
karoltheguy / remove_sub_msg.sh
Created July 22, 2023 17:55
remove proxmox subscription message
sed -Ezi.bak "s/(Ext.Msg.show\(\{\s+title: gettext\('No valid sub)/void\(\{ \/\/\1/g" /usr/share/javascript/proxmox-widget-toolkit/proxmoxlib.js && systemctl restart pveproxy.service
@karoltheguy
karoltheguy / SetRDPCertificate.ps1
Created April 19, 2023 03:04
Set Certificate for RDP
#Certificate has to be installed in Personal
#Subject is who it has been issued to
$certSubject = ""
$tp = (ls Cert:\LocalMachine\my | WHERE {$_.Subject -match $certSubject } | Select -First 1).Thumbprint
wmic /namespace:\\root\CIMV2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="$tp"
@karoltheguy
karoltheguy / GenCertSigningReq.ps1
Created January 17, 2023 19:04
Powershell script to generate a CSR SHA256 2048bit
<#
.SYNOPSIS
GenCertSigningReq.ps1
.DESCRIPTION
This powershell script can be used to generate a Certificate Signing Request (CSR) using the SHA256 signature algorithm and a 2048 bit key size (RSA). Subject Alternative Names are supported.
.PARAMETER
@karoltheguy
karoltheguy / stay away.ps1
Last active December 24, 2025 16:14
Keep Windows awake and not idling
$wsh = New-Object -ComObject WScript.Shell
while (1) {
$rd = Get-Random -Minimum 57 -Maximum 172
$wsh.SendKeys('+{F15}')
Start-Sleep -Seconds $rd
}
@karoltheguy
karoltheguy / update_portainer.sh
Last active July 23, 2023 02:22
Update Portainer
sudo docker stop portainer
sudo docker rm portainer
sudo docker run -d -p 8000:8000 -p 9000:9000 -p9443:9443 --name=portainer --restart=always --pull=always -v /var/run/docker.sock:/var/run/docker.sock -v /containers/portainer:/data portainer/portainer-ee
@karoltheguy
karoltheguy / add_scrollbar.js
Created November 12, 2022 02:15
add scrollbar to paywall pages
var r="html,body{overflow:auto !important;}";
var s=document.createElement("style");
s.type="text/css";
s.appendChild(document.createTextNode(r));
document.body.appendChild(s);
void 0;
@karoltheguy
karoltheguy / FindGetLastShutdownReason.ps1
Created July 27, 2022 18:31
Find the last shutdown reason through event logs
Get-EventLog -LogName System |? {$_.EventID -in (6005,6006,6008,6009,1074,1076)} | ft TimeGenerated,EventId,Message -AutoSize –wrap
@karoltheguy
karoltheguy / gethuntmmr.psm1
Last active July 16, 2022 22:27
Hunt Showdown - Extract MMR
Function Get-HuntTeamMmr {
$HuntDir = "C:\Program Files (x86)\Steam\steamapps\common\Hunt Showdown"
$File = Get-Item "$HuntDir\user\profiles\default\attributes.xml"
$NameSuffix = "_blood_line_name"
$MmrSuffix = "_mmr"
$TeamSuffix = "_ownteam"
[xml]$Data = Get-Content $File
$FlatData = $Data.ChildNodes.selectNodes("*")