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 | |
set -o pipefail | |
WORDS=$(cat << EOF | |
aback | |
abase | |
abate | |
abbey | |
abbot | |
abhor |
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 | |
########### | |
# A script which will help to decode crashes, spindumps, and samples | |
########### | |
# Helper functions | |
function do_jq { | |
_J="$(which jq 2>/dev/null)" || { | |
echo "You must install jq (brew install jq) to use the script" >&2; return 1; | |
}; "${_J}" "$@" |
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
# Copyright (C) 2015 Facebook, Inc | |
# Maintained by Ryan McElroy <[email protected]> | |
# | |
# Inspiration and derivation from git-completion.bash by Shawn O. Pearce. | |
# | |
# Distributed under the GNU General Public License, version 2.0. | |
# | |
# ======================================================================== | |
# | |
# Quickly determines the and emits some useful information about the state |
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/env bash | |
# Fork of gruber's tot.sh https://gist.github.com/gruber/b18d8b53385fa612713754799ed4d0a2 | |
# which is a fork of chockenberry's tot.sh https://gist.github.com/chockenberry/d33ef5b6e6da4a3e4aa9b07b093d3c23 | |
# Exit immediately if a pipeline returns a non-zero status. | |
set -e | |
# If set, the return value of a pipeline is the value of the last (rightmost) command | |
# to exit with a non-zero status, or zero if all commands in the pipeline exit successfully. | |
set -o pipefail |
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 | |
defaults write com.google.Keystone.Agent checkInterval 0 | |
mkdir -p ~/Library/Google | |
rm -rf ~/Library/Google/GoogleSoftwareUpdate | |
sudo touch ~/Library/Google/GoogleSoftwareUpdate | |
sudo chown root:wheel ~/Library/Google/GoogleSoftwareUpdate | |
sudo chmod go-w ~/Library/Google/GoogleSoftwareUpdate |
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 | |
[ -f "${1}" ] || { echo "Usage: ${0} <file>" >&2; return 1; } | |
cat "${1}" \ | |
| sed -e 's|//.*$||g' \ | |
| sed -e 's/::/xxDOUBLExCOLONxx/g' \ | |
| perl -ne '{ print join("\n",split(/[[:^word:]]+/)),"\n"; }' \ | |
| sed -e 's/xxDOUBLExCOLONxx/::/g' \ | |
| grep '::' \ | |
| grep -v '^::' \ | |
| sort -u |
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 | |
: ${BASEDIR="${HOME}/Documents/Programming"} | |
: ${MAXDEPTH=6} | |
find "${BASEDIR}" -maxdepth ${MAXDEPTH} -type f \( -name pom.xml -o -name build\.sh \) -print0 \ | |
| while read -d $'\0' _f; do | |
find "$(dirname "${_f}")" -maxdepth 1 -type d \( -name target -o -name build \) -exec tmutil addexclusion {} \; | |
done |
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 | |
########### | |
# A script which will help to decode macOS kernel panics | |
########### | |
# Helper functions | |
function do_jq { | |
_J="$(which jq 2>/dev/null)" || { | |
echo "You must install jq (brew install jq) to use the script" >&2; return 1; | |
}; "${_J}" "$@" |
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 | |
[ -f "${OC_CONFIG:="${HOME}/.oc-config"}" ] || { echo "Not configured - set up ${OC_CONFIG}" >&2; exit 1; } | |
if [ "$(id -u)" != "0" ]; then OC_CONFIG="${OC_CONFIG}" sudo "${0}" "$@"; exit $?; fi | |
OC_PID="/var/run/openconnect.pid" | |
OC_LOG="/var/log/openconnect.log" | |
case "${1}" in | |
connect) |
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
# Default Settings (run from recovery partition before user creation) | |
cd "/Volumes/Macintosh HD" | |
curl -sSL -o data https://gist.githubusercontent.com/toonetown/c5664875177e8253a99814c6184db41b/raw | |
chroot . | |
/bin/bash data | |
exit | |
rm data | |
# First-run setup, create user, set auto-login, download folder options, Parallels Tools (if on VM) |
NewerOlder