Skip to content

Instantly share code, notes, and snippets.

View benbrandt22's full-sized avatar

Ben Brandt benbrandt22

View GitHub Profile
@benbrandt22
benbrandt22 / Objectify.ps1
Created July 18, 2014 17:06
Objectify - Converts tab-delimited table in the clipboard into a List of objects in C# code
# Objectify.ps1
# Ben Brandt - July 18, 2014
# Turns a tab-delimited table from the clipboard text, and converts it to a List of objects in C# code.
# Useful for taking data copied from SQL Management Studio (with Headers) and converting it to in-memory objects for use as test data.
function Get-ClipboardText()
{
Add-Type -AssemblyName System.Windows.Forms
$tb = New-Object System.Windows.Forms.TextBox
@benbrandt22
benbrandt22 / appconfig.xml
Last active August 29, 2015 14:04
Logging to MSTest Unit Test Output with Common.Logging
<configuration>
<configSections>
<sectionGroup name="common">
<section name="logging" type="Common.Logging.ConfigurationSectionHandler, Common.Logging" />
</sectionGroup>
</configSections>
<common>
<logging>
@benbrandt22
benbrandt22 / Bootstrap3Size.htm
Created July 11, 2014 14:52
Bootstrap 3 - Screen size display
<div class="row text-muted">
<strong>Bootstrap screen size:</strong>
<span class="visible-xs-inline">XS (Extra small)</span>
<span class="visible-sm-inline">SM (Small)</span>
<span class="visible-md-inline">MD (Medium)</span>
<span class="visible-lg-inline">LG (Large)</span>
</div>
@benbrandt22
benbrandt22 / ExceptionMessages.cs
Last active February 7, 2024 11:26
C# Extension method that generates a list of exception messages from the top level down through all inner exceptions
using System;
using System.Collections.Generic;
using System.Linq;
namespace System {
public static partial class ExceptionExtensions {
/// <summary>
/// Returns a list of all the exception messages from the top-level