Skip to content

Instantly share code, notes, and snippets.

View Boggin's full-sized avatar
💭
bleep bloop blorp

Richard Bogle Boggin

💭
bleep bloop blorp
View GitHub Profile
@Boggin
Boggin / CreateConfigurationCommand.cs
Created December 29, 2014 16:17
A workaround Sql Bulk Insert for Entity Framework 6.
namespace Data.Commands
{
using System;
using System.Data;
using System.Data.Entity;
using System.Data.SqlClient;
using System.Diagnostics;
public class CreateConfigurationCommand
{
@Boggin
Boggin / git-tfs.markdown
Last active October 14, 2020 08:22
Git Tfs : HowTo

Git Tfs

If you would like to use git locally against the TFS repositories you can use git-tfs.

You can install git from the Windows installer: http://git-scm.com/downloads.
I prefer to install the bash command line and all the Unix tools. You may still prefer to use the GUI which is installed at the same time.

Then you can install git-tfs via chocolatey.
Note: If you don't have chocolatey goodness yet then see the Chocolatey Install section below.

@Boggin
Boggin / ContainerConfig.cs
Created March 24, 2015 14:54
Register MEF for both ASP.NET MVC and Web API using conventions.
namespace Portal.Web
{
using System.Composition.Convention;
using System.Composition.Hosting;
using System.Reflection;
using System.Web.Http;
using System.Web.Http.Controllers;
public static class ContainerConfig
{
@Boggin
Boggin / spf13-vim-windows-install.cmd
Created September 22, 2015 11:30
Install spf13's Vim on Windows XP (after adding fsutil and junction.exe).
REM Copyright 2014 Steve Francia
REM
REM Licensed under the Apache License, Version 2.0 (the "License");
REM you may not use this file except in compliance with the License.
REM You may obtain a copy of the License at
REM
REM http://www.apache.org/licenses/LICENSE-2.0
REM
REM Unless required by applicable law or agreed to in writing, software
REM distributed under the License is distributed on an "AS IS" BASIS,

Git Workflow

Names for branches

  • feature
  • fix
  • hotfix
  • spike

Major branches

  • release (to staging)
@Boggin
Boggin / boxstarter.dev
Last active June 19, 2019 21:12
Boxstarter script
# START http://boxstarter.org/package/url?https://gist.github.com/Boggin/5bcaa3cf4712f6801d0010cab64ee8f3/boxstarter.dev
# Boxstarter options
$Boxstarter.RebootOk=$true # Allow reboots?
$Boxstarter.NoPassword=$false # Is this a machine with no login password?
$Boxstarter.AutoLogin=$true # Save my password securely and auto-login after a reboot
if (Test-PendingReboot) { Invoke-Reboot }
# Configure Windows
@Boggin
Boggin / .git-commit-template.txt
Last active June 28, 2024 10:16 — forked from adeekshith/.git-commit-template.txt
Enforce good commit message practices across teams.
# <type>[(optional scope)]: <subject>
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made.
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources,
# |<---- use git-interpret-trailers, for example ---->|
# Issue #23
Install-Module Pscx
Install-Module posh-git
Install-Module PSReadLine
Install-Module PSake
Install-Module Pester
public struct Option<T>
{
private readonly T _value;
public T Value
{
get
{
if (!HasValue)
throw new InvalidOperationException();
@Boggin
Boggin / SqlExceptionMocker.cs
Last active November 9, 2018 17:46 — forked from martinjw/SqlExceptionMocker.cs
Create a SqlException for testing
// .csproj
// <PackageReference Include="System.Data.SqlClient" Version="4.3.0" />
// <PackageReference Include="System.Reflection.TypeExtensions" Version="4.3.0" />
namespace HorribleThingsInHere
{
using System.Data.SqlClient;
using System.Linq;
using System.Reflection;