Skip to content

Instantly share code, notes, and snippets.

View spetryjohnson's full-sized avatar

Seth Petry-Johnson spetryjohnson

View GitHub Profile
@spetryjohnson
spetryjohnson / gist:c15aace29de0a8a0c08e
Last active September 4, 2015 14:28
Great Moby Cities and War
My father’s family name being Pirrip, and my Christian name Philip,
my infant tongue could make of both names nothing longer or more explicit
than Pip. So, I called myself Pip, and came to be called Pip. But you can
call me Ishmael.
It was a dark and stormy night during the best of times and the worst of
times when I came to realize that all children, except one, grow up. The
other awakes from uneasy dreams to find himself transformed in his bed into
a monstrous vermin! Then the cold passed reluctantly from the earth, and the
retiring fogs revealed an army stretched out on the hills, resting. Clearly,
@spetryjohnson
spetryjohnson / gist:3c47723f65e16b6ae757
Last active August 29, 2015 14:05
CodeMash submission abstracts - comments welcome!
General bio
-------------------------------------
Seth has been programming for 25 years, 18 of them professionally. He is a full-stack
developer/architect and enjoys bouncing between the database, .NET and JavaScript with
the occasional foray into devops. He is passionate about bringing order to chaos through
clean architecture, simple designs and testable code. Seth lives in Columbus, OH and is
an active participant in the Midwest developer community.
---------------------------------------------------------------------------
public static class StringExtensions {
/// <summary>
/// Null safe value of .Trim(). If the value is null, returns an empty string.
/// </summary>
public static string TrimNullSafe(this string value) {
return (value != null)
? value.Trim()
: String.Empty;
}