View dumpvols.sh
#!/bin/bash | |
# | |
# Get Partition Info from all disks | |
# | |
# Written by joevt updated Dec 29. 2020 | |
# Patches marked "rgh" July, 2010, to dump information beyond the | |
# four bios partitions | |
# | |
# sudo ./dumpvols.sh > dumpvols_result.txt 2>&1 | |
# |
View M1MacTimings.sh
#!/bin/bash | |
# by joevt Jan 7/2021 | |
dodump=1 | |
if [[ "$1" == "-s" ]]; then | |
dodump=0 | |
shift | |
fi |
View KextUtil.sh
# by joevt Dec 30, 2020 | |
checkkext () { | |
local thekextpath="$1" | |
if [[ -d "$thekextpath" ]]; then | |
if [[ -f "$thekextpath/Contents/Info.plist" ]]; then | |
local kextname="$(basename "$thekextpath")" | |
if [[ "$kextname" =~ ".*\.kext" ]]; then | |
local kextidentifier="" | |
kextidentifier="$(/usr/libexec/PlistBuddy -c 'Print :CFBundleIdentifier' "$thekextpath/Contents/Info.plist" 2> /dev/null)" |
View ioreg.pl
#!/bin/perl | |
# by joevt Dec 30, 2020 | |
use 5.010; | |
use strict; | |
#use warnings; | |
use Data::Dumper qw(Dumper); | |
use JSON::PP; |
View DiskUtil.sh
#!/bin/bash | |
# by joevt Jan 31, 2021 | |
directbless="/Volumes/Work/Programming/XcodeProjects/bless/bless-204.40.27 joevt/DerivedData/bless/Build/Products/Debug/bless" | |
alias directbless='"$directbless"' | |
if [[ ! -f "$directbless" ]]; then | |
echo "# Download and build bless from https://github.com/joevt/bless , then update the path of directbless defined in DiskUtil.sh" | |
directbless=bless | |
alias directbless=bless | |
fi |
View gfxutil.sh
#!/bin/bash | |
# joevt Jan 31, 2021 | |
# https://forums.macrumors.com/threads/documentation-on-all-parameters-for-nvram.2239034/post-28518123 | |
gfxutilcmd=~/Downloads/gfxutil | |
alias gfxutil='"$gfxutilcmd"' | |
directbless="/Volumes/Work/Programming/XcodeProjects/bless/bless-204.40.27 joevt/DerivedData/bless/Build/Products/Debug/bless" | |
alias directbless='"$directbless"' | |
if [[ ! -f "$directbless" ]]; then |
View ThunderboltUtil.sh
# by joevt Jul 7, 2020 | |
#========================================================================================= | |
# | |
# | |
# Thunderbolt DROM Notes: | |
# | |
# | |
# https://lore.kernel.org/patchwork/patch/714766/ | |
# |
View pcitree.sh
#!/bin/bash | |
# by joevt May 8, 2020 | |
#=================== | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root like this:" | |
echo "sudo $0" | |
exit 1 | |
fi | |
#=================== |
View EDIDUtil.sh
# by joevt Dec 17/2020 | |
#========================================================================================= | |
# Modify EDID | |
getarrstart () { | |
# bash arrays start at 0 | |
# zsh arrays start at 1 (applies only to [] syntax) but this can be changed with "setopt ksh_arrays" | |
# zsh arrays start at 0 when using ${arr:x:x} syntax | |
local arr=(1 0) |