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 | |
if [ $# -lt 1 ]; then | |
echo "Usage: $0 [enable|disable]" | |
exit 1 | |
fi | |
plistLoc="/private/var/root/Library/Preferences/com.apple.CoreBrightness.plist" | |
currentUserUID=$(dscl . -read /Users/$(whoami)/ GeneratedUID) # Get the GeneratedUID for the current user |
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
function START() { | |
var url = "https://hooks.slack.com/services/xxxxxx/xxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxxxx"; | |
var payload = { | |
"channel" : "#test", // <-- optional parameter, use if you want to override default channel | |
"username" : "robot", // <-- optional parameter, use if you want to override default "robot" name | |
"text" : "It's working", // <-- required parameter | |
"icon_emoji": ":robot_face:", // <-- optional parameter, use if you want to override default icon, | |
//"icon_url" : "http://image" // <-- optional parameter, use if you want to override default icon |
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 | |
LOCALADMIN="username" | |
kickstart=/System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart | |
echo "Configuring Remote Management" | |
if id -u $LOCALADMIN >/dev/null 2>&1; then | |
echo "Defined local admin account exists" | |
# Deactivate ARD agent, deny all access | |
echo "Deactivating ARD agent" |
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
/** | |
* Calculate the driving distance (in meters) along a route. | |
* | |
* @param {"london","manchester","liverpool"} route | |
* Comma separated ordered list of two or more map | |
* waypoints to include in route. First point | |
* is 'origin', last is 'destination'. | |
* | |
* @customfunction | |
*/ |
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
start = (text / enclosedexpression)* | |
text = | |
characters:$((!open) c:any)+ { | |
return { | |
type: 'text', | |
value: characters | |
} | |
} |