Skip to content

Instantly share code, notes, and snippets.

@startergo
startergo / osx-software-update-urls-10.3-to-14.txt
Created February 3, 2024 15:32 — forked from b0gdanw/osx-software-update-urls-10.3-to-14.txt
URLs of the index files used by the software update client on OS X
10.3 (Panther):
https://swscan.apple.com/scanningpoints/scanningpointX.xml
10.4 (Tiger):
https://swscan.apple.com/content/catalogs/index.sucatalog
https://swscan.apple.com/content/catalogs/index-1.sucatalog
10.5 (Leopard):
https://swscan.apple.com/content/catalogs/others/index-leopard.merged-1.sucatalog
@startergo
startergo / Install_USB_Maker.sh
Last active January 28, 2024 14:38 — forked from dakanji/Install_USB_Maker.sh
Creates Bootable USB for Mac OS Lion to Monterey
#!/usr/bin/env bash
# Install_USB_Maker.sh
# Copyright (c) 2020 - 2023 Dayo Akanji
# - dakanji@users.sourceforge.net
# Portions Copyright (c) Jeff Geerling
# - https://github.com/geerlingguy/macos-virtualbox-vm/blob/master/LICENSE
#
# MIT License
@startergo
startergo / sip_config.py
Created March 26, 2023 14:51 — forked from pudquick/sip_config.py
Querying active SIP status directly from the kernel, bypassing nvram and csrutil, via python on macOS
# An overly complicated SIP config checker
# This is a technically interesting implementation because it does not rely on csrutil
# Instead it queries the kernel directly for the current configuration status
# This means, for example, in environments where SIP has been disabled and csrutil has
# been removed or modified (say, with DYLD_LIBRARY_PATH), as long as python can run you
# can still check status
# Additionally, checking the nvram csr-active-config setting isn't accurate now with
# 10.12.2+, since running "sudo csrutil clear" deletes the variable until reboot,
@startergo
startergo / recovery.sh
Created February 12, 2023 18:16 — forked from jonathantneal/recovery.sh
Create or update macOS Big Sur (or Catalina, or Mojave) Recovery Partition Without Reinstalling
#!/bin/sh
# Set the macOS installer path as a variable
MACOS_INSTALLER="/Applications/$(ls /Applications | grep "Install macOS")"
MOUNT_POINT="$MACOS_INSTALLER/Contents/SharedSupport"
echo "macOS installer is \"$MACOS_INSTALLER\""
# Set the target disk as a variable
TARGET=$(diskutil info "$(bless --info --getBoot)" | awk -F':' '/Volume Name/ { print $2 }' | sed -e 's/^[[:space:]]*//')
echo "Target disk is \"$TARGET\""
@startergo
startergo / sync-forked-repo.md
Created February 5, 2023 15:23 — forked from corinneling/sync-forked-repo.md
How to sync up a forked repository

How to Sync A Forked Repo

One problem I had while practicing git was syncing up a forked repository. This can come in handy for open source projects and collaborating in teams without permissions to directly push onto an original repo. I'm interested in open source, so I figured it would be a good thing to learn, and a good thing to document (because I am sure the details will skip my mind later).

  1. Make sure you are in the right place
    • That was my first mistake. I was in the wrong directory so I got this error when I tried to merge.

      fatal: refusing to merge unrelated histories

    • That happened because I was telling git to merge one repo (my dotfiles repo) with the other (my apprenticeship repo). Here's some documentation on that error

  • An easy way to check where you are is the command:
@startergo
startergo / KextUtil.sh
Created February 5, 2023 14:33 — forked from joevt/KextUtil.sh
Commands for kexts
#!/bin/bash
# joevt Jan 31, 2023
#10.4 Tiger to 10.13 High Sierra
kextload=kextload
# Later macOS versions
command -v kextutil > /dev/null && kextload=kextutil
getkextidentifier () {
@startergo
startergo / pcitree.sh
Created January 31, 2023 02:28 — forked from joevt/pcitree.sh
A bash script to produce more informative output than lspci -nntv
#!/bin/bash
# by joevt Jan 22, 2023
#===================
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root like this:"
echo "sudo $0"
exit 1
fi
#===================
@startergo
startergo / Convert-WindowsImage.ps1
Created October 26, 2021 12:09 — forked from john-clark/Convert-WindowsImage.ps1
deplyment powershell scripts found on the internets
Function
Convert-WindowsImage
{
<#
.NOTES
Copyright (c) Microsoft Corporation. All rights reserved.
Use of this sample source code is subject to the terms of the Microsoft
license agreement under which you licensed this sample source code. If
@startergo
startergo / codesign.example
Created January 14, 2021 14:23 — forked from carlashley/codesign.example
Code Signing Scripts on macOS
#Find valid code signing certificates with:
#/usr/bin/security find-identity -p codesigning -v
#Eg:
#[carl@pegasus]:outset # security find-identity -p codesigning -v
# 1) A898234JHSDFH38WERKHJSDFLJ2UY4092367HJK9H4J18 "Mac Developer: foo@example.org (ABC01FFFGH)"
# 1 valid identities found
#Code Sign file with:
#/usr/bin/codesign -s "Mac Developer: foo@example.org (ABC01FFFGH)" -i <bundleID> <file>