Wednesday, January 22, 2014

Set up an active GitHub repo with a single bash command

There should never be any barrier between thinking of something and putting it on GitHub.

With that in mind, here's a very short bash function + alias I use to get a repo up as quickly as possible.

# github
function new_github_repo(){
    if [ -z "$1" ]
        then
            echo "Usage: github [name]"
        else
            USER='YOUR_GIT_USERNAME'
            curl -u "$USER" https://api.github.com/user/repos -d '{"name":"'$1'"}'
            cd ~
            mkdir $1
            cd $1
            touch README.md
            git init
            git add -A
            git commit -am "Initial commit."
            git remote add origin git@github.com:$USER/$1.git
            git push origin master
    fi
}
alias github='new_github_repo'

Saturday, January 11, 2014

Iron Blogger!

Great news-- I made it through the rigorous application process, and have been accepted to Iron Blogger Boston!

A big part of why I'm doing this is to participate in the One Cool Thing Per Week (OCTPW) initiative.  Briefly, this is something I just made up where I present one short project per week that I find "cool".  Most of these will be software projects, with a few hardware and maker things thrown in.  I encourage others to join me on this endeavor.

Outside of OCTPW, I will be posting my usual smörgåsbord of random observations, factoids, and anal-expulsive cynicsm for future archaeologists to puzzle over.

On a side note, I'm going to be using Stypi as a word processor for all of my future posts.  If you haven't used it, you should!  It's one of my favorite examples of featureset minimalism on the web.  Very unix-philosophy-y.  

(I do wish I could synchronize it with my blogging software, though.  Anyone?)