Skip to content

Instantly share code, notes, and snippets.

@smartmeter
smartmeter / underscoreCase.cs
Created August 12, 2016 19:04 — forked from vkobel/underscoreCase.cs
Simple C# extension method to convert a camel case string to underscore notation without any regex
public static class ExtensionMethods {
public static string ToUnderscoreCase(this string str) {
return string.Concat(str.Select((x, i) => i > 0 && char.IsUpper(x) ? "_" + x.ToString() : x.ToString())).ToLower();
}
}
@smartmeter
smartmeter / sites.cleanup
Created November 18, 2015 21:09 — forked from yurifedoseev/sites.cleanup
Delete all sites from IIS express configuration
appcmd.exe list site /xml | appcmd delete site /in