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
" Andrew Worth Carson | |
" (C) 2017 | |
" Rebind <Leader> key | |
let mapleader = "," | |
" Rebind copy & paste | |
vmap <Leader>c :w !pbcopy<CR> | |
" Bind quicksave commands |
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/python | |
# Addigy API Credentials | |
client_id = 'YOUR ADDIGY API CLIENT_ID HERE' | |
client_secret = 'YOUR ADDIGY API CLIENT_SECRET HERE' | |
policy_name = 'YOUR POLICY NAME HERE' | |
# Libraries | |
import sys | |
import requests |
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/bin/python3 | |
# Addigy API Credentials | |
client_id = 'YOUR ADDIGY API CLIENT_ID HERE' | |
client_secret = 'YOUR ADDIGY API CLIENT_SECRET HERE' | |
# Libraries | |
import sys | |
import requests | |
import json |
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 | |
fvKey="CN72-EJBE-8LTH-EL99-RDN5-OMXB" | |
if [[ $1 != '' ]]; then | |
fvKey="$1"; fi | |
sudo fdesetup validaterecovery -inputplist <<EOF | |
<?xml version="1.0" encoding="UTF-8"?> |
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
# Python routines for parsing bom files | |
# | |
# Examples so far: | |
# | |
# dump_bom(filename) - prints diagnostic structure information about bom file (including path list) | |
from ctypes import BigEndianStructure, c_char, c_uint8, c_uint16, c_uint32, sizeof, memmove, addressof | |
class BOMHeader(BigEndianStructure): | |
_pack_ = 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
andrew@Andrews-MBP ~ % diff ro* | |
4d3 | |
< srwxrwxrwx - .dbfseventsd | |
6a6 | |
> -rw-r--r-- - .rootro | |
12c12 | |
< drwxr-xr-x - Users | |
--- | |
> drwxr-xr-x sunlnk Users |
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
username@macos-10 ~ % sudo touch /lol | |
touch: /lol: Read-only file system | |
username@macos-10 ~ % sudo chmod +x / | |
username@macos-10 ~ % ls -al / | |
total 21 | |
drwxr-xr-x 30 root admin 960 Jun 7 16:13 . | |
[ truncated ] | |
username@macos-10 ~ % sudo chmod -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/bash | |
if /usr/libexec/mdmclient QuerySecurityInfo | grep -m1 EnrolledViaDEP | grep 1 >&/dev/null; then | |
echo "True" | |
else | |
echo "False" | |
fi |
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 | |
/usr/bin/defaults write /var/db/locationd/Library/Preferences/ByHost/com.apple.locationd LocationServicesEnabled -int 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 | |
if /usr/libexec/ApplicationFirewall/socketfilterfw --getstealthmode | grep enabled >& /dev/null; then | |
echo "true" | |
elif /usr/libexec/ApplicationFirewall/socketfilterfw --getstealthmode | grep disabled >& /dev/null; then | |
echo "false" | |
else | |
echo "Error: could not read valid Stealth Mode value." | |
fi |