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
# Add to ~/.bashrc | |
# | |
# force reset of the current directory name in terminal title | |
# to reset it after SSH sessions end. | |
PROMPT_COMMAND='echo -ne "\033]0;$(basename ${PWD})\007"' |
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
# Add to ~/.zshrc | |
function clear_term_title { | |
# removes the text that ssh puts into the terminal title | |
printf '\033]0;\007' | |
} | |
PROMPT="$(clear_term_title)%% " |
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 |
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 |
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\.]+') |
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 |
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": "*" |
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 |
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
# directory where cygwin will be installed | |
$cygwinroot="C:\cygwin64" | |
# choose URL from https://cygwin.com/mirrors.html | |
$mirror="http://mirrors.kernel.org/sourceware/cygwin/" | |
# packages to be installed on top of the base. Comma-separated, no spaces | |
$packages="gcc-core,make,openssl,openssl-devel,zlib-devel,curl,bc" | |
# version of tarsnap to install | |
$tarsnapdist=(Invoke-WebRequest -uri https://www.tarsnap.com/download/ -UseBasicParsing).Content -split "`n" | |
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 | |
# list global tools installed | |
# select tool <PACKAGE_ID> | |
# execute `dotnet tool update --global <PACKAGE_ID>` | |
dotnet tool list --global | awk 'NR > 2 {print $1}' | xargs -L1 dotnet tool update --global |