This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# version 1.4 - Simon Andersen | |
# set -x | |
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" | |
DSCONFIGADOUTPUT="$(dsconfigad -show -xml)" | |
COMPUTERACCOUNT="$(/usr/libexec/PlistBuddy -c "Print ':General Info:Computer Account'" /dev/stdin <<<"$DSCONFIGADOUTPUT")" | |
if [[ -z "$COMPUTERACCOUNT" ]]; then | |
echo "Fatal error - No computer account name found" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/osascript -l JavaScript | |
// version 1.1 - 2024 - Simon Andersen | |
let APP = Application.currentApplication() | |
APP.includeStandardAdditions = true | |
function readDefaults(plistfile,propertyKey) { | |
let theresult = undefined; | |
try { | |
theresult = APP.doShellScript("defaults read '"+plistfile+"' '"+propertyKey+"'"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# MIT License | |
# | |
# Copyright (c) 2024 Simon Andersen | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), | |
# to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
# and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/munki/munki-python | |
# | |
# MIT License | |
# | |
# Copyright (c) 2022 Simon Andersen | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), | |
# to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
# and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MIT License | |
// | |
// Copyright (c) 2022 Simon Andersen | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), | |
// to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
// and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
// | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// main.m | |
// openwithrosetta | |
// | |
// Created by Simon Andersen on 13/09/2021. | |
// | |
#import <Foundation/Foundation.h> | |
int main(int argc, const char * argv[]) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Call this script with the arguments [personal recovery key] [the name of a user to "reset"] | |
# i.e. "promote_personal_recovery_key_to_admin_user.sh 6323-AHJD-1231-4234-GHJ1-FH23 user1" | |
# a new user called "another" user is generated. It has the prk with a dash at the end for a password | |
# a new prk is generated and the user to reset is re-created with the password "password" and a | |
# newly minted secure token | |
#set -x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
function ENABLEARD(){ | |
dscl . -create "/Users/${1}" dsAttrTypeNative:naprivs -1073741569 | |
touch "/Library/Application Support/Apple/Remote Desktop/RemoteManagement.launchd" | |
if ! launchctl list|grep -q com.apple.screensharing ; then | |
launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist | |
fi | |
echo "Enabled Apple Remote Desktop Management for ${1}" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Download the script from https://gist.github.com/macsimom/982d507ff94767428e4832ef0fdbdf0c | |
# Open Terminal | |
# diskutil list | |
# Find the device identifer of the recovery partition, eg. "disk1s3" | |
# call the script with the device indentifier | |
# bash build_a_booter_for_fusion.sh disk1s3 | |
# An iso file is built at /Users/Shared | |
# |
NewerOlder