I often get into a state where I’ve started some work, done some commits etc and then realised I dont have a place to push the code to. Getting it on github has involved getting the browser out, login to github, click click click {pain}. So, here is how you can create a new repo for your login name on github.com without moving away from the shell.
curl -H "X-GitHub-OTP: XXXXX" -u 'LoginName' https://api.github.com/user/repos -d '{"name":"Repo-To-Create"}'
You need to supply your OTP pass and replace XXXX with it, and ofcourse your own LoginName and finally the Repo-To-Create. Once this call runs, curl will ask for your password and you should get the github API dump a bunch of details ( or tell you that it failed, in which case you need to check the call ).
now the usual ‘git remote add github git@github.com:LoginName/Repo-To-Create‘ and you are off.
regards,
I um… made your github repo creation one-liner a bit more *ahem* robust: https://gist.github.com/goozbach/1b1aa6c780c71e9bc052e9f286a9c39b #OverEngineeredMuch