Skip to content

Instantly share code, notes, and snippets.

View nicolaiarocci's full-sized avatar

Nicola Iarocci nicolaiarocci

View GitHub Profile
@chrisjacob
chrisjacob / README.md
Created February 18, 2011 03:44
Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Intro

Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").

Author: Chris Jacob @_chrisjacob

Tutorial (Gist): https://gist.github.com/833223

The Result

@michaeljacobdavis
michaeljacobdavis / Helper.cs
Created July 27, 2012 15:55
Unit testing methods for nested Fluent Validation properties
// Adapted from http://devio.wordpress.com/2011/01/21/get-name-of-nested-property-as-string-value/
public static string GetPropertyName<T, TValue>(this T model, Expression<Func<T, TValue>> expression) where T : class
{
var memberExpression = (MemberExpression)expression.Body;
var memberExpressionOrg = memberExpression;
var Path = "";
while (memberExpression != null && memberExpression.Expression.NodeType == ExpressionType.MemberAccess)
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@jbenet
jbenet / simple-git-branching-model.md
Last active November 9, 2024 04:55
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@lrytz
lrytz / z-automator.png
Last active October 15, 2024 06:31
Shortcut for Syntax Highlighting in Keynote
@davidfowl
davidfowl / Example1.cs
Last active September 2, 2024 12:36
How .NET Standard relates to .NET Platforms
namespace Analogy
{
/// <summary>
/// This example shows that a library that needs access to target .NET Standard 1.3
/// can only access APIs available in that .NET Standard. Even though similar the APIs exist on .NET
/// Framework 4.5, it implements a version of .NET Standard that isn't compatible with the library.
/// </summary>INetCoreApp10
class Example1
{
public void Net45Application(INetFramework45 platform)