Skip to content

Instantly share code, notes, and snippets.

View boydfields's full-sized avatar

Boyd Fields boydfields

View GitHub Profile
@boydfields
boydfields / localhost-ssl-certificate.md
Created December 7, 2024 17:43 — forked from ethicka/localhost-ssl-certificate.md
Localhost SSL Certificate on Mac OS

🚨 2020 Update: I recommend using mkcert to generate local certificates. You can do everything below by just running the commands brew install mkcert and mkcert -install. Keep it simple!


This gives you that beautiful green lock in Chrome. I'm assuming you're putting your SSL documents in /etc/ssl, but you can put them anywhere and replace the references in the following commands. Tested successfully on Mac OS Sierra and High Sierra.

Set up localhost.conf

sudo nano /etc/ssl/localhost/localhost.conf

@boydfields
boydfields / optiplex-3060-enable-pcie3.md
Created September 3, 2024 15:14 — forked from 1oh1/optiplex-3060-enable-pcie3.md
Dell OptiPlex 3060 - Enable NVMe Gen 3 speeds (Enable PCIe 3.0)

Enable PCIe 3.0 speeds for NVMe SSDs on Dell OptiPlex 3060

Out of the box, any M.2 NVMe SSDs connected to the Dell OptiPlex 3060 runs at PCIe Gen 2.0 speeds (Max 5 GT/s; 2 GB/s) so the speed tests look like this:

screen1

However, after this BIOS mod, the SSD can reach PCIe Gen 3.0 speeds (Max 8 GT/s; 3.9 GB/s) so the speed tests look like this:

screen2

@boydfields
boydfields / disable_ddeauto.reg
Created August 30, 2024 18:27 — forked from wdormann/disable_ddeauto.reg
Disable DDEAUTO for Outlook, Word, OneNote, and Excel versions 2010, 2013, 2016
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\Office\16.0\Word\Options]
"DontUpdateLinks"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Word\Options]
"DontUpdateLinks"=dword:00000001
[HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Word\Options]
"DontUpdateLinks"=dword:00000001
@boydfields
boydfields / windows_hardening.cmd
Created August 30, 2024 18:26 — forked from mackwage/windows_hardening.cmd
Script to perform some hardening of Windows OS
:: Windows 10 Hardening Script
:: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering.
:: Obligatory 'views are my own'. :)
:: Thank you @jaredhaight for the Win Firewall config recommendations!
:: Thank you @ricardojba for the DLL Safe Order Search reg key!
:: Thank you @jessicaknotts for the help on testing Exploit Guard configs and checking privacy settings!
:: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater
:
@boydfields
boydfields / IntuneDetection.ps1
Created August 30, 2024 18:26 — forked from jhochwald/IntuneDetection.ps1
Block the Quick Assist Binary
# Intune Detection
if (!(Get-DnsClientNrptRule -ErrorAction SilentlyContinue | Where-Object -FilterScript {
($_.Namespace -eq 'remotehelp.microsoft.com')
}))
{
Write-Host -Object 'Namespace entry was not found'
exit 1
}
else
{
@boydfields
boydfields / Invoke-CleanupTestVM.ps1
Created August 30, 2024 18:25 — forked from jhochwald/Invoke-CleanupTestVM.ps1
Clean-up my test VM for further testing
#requires -Version 2.0
<#
.SYNOPSIS
Clean-up my test VM for further testing
.DESCRIPTION
Clean-up my test VM for further testing
Very simple, but brutal, clean-up script!
@boydfields
boydfields / FileSpeedTest.ps1
Created August 30, 2024 18:25 — forked from jhochwald/FileSpeedTest.ps1
File I/O Speed-Testing - compare native .NET vs. native Powershell (Just an example)
#requires -Version 3.0
<#
.SYNOPSIS
File I/O Speed-Testing
.DESCRIPTION
File I/O Speed-Testing
.PARAMETER ReadFile
@boydfields
boydfields / Get_All_Shell_Folder_Shortcuts.ps1
Created August 4, 2024 23:56 — forked from ThioJoe/Get_All_Shell_Folder_Shortcuts.ps1
Fetches all shell folders from Windows Registry and creates a shortcut to each, while attempting to determine the proper name and icon. Also outputs CSV file with results.
# Get All Shell Folder Shortcuts Script
# https://gist.github.com/ThioJoe/16eac0ea7d586c4edba41b454b58b225
# How to Use:
# 1. Open powershell, and navigate to the path with the script using 'cd' command
# 2. Run the following command to allow running scripts for the current session:
# Set-ExecutionPolicy -ExecutionPolicy unrestricted -Scope Process
# 3. Without closing the powershell window, run the script by typing the name of the script file starting with .\ for example:
# .\Get_All_Shell_Folder_Shortcuts.ps1
# 4. Wait for it to finish, then look in the "Shell Folder Shortcuts" folder for the results
@boydfields
boydfields / Unlock-PowerCfg.ps1
Created April 8, 2024 10:54 — forked from Velocet/Unlock-PowerCfg.ps1
Unlock/Unhide all Power Plan Settings/Options on Windows 10/11
#Requires -RunAsAdministrator
# Unlock-PowerCfg - v22.05.11
# Disable "Connected Standby"
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Power' -Name 'CSEnabled' -Value 0 -Force
# Get Power Settings entries and add/set 'Attributes' to 2 to unhide
$PowerCfg = (Get-ChildItem 'HKLM:\SYSTEM\CurrentControlSet\Control\Power\PowerSettings' -Recurse).Name -notmatch '\bDefaultPowerSchemeValues|(\\[0-9]|\b255)$'
foreach ($item in $PowerCfg) { Set-ItemProperty -Path $item.Replace('HKEY_LOCAL_MACHINE','HKLM:') -Name 'Attributes' -Value 2 -Force }
<#
.SYNOPSIS
An MTR clone for PowerShell.
Written by Tyler Applebaum.
Version 2.1
.LINK
https://gist.github.com/tylerapplebaum/dc527a3bd875f11871e2
http://www.team-cymru.org/IP-ASN-mapping.html#dns