View gist:f40b12e297fa21418275883401267fae
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
sh is a POSIX-compliant command interpreter (shell). It is implemented | |
by re-execing as either bash(1), dash(1), or zsh(1) as determined by the | |
symbolic link located at /private/var/select/sh. If | |
/private/var/select/sh does not exist or does not point to a valid shell, | |
sh will use one of the supported shells. | |
$ ls -l /private/var/select | |
total 0 | |
lrwxr-xr-x 1 root wheel 9 Jan 23 09:47 sh -> /bin/dash | |
lrwxr-xr-x 1 root wheel 9 Dec 2 06:37 sh.ori -> /bin/bash |
View net6-reset.sh
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/sh | |
#newline field separator | |
IFS=' | |
' | |
adapters=$(networksetup -listallnetworkservices | grep -v '*') | |
echo "setv6off" >&2 | |
for a in $adapters; do |
View macports-az-install.py
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 python3 | |
# -------------------------------------------------------------------------------------------- | |
# Copyright (c) Microsoft Corporation. All rights reserved. | |
# Licensed under the MIT License. See License.txt in the project root for license information. | |
# -------------------------------------------------------------------------------------------- | |
# | |
# This script will install the CLI into a directory and create an executable | |
# at a specified file path that is the entry point into the CLI. |
View bluetoohtd-restart.sh
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/sh | |
#kill bluetoothd to reset bluetooth wonkiness in macOS | |
#catalina, big sur, monterey | |
#fixes continuity, magic keyboard mismapping of function keys, magic mouse scrolling | |
current_userid=$(id -u) | |
if [ $current_userid -ne 0 ]; then | |
echo "$(basename "$0") requires superuser privileges to run" >&2 | |
echo "try: \033[1;36msudo $(basename "$0")" >&2 |
View build-deploy.yml
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
# Replace <items-in-angle-brackets> to cofigure | |
name: Build <stage|production> container and deploy | |
on: | |
push: | |
branches: [ <stage|production> ] | |
env: | |
ECR_REPOSITORY: <repo-name> | |
AWS_REGION: us-east-1 | |
ECS_CLUSTER: <custer-name> |
View ecs-deployment-policy.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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "GetAuthorizationToken", | |
"Effect": "Allow", | |
"Action": [ | |
"ecr:GetAuthorizationToken" | |
], | |
"Resource": "*" |
View install-aws-cli.sh
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/sh | |
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "/tmp/AWSCLIV2.pkg" | |
sudo installer -pkg /tmp/AWSCLIV2.pkg -target / | |
/usr/local/bin/aws --version | |
rm /tmp/AWSCLIV2.pkg |
View install-mono.sh
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/sh | |
current_userid=$(id -u) | |
if [ $current_userid -ne 0 ]; then | |
echo "$(basename "$0") requires superuser privileges to run" >&2 | |
exit 1 | |
fi | |
INSTALLED_VERSION=$(mono --version 2> /dev/null | grep -o -E 'version [0-9\.]+'| grep -o -E [0-9\.]+) | |
STABLE_VERSION=$(curl -s https://www.mono-project.com/download/stable/ | grep -o -E 'Stable \(.+\)' | grep -E -o '[0-9\.]+') |
View uninstall-vsmac.sh
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/sh | |
# Uninstall Visual Studio for Mac | |
echo "Uninstalling Visual Studio for Mac..." | |
sudo rm -rf "/Applications/Visual Studio.app" | |
rm -rf ~/Library/Caches/VisualStudio | |
rm -rf ~/Library/Preferences/VisualStudio | |
rm -rf ~/Library/Preferences/Visual\ Studio | |
rm -rf ~/Library/Logs/VisualStudio |
View uninstall-mono.sh
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/sh | |
sudo rm -rf /Library/Frameworks/Mono.framework | |
sudo pkgutil --forget com.xamarin.mono-MDK.pkg | |
sudo rm -rf /etc/paths.d/mono-commands |
NewerOlder