Skip to content

Instantly share code, notes, and snippets.

View michael-wolfenden's full-sized avatar

Michael Wolfenden michael-wolfenden

View GitHub Profile
@Marak
Marak / git-commit-prefixes
Created May 18, 2011 06:12 — forked from indexzero/git-commit-prefixes
Short list of Git commit prefixes used at Nodejitsu
[api]: New apis / changes to apis
[test]: Update test/* files
[dist]: Changes to submodules, version bumps, updates to package.json
[minor]: Small changes
[doc]: Updates to documentation
[ux]: Updates to UX
[fix]: Bug fixes
[bin]: Update binary scripts associated with the project
[merge]: Resolved git merge from upstream or otherwise
[refactor]: Refactor of existing code with no external API changes
@Lobstrosity
Lobstrosity / 1.Widget.cs
Created August 9, 2011 00:13
Mapping Parent-Child Relationships with Dapper
public class Widget
{
public int Id { get; set; }
public string Name { get; set; }
public string Description { get; set; }
}
@canton7
canton7 / 0main.md
Last active November 7, 2023 08:16
Local versions of tracked config files

How to have local versions of tracked config files in git

This is a fairly common question, and there isn't a One True Answer.

These are the most common techniques:

If you can modify your application

@sinairv
sinairv / TestHelper.cs
Created January 15, 2012 10:21 — forked from haacked/TestHelper.cs
String Comparison Unit Test Helper
public static class TestHelpers
{
public static void ShouldEqualWithDiff(this string actualValue, string expectedValue)
{
ShouldEqualWithDiff(actualValue, expectedValue, DiffStyle.Full, Console.Out);
}
public static void ShouldEqualWithDiff(this string actualValue, string expectedValue, DiffStyle diffStyle)
{
ShouldEqualWithDiff(actualValue, expectedValue, diffStyle, Console.Out);
@bradwilson
bradwilson / reset.ps1
Created June 7, 2012 17:51
reset.ps1
git reset --hard head
git clean -xdf -e *.suo -e packages/*
git checkout $args
public class PersistenceResult
{
readonly ModelStateDictionary modelState;
protected PersistenceResult(ModelStateDictionary modelState)
{
this.modelState = modelState;
}
public static PersistenceResult Success()
@domenic
domenic / promises.md
Last active March 31, 2024 14:07
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.
@bradwilson
bradwilson / gist:4215933
Last active August 17, 2020 16:46
.gitconfig
[user]
name = Brad Wilson
email = dotnetguy@gmail.com
[alias]
a = add -A
abort = rebase --abort
amend = commit --amend -C HEAD
bl = blame -w -M -C
br = branch
cat = cat-file -t
@tathamoddie
tathamoddie / ActionTests.cs
Created December 14, 2012 03:18
Some common unit tests that I like to apply to ASP.NET MVC projects
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Security.Permissions;
using System.Web.Mvc;
using Example.Web;
using NUnit.Framework;
namespace Example.UnitTests.Web
@droyad
droyad / gist:4711796
Created February 5, 2013 03:01
Testing Autofac registrations
var sb = new StringBuilder();
foreach (var src in container.ComponentRegistry.Sources.Select(s => s.ToString()).OrderBy(s => s))
sb.AppendLine(src);
sb.AppendLine();
foreach (var reg in container.ComponentRegistry.Registrations.OrderBy(r => r.Activator.LimitType.FullName))
{
sb.AppendLine(reg.Activator.LimitType.FullName);
sb.Append(" ").AppendLine(reg.Lifetime.GetType().Name);