Skip to content

Instantly share code, notes, and snippets.

@kparmar1
kparmar1 / setup.sh
Created April 10, 2025 20:50 — forked from bradp/setup.sh
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
@kparmar1
kparmar1 / setjdk.fish
Last active March 5, 2022 12:04 — forked from tobias/setjdk.fish
Manage multiple java versions on the mac from the fish shell
function setjdk
if test -n "$JAVA_HOME"
removeFromPath "$JAVA_HOME/bin"
end
if test "$argv[1]" = "-t"
set -l POSSIBLE_JAVA_HOME (/usr/libexec/java_home -V 2>&1 >/dev/null | grep $argv[2] | awk -F '\t' '{print $3}')
if test -d "$POSSIBLE_JAVA_HOME"
set -gx JAVA_HOME $POSSIBLE_JAVA_HOME
set -gx PATH $JAVA_HOME/bin $PATH
else