GitHub Username

GitHub Username

README

I was looking around when suddenly I remembered that in the past I saw a GitHub account with a single letter as username, so I wanted to check how many single-letter-accounts were available at this time, and wrote a script to quickly check the availability of those usernames.

It is quite impressive how many silly usernames are already taken by people that don’t use those accounts for anything interesting at all.

GitHub Username 2

Code

#!/bin/bash
username=$1
if [ "${username}" != "" ]; then
    response=$(curl --silent "https://github.com/signup_check/username" \
        --header "Host: github.com" \
        --header "Origin: https://github.com" \
        --header "X-Requested-With: XMLHttpRequest" \
        --referer "https://github.com/" \
        --user-agent "Mozilla/5.0 AppleWebKit/537.36" \
        --data "value=${username}")
    if [ "${response}" == "" ] || [ "${response}" == " " ]; then
        echo -e "\e[0;92mOk.\e[0m Username available."
    else
        response=$(echo $response | sed "s/Username /Username '$username' /g")
        echo -e "\e[0;91mError.\e[0m ${response}"
    fi
else
    echo "Usage: ${0} cixtor"
fi

GitHub Username 3

Do you have a project idea? Let's make it together!