Skip to content

Instantly share code, notes, and snippets.

View comprofix's full-sized avatar

Matthew McKinnon comprofix

View GitHub Profile
@comprofix
comprofix / WindowsPowerShellProfile.ps1
Created November 23, 2025 02:43
Powershell Profile
function reload-profile {
& $profile
}
Function Get-PubIP {
(Invoke-WebRequest -UseBasicParsing http://ifconfig.me/ip).Content
}
Function Get-Zulu {
Get-Date -Format u
@comprofix
comprofix / Get-GoogleIPs.sh
Created November 23, 2025 02:42
Get Google IPs
curl -s -H "Accept: application/json" https://www.gstatic.com/ipranges/cloud.json | jq -r '.prefixes[].ipv4Prefix, .prefixes[].ipv6Prefix | select (. != null)' >> googleips
curl -s -H "Accept: application/json" https://www.gstatic.com/ipranges/goog.json | jq -r '.prefixes[].ipv4Prefix, .prefixes[].ipv6Prefix | select (. != null)' > googleips
@comprofix
comprofix / Get-MSIPs.sh
Created November 23, 2025 02:41
Get list of Microsoft 365 IPs
curl -s -H "Accept: application/json" "https://endpoints.office.com/endpoints/Worldwide?ClientRequestId=b10c5ed1-bad1-445f-b386-b919946339a7" | jq -r '.[] | select(.urls and .ips) | .urls[], .ips[]'
@comprofix
comprofix / Intune-Manual.ps1
Created November 23, 2025 02:39
Intune Manual
# Define the registry path
$registryPath = "HKLM:\Software\Microsoft\Enrollments"
# Check if the registry key exists
if (Test-Path $registryPath) {
# Get all subkeys under the Enrollments key
$subKeys = Get-ChildItem -Path $registryPath
# Remove each subkey
foreach ($subKey in $subKeys) {
======================
Proton: 1734948014 experimental-9.0-20241223
SteamGameId: 2125090
Command: ['/home/mmckinnon/.local/share/Steam/steamapps/common/Tintin - Cigars of the Pharaoh/Cigars.exe']
Options: {'forcelgadd'}
depot: 0.20241118.108552
pressure-vessel: 0.20241118.0 scout
scripts: 0.20241118.0
sniper: 0.20241118.108552 sniper 0.20241118.108552
Kernel: Linux 6.12.7-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 27 Dec 2024 14:24:37 +0000 x86_64
-------------------------------------------------------------
Command: cat /etc/os-release
NAME="Arch Linux"
PRETTY_NAME="Arch Linux"
ID=arch
BUILD_ID=rolling
ANSI_COLOR="38;2;23;147;209"
HOME_URL="https://archlinux.org/"
DOCUMENTATION_URL="https://wiki.archlinux.org/"
@comprofix
comprofix / check_updates.sh
Created October 15, 2021 00:38
Check Updates with Discord Notification
#!/bin/bash
# Script Name: check_updates_deb
# Author Name: Matt McKinnon
# Date: 7th June 2016
# Description: For use on Debian Based Systems
# This script will:
# Clean up the local apt repository of retrieved packages (apt-get clean)
# Resync the package index (apt-get update)
# If called with AUTOUPDATE set to yes then updates will be downloaded and applied with no feed back (not recommended)
# If called without AUTOUPDATE then packages are downloaded and an email is sent informing which packages are to be updated.
---
- hosts: windows
name: This is a play within a playbook
vars:
iis_sites:
- name: 'Ansible Playbook Test'
port: '8080'
path: 'C:\sites\playbooktest'
- name: 'Ansible Playbook Test 2'
port: '8081'
<VirtualHost *:80>
ServerName exchange.comprofix.com
ServerAlias autodiscover.comprofix.com
ServerAdmin support.comprofix.com
ErrorLog ${APACHE_LOG_DIR}/exchange.comprofix.com_error.log
CustomLog ${APACHE_LOG_DIR}/exchange.comprofix.com_access.log combined
Header set X-Frame-Options: "SAMEORIGIN"
Header set Server Apache
# Description: Boxstarter Script
# Author: https://comprofix.com
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
# NOTE the "." above is required.
#
# Run this boxstarter by calling the following from **elevated** powershell:
# example: Install-BoxstarterPackage -PackageName <gist>
# Learn more: http://boxstarter.org/Learn/WebLauncher