Skip to content

Instantly share code, notes, and snippets.

View hkystar35's full-sized avatar

hkystar35

View GitHub Profile
@hkystar35
hkystar35 / get_compatible_macos_versions-asls.sh
Created March 3, 2024 14:41 — forked from PicoMitchell/get_compatible_macos_versions-asls.sh
Scripts to get compatible macOS versions from Apple Software Lookup Service (gdmf.apple.com/v2/pmv) or Software Update Catalog (swscan.apple.com[...]sucatalog).
#!/bin/bash
#
# Created by Pico Mitchell (of Random Applications) on 1/5/23
#
# https://gist.github.com/PicoMitchell/877b645b113c9a5db95248ed1d496243#file-get_compatible_macos_versions-asls-sh
#
# MIT License
#
# Copyright (c) 2023 Pico Mitchell (Random Applications)
@hkystar35
hkystar35 / man2pdf.sh
Created March 3, 2024 14:40 — forked from PicoMitchell/man2pdf.sh
Display "man" pages as PDFs on macOS, with nice filenames and caching.
#!/bin/sh
man2pdf() {
##
## Created by Pico Mitchell (of Random Applications) on 11/16/22
##
## https://gist.github.com/PicoMitchell/619c12fd6a53ae6ec657514915d4edf9
##
## MIT License
##
@hkystar35
hkystar35 / USStates_AbbreviationToFullNameHashtable.ps1
Created June 5, 2022 17:41
Hashtable for translating US State postal abbreviations to the State's full name
$StateAbbrToFullName = [ordered]@{
'AL' = 'Alabama'
'AK' = 'Alaska'
'AR' = 'Arkansas'
'AZ' = 'Arizona'
'CA' = 'California'
'CO' = 'Colorado'
'CT' = 'Connecticut'
'DE' = 'Delaware'
'DC' = 'District of Columbia'
#region FUNCTIONS
#region FUNCTION Get-RebootHistory
FUNCTION Get-RebootHistory {
<#
.SYNOPSIS
Retrieves historical information about shutdown/restart events from one or more remote computers.
.DESCRIPTION
The Get-RebootHistory function uses Common Information Model (CIM) to retrieve information about all shutdown events from a remote computer.