This file contains hidden or 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
TARGET="/Volumes/Macintosh HD" # Specify where to configure Recovery partition | |
MACOS_INSTALLER="/Applications/Install\ macOS\ Sierra.app" # Path to your macOS installer | |
# Remaining paths ahead are dependant on OS version | |
# This *should* support 10.9 and above but is only tested on 10.12 | |
curl http://support.apple.com/downloads/DL1464/en_US/RecoveryHDUpdate.dmg -L -o ~/Downloads/RecoveryHDUpdate.dmg | |
hdiutil mount ~/Downloads/RecoveryHDUpdate.dmg | |
pkgutil --expand /Volumes/Mac\ OS\ X\ Lion\ Recovery\ HD\ Update/RecoveryHDUpdate.pkg /tmp/recoveryupdate |
This file contains hidden or 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 | |
# Check if command was ran as root. | |
if [[ $(id -u) -eq 0 ]]; then | |
echo "The command \"sphp\" should not be executed as root or via sudo directly." | |
echo "When a service requires root access, you will be prompted for a password as needed." | |
exit 1 | |
fi | |
# Usage |
This file contains hidden or 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
drush eval "var_dump(Drupal\Component\Utility\Crypt::randomBytesBase64(55))" |
This file contains hidden or 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
// Tell Drupal to cancel this user. | |
// The third argument can be one of the following: | |
// - user_cancel_block: disable user, leave content | |
// - user_cancel_block_unpublish: disable user, unpublish content | |
// - user_cancel_reassign: delete user, reassign content to uid=0 | |
// - user_cancel_delete: delete user, delete content | |
user_cancel(array(), $uid, 'user_cancel_reassign'); | |
// user_cancel() initiates a batch process. Run it manually. | |
$batch =& batch_get(); |