Skip to content

Instantly share code, notes, and snippets.

@NamedJason
NamedJason / Find-Orphans.ps1
Last active June 10, 2024 15:59
Finds Orphaned VMDK Files
# Powershell script to discover VMDK files that are not referenced in any VM's VMX file.
# Warning - I've heard reports that this doesn't work on some versions of ESXi and have no had time to troubleshoot/test it.
# Also detects VMDKs from machines that need snapshot consolidation (from differentials that exist but are not part of the tree).
# Author: HJA van Bokhoven
# Modifications: LucD
function LoadSnapin{
param($PSSnapinName)
if (!(Get-PSSnapin | where {$_.Name -eq $PSSnapinName})){
Add-pssnapin -name $PSSnapinName
@jonathanelbailey
jonathanelbailey / iso_image_edit.psm1
Last active December 20, 2023 19:28
a powershell module that allows for the modification of ISO images.
# this function grabs the iso image from the user supplied http location.
function get-isoimage{
[CmdletBinding()]
param(
$uri,
$workingfolder
)
begin{
$file_name = $uri -replace "http://[\s\S]+\/([\s\S]+\.iso)$",'$1'
$out_file = Join-Path $workingfolder -ChildPath $file_name
@wvengen
wvengen / get-publitas.sh
Created October 11, 2018 09:10
Generate PDF from Publitas folder URL
#!/bin/sh
#
# Generates PDF from Publitas images (online folder service)
# Stores generated PDF and JSON (which may contains links).
#
# Requirements:
# - wget https://www.gnu.org/software/wget/
# - jq https://stedolan.github.io/jq/
# - imagemagick https://www.imagemagick.org/
#
@MattMcFarland
MattMcFarland / readme.md
Last active February 7, 2025 13:41
Run X4 Foundations in debug mode with timestamped file names so you don't lose them.

Run X4 Foundations in debug mode.

The handy script below (x4-debug.bat) can be used as a shortcut to start x4 in debug mode. You get:

  • All debug messages turned on
  • All debug logs sent to a timestamped file, so you dont lose anything

Setup

Copy paste the code in the file below, then update the value for X4_EXE_PATH - change it to wherever X4.exe is located.

@kalihman
kalihman / AWS4-Request-Signer.ps1
Last active November 2, 2023 05:15
Powershell AWS4 Signer for STS GetCallerIdentity Action
# Define Helper Functions
function Get-Sha256Hash ($StringToHash) {
$hasher = [System.Security.Cryptography.SHA256]::Create()
$Hash = ([BitConverter]::ToString($hasher.ComputeHash([Text.Encoding]::UTF8.GetBytes($StringToHash))) -replace '-','').ToLower()
Write-Output $Hash
}
function ConvertTo-SortedDictionary($HashTable) {
$SortedDictionary = New-Object 'System.Collections.Generic.SortedDictionary[string, string]'
foreach ($Key in $HashTable.Keys) {
@ayebrian
ayebrian / vmware.md
Last active May 25, 2025 06:38
VMware ESXi / Workstation / ISO Downloads

Download VMware ISOs in this repo

All license keys and activation files have been removed in accordance with GitHub's Terms of Service.

Only official trial installers are available. Bring your own license (BYOL).