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 / .tmux.conf
Created February 3, 2024 18:50
Set up TMUX for vi (copy & paste)
setw -g mode-keys vi
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'r' send -X rectangle-toggle
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel
@kparmar1
kparmar1 / listjdk.fish
Last active November 9, 2019 16:40
List multiple java versions on the mac from the fish shell (useful with setjdk.fish to see possible valid idk versions )
function listjdk
/usr/libexec/java_home -V
end
@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