Skip to content

Instantly share code, notes, and snippets.

View phatboyg's full-sized avatar

Chris Patterson phatboyg

View GitHub Profile
[alias]
## Compound command alias
# View all alias
alias = !"git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\t=> \\2/' | sort"
# Pull in remote changes for the current repository and all its submodules
p = !"git pull; git submodule foreach git pull origin master"
# Stage all missing files for delete
r = !"git ls-files -z --deleted | xargs -0 git rm"
# Show all files modified using `git assume` alias
assumed = !"git ls-files -v | grep ^h | cut -c 3-"

Hypermedia API design session

Proposed/ran by Andreas Schmidt, Nokia

Based off his design around the Nokia Places API

Notes

  • Picked JSON, no support for XML
  • Added ?accept=application/json to the URL in the browser for a raw response
@phatboyg
phatboyg / LeftJoinExtension.cs
Created September 20, 2012 14:37 — forked from bryanhunter/LeftJoinExtension.cs
Simplifies LINQ left joins
using System.Collections.Generic;
namespace System.Linq
{
public static class LeftJoinExtension
{
public static IEnumerable<TResult> LeftJoin<TLeft, TRight, TKey, TResult>(
this IEnumerable<TLeft> left,
IEnumerable<TRight> right,
Func<TLeft, TKey> leftKeySelector,
@phatboyg
phatboyg / MassTransitConsumer.cs
Created June 29, 2011 01:48 — forked from jrutley/Ping.cs
MassTransit 2.0 beta questions (updated to allow run from different machines)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MassTransit;
using MassTransitExperimentShared;
using System.Threading;
namespace MassTransitConsumer
{