Skip to content

Instantly share code, notes, and snippets.

View namick's full-sized avatar

nathan amick namick

View GitHub Profile
IFS="$(printf '\n\t')"
if ! [[ -f ~/.ssh/authorized_keys ]]; then
echo "Creating new ~/.ssh/authorized_keys"
touch ~/.ssh/authorized_keys
fi
user=$1
keys=`curl https://api.github.com/users/$user/keys | grep -o -E "ssh-\w+\s+[^\"]+"`