Monday, December 17, 2012

Custom Data Annotations in MVC

I don't want to lose this, because I will need it again. Data Annotations are cool, and MVC Foolproof is cool, but sometimes you still need a custom annotation that neither can provide. When that happens, you follow instructions here:

How to handle Booleans/CheckBoxes in ASP.NET MVC 2 with DataAnnotations?Creating Custom Data Annotations that emit Unobtrusive Validation Attributes

and here:

Creating Custom Data Annotations that emit Unobtrusive Validation Attributes

Thursday, December 13, 2012

Resolve git merge conflicts using --ours --theirs

One thing that I liked about subversion, when it came to merge conflicts, was the ability to easily say "I expected this conflict. Take all of the incoming remote changes, discard my changes, and mark this file as resolved." Or vice versa.

Apparently, it's easy to say the same thing in git:
keep either file in merge conflicts

Saturday, December 08, 2012

Git and Sublime Text 2

If you like Git for version control (or if you don't like Git but use it at work), and if you like Sublime Text 2 for code editing, then you'll love this article! It shows you how you can set ST2 as your text editor for Git operations such as committing resolved merge conflicts, rebasing, etc. VIM fans are gonna hate!

Sublime Text 2 OS X Command Line