Skip to content

Instantly share code, notes, and snippets.

View iamacarpet's full-sized avatar

Samuel iamacarpet

View GitHub Profile
@iamacarpet
iamacarpet / Boot
Last active February 8, 2024 14:42
Glazier UEFI network boot (Secure Boot enabled)
#!ipxe
# Some menu defaults
set menu-timeout 60000
set submenu-timeout ${menu-timeout}
isset ${menu-default} || set menu-default exit
###################### MAIN MENU ####################################
@iamacarpet
iamacarpet / Boot-Glazier.ps1
Last active January 25, 2024 09:50
Glazier WinPE boot from existing Windows install
cd C:\Windows\Temp
& curl.exe --output glazier.iso https://storage.googleapis.com/example-glazier-files/OSDCloud-WinPE-Glazier.iso
Mount-DiskImage C:\Windows\Temp\glazier.iso -PassThru
$driveLetter = ($mountResult | Get-Volume).DriveLetter
Copy-Item -Path $( -join($driveLetter, ":\sources\") ) -Destination C:\sources -Recurse
mkdir C:\boot
Copy-Item -Path $( -join($driveLetter, ":\boot\boot.sdi" ) ) -Destination C:\boot\boot.sdi
Dismount-DiskImage C:\Windows\Temp\glazier.iso
@iamacarpet
iamacarpet / composer.json
Last active October 19, 2021 14:11
Simplistic GCP Secret Manager usage from PHP
{
"require": {
"google/cloud": "^0.171.0"
}
}
@iamacarpet
iamacarpet / teamsupdate.ps1
Created September 23, 2021 11:05
Force a Microsoft Teams update
$ProgressPreference = 'SilentlyContinue'
$TeamsSettings = $HOME + "\AppData\Roaming\Microsoft\Teams\settings.json"
$Setting = Get-Content $TeamsSettings -ErrorAction Continue | ConvertFrom-Json | Select Version
$Version = $Setting.Version
echo "Checking for updates..."
$UpdateInfo = curl "https://teams.microsoft.com/desktopclient/update/$Version/windows/x64?ring=general"
$UpdateData = $UpdateInfo | ConvertFrom-json
@DomT4
DomT4 / gist:7e08b84dfb6022b96ed0
Last active August 29, 2015 14:02
OS X 10.10 Bootable USB

Twitter user Jaroneko published some instructions on how to create a bootable USB for OS X 10.10 the other day.

This is a revised edition tweaked by me to address a couple of the errors terminal was spewing out in response to Jaroneko's instructions, as well as improving the clarity of the process with exercising the verbose option.

If OS X 10.10 Developer Preview.app is in /Downloads:

  • defaults write com.apple.finder AppleShowAllFiles TRUE
  • killall Finder
  • sudo hdiutil attach ~/Downloads/Install\ OS\ X\ 10.10\ Developer\ Preview.app/Contents/SharedSupport/InstallESD.dmg
  • diskutil list (Find the /dev/disk corrosponding to your USB stick).