Skip to content

Instantly share code, notes, and snippets.

View irontoby's full-sized avatar

Tobias Johnson irontoby

  • Clarksville, IN, USA
View GitHub Profile
@irontoby
irontoby / IncludeTests.cs
Last active December 10, 2021 14:50
EF Core .Include() Tests
using System.ComponentModel.DataAnnotations;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
namespace EfCoreTests
{
public class IncludeTests
{
[Fact]
public async Task IncludeWorksAsync()
@irontoby
irontoby / git-better-clean.sh
Last active February 12, 2021 20:31
Git "Deep Clean"
#!/bin/bash
# does a better job of cleaning unreachable stuff
git reflog expire --expire-unreachable=2.weeks.ago
git gc --prune=now
@irontoby
irontoby / UrlCombineTests.cs
Created August 19, 2020 18:03
Test whether Flurl + Uri combine URLs as expected
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Flurl;
using Xunit;
namespace FlurlVsUri
{
@irontoby
irontoby / AddTgitButtonsToVs.md
Last active February 13, 2017 17:27
My Visual Studio settings/scripts for adding TortoiseGit Diff, Log, and Blame buttons.

Adding TortoiseGit Buttons to Visual Studio

Keybase proof

I hereby claim:

  • I am irontoby on github.
  • I am tobyj (https://keybase.io/tobyj) on keybase.
  • I have a public key whose fingerprint is 6827 9944 D151 D3F5 42F7 D419 6ED9 6EED 5DDF 60DF

To claim this, I am signing this object:

@irontoby
irontoby / UseBCompForTfsCompare.vssettings
Last active May 9, 2017 19:35
Visual Studio settings file to use Beyond Compare 4 as TFS diff/merge tools
<?xml version="1.0" encoding="utf-8"?>
<UserSettings>
<ApplicationIdentity version="12.0"/>
<Category name="Source Control_TeamFoundation" Category="{2A718788-A6D9-44C5-90EF-438BF5B06A74}" Package="{4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}" RegisteredName="Source Control_TeamFoundation" PackageName="Microsoft.VisualStudio.TeamFoundation.VersionControl.HatPackage, Microsoft.VisualStudio.TeamFoundation.VersionControl, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<PropertyValue name="UserTool1" extension=".*" operation="Compare" command="C:\Program Files\Beyond Compare 4\BComp.exe" arguments="%1 %2 /title1=%6 /title2=%7"/>
<PropertyValue name="UserTool2" extension=".*" operation="Merge" command="C:\Program Files\Beyond Compare 4\BComp.exe" arguments="%1 %2 %3 %4 /title1=%6 /title2=%7 /title3=%8 /title4=%9"/>
</Category>
</UserSettings>
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using AutoMapper;
using AutoMapper.Mappers;
namespace IronToby.Vandelay
@irontoby
irontoby / output.txt
Created June 5, 2014 16:48
git-tfs output trying to import Main branch
C:\devs\test>git tfs clone -d http://hpsjvltfs01:8080/tfs/DefaultCollection $/MyProject/Main --workspace="c:\w1"
Command run:git tfs clone -d http://hpsjvltfs01:8080/tfs/DefaultCollection $/MyProject/Main --workspace=c:\w1
No authors file used.
git-tfs version 0.19.2.0 (TFS client library 11.0.0.0 (MS)) (64-bit)
git command: Starting process: git init
Initialized empty Git repository in C:/devs/test/Main/.git/
git command time: [00:00:00.1920156] init
workspace path:c:\w1
Fetching from TFS remote 'default'...
info: refs/remotes/tfs/default: Getting changesets from 1 to current ...
@irontoby
irontoby / colors.sh
Created January 14, 2014 16:23
PS1 definition for showing current git branch, clean/dirty status
# Reset
Color_Off="\[\033[0m\]" # Text Reset
# Regular Colors
Black="\[\033[0;30m\]" # Black
Red="\[\033[0;31m\]" # Red
Green="\[\033[0;32m\]" # Green
Yellow="\[\033[0;33m\]" # Yellow
Blue="\[\033[0;34m\]" # Blue
Purple="\[\033[0;35m\]" # Purple
@irontoby
irontoby / gitconfig
Last active January 2, 2016 04:08
my gitconfig
[push]
default = upstream
[guitool "Rebase onto..."]
cmd = git rebase
revprompt = yes
[guitool "Rebase/Continue"]
cmd = git rebase --continue
[guitool "Rebase/Skip"]
cmd = git rebase --skip
[guitool "Rebase/Abort"]