Archive for June, 2008

Patching with Git

June 27th, 2008 by pyrat

Git is hard; but powerful. A wee bit of command porn for you for contributing with open source projects.

When sitting in a branch you have been working on for a new feature / bugfix which was created with the command:

git checkout -b cool_patch

To create a patch for the master branch which is a remote tracking branch for a read only git repo. Typically, this is an open source project which you cant push to therefore you need to patch.

  git format-patch master --stdout > ~/patches/patchname.diff

Now you can create a ticket on the open source project with your patch.

-||-

To load a patch, its good to do it in a new branch.

So a workflow to applying a patch is as follows

  git branch master
  git checkout -b new_patch
  cat ~/patches/patchname.diff | git am

You can then check you are happy and when you are. You can merge back into master by committing the branch changes then switching back to the master branch and merging your

  git add .
  git commit -a -v 
  git branch master
  git merge new_patch

Please correct me on any glaring errors you see. Im pretty much making it up as I go along.

Add users to groups

June 24th, 2008 by pyrat

  groups deploy
  sudo usermod -a -G www-data deploy

Summer Skiing

June 7th, 2008 by pyrat

My mate Per Arne Troset attempts to ski across a lake.

Apologies for the swear at the end. I am not normally like that.

Web Designers should do their own CSS

June 6th, 2008 by pyrat

Something I have believed for some time has been put into words by DHH. Last three posts have all be 37Signals related. Makes me look like a bit of a fanboy. Dont care tho, its good stuff.

Web Designers should do their own CSS

Ryan talks some more

June 4th, 2008 by pyrat

Andy heres another interview for with Ryan Davis Singer for you. (Its audio)

Interview

Tips for Designers and Rails

June 3rd, 2008 by pyrat

Andy you might like this one; Ryan Davis Singer from 37 Signals on Design and Rails.

Multiple Submit Buttons on Rails Form

June 3rd, 2008 by pyrat

Pretty basic stuff but I often forget as I dont use this pattern much.
Multiple Submit Buttons