May 26 2009

Heating up with HotCocoa on GitHub

I’ve imported Postie to GitHub to make it easier to follow along from home. If you’re new here, you can see the development of Postie in the Heating up with HotCocoa articles (part I, part II and part III).

The code on GitHub is based off of the code from part III with a minor addition to the button action.

b.on_action do
  load_feed
 
  @timer.invalidate unless @timer.nil?
  @timer = NSTimer.scheduledTimerWithTimeInterval(30, target:self,
                                                  selector:"refresh".to_sym, userInfo:nil,
                                                  repeats:true)
end

I wanted to have the application reload my metrics data automatically to feed my obsessive nature. I added a NSTimer that will execute a refresh method every 30 seconds. The refresh method just calls load_feed to reload everything. Not perfect, but works as a quick hack to be cleaned up later.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Mar 08 2009

GitHub Pages

Categories: Computers, Programming
Tags:

So, I hit the button in GitHub to generate a project page for Jack and promptly spent the next 30 minutes figuring out how to check the gh-pages branch out into my local repo.

The following is what I did to get everything working. Note, make sure you’ve got all your local changes committed or stashed before doing this as they will be lost otherwise.


  git clone git@github.com:dj2/jack.git Jack
  cd Jack
  git symbolic-ref HEAD refs/heads/gh-pages
  rm .git/index
  git clean -f -d -x
  git pull origin gh-pages

If you didn’t use the generate page button in the GitHub website you can follow the directions here to get your project page up and running.

Once this is done you should be able to git checkout master and git checkout gh-pages to edit the code or website.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]