Skip to content

Instantly share code, notes, and snippets.

View hoffstein's full-sized avatar

Benjamin Hoffstein hoffstein

View GitHub Profile
@hoffstein
hoffstein / gist:1089878
Created July 18, 2011 15:34
C# Get Enum Members
string[] names = Enum.GetNames(typeof(MyEnumName));
@hoffstein
hoffstein / gist:1089871
Created July 18, 2011 15:33
C# Extension Method To Add ForEach To Any IEnumerable
public static void ForEach<T>(this IEnumerable<T> source, Action<T> action)
{
foreach (T item in source)
action(item);
}
@hoffstein
hoffstein / Default (Windows).sublime-keymap
Created July 18, 2011 15:08
Sublime Text 2 script to open the current file's parent directory in Windows Explorer
[
{ "keys": ["ctrl+shift+e"], "command": "open_folder_in_explorer" }
]