Add to your .bash_profile
:
# A function to create new github repos from the command line
# USE: gh repo-name
function gh () {
curl -s -u '<githubusername>:<githubapitoken>' https://api.github.com/user/repos -d "{\"name\":\"$1\"}" | sed -n '/"ssh_url"/p' | gawk 'match($0, /:{1}\s"(.*)"/, ary) {print ary[1]}' | pbcopy
}