Skip to content

Instantly share code, notes, and snippets.

Avatar

Chris Blyth BlythMeister

View GitHub Profile
View ForkSync.linq
<Query Kind="Program">
<NuGetReference>Octokit</NuGetReference>
<Namespace>Octokit</Namespace>
<Namespace>System.Threading.Tasks</Namespace>
</Query>
GitHubClient githubClient;
/* START SETTINGS */
string githubToken = "[TOKEN]";
@BlythMeister
BlythMeister / RepoMigrate.cs
Last active Apr 7, 2021
Repo Migrate Folder With History
View RepoMigrate.cs
void Main()
{
var originalRepo = "git@github.com:_**_/_**_.git";
var originalRepoBranch = "master";
var newRepo = "git@github.com:_**_/_**_.git";
var newRepoBranch = "master";
var workInProgressDir = @"C:\Temp\RepoCopy";
var relativeFolderToMigrate = "src/path";
MigrateRepo(originalRepo, originalRepoBranch, newRepo, newRepoBranch, workInProgressDir, relativeFolderToMigrate);
}
View BankHolidaysToOutlook.linq
<Query Kind="Program">
<NuGetReference>NetOfficeFw.Outlook</NuGetReference>
<NuGetReference>Newtonsoft.Json</NuGetReference>
<Namespace>NetOffice</Namespace>
<Namespace>NetOffice.OutlookApi</Namespace>
<Namespace>Newtonsoft.Json</Namespace>
<Namespace>System.Net</Namespace>
<Namespace>NetOffice.OutlookApi.Enums</Namespace>
</Query>
@BlythMeister
BlythMeister / RebootMachine.json
Last active Nov 20, 2020
Octopus Tentacle Reboot Step Templates
View RebootMachine.json
{
"Id": "dfbf8776-b178-46f4-9bd2-f242c74d2551",
"Name": "Reboot Machine",
"Description": "Will reboot a tentacle without it noticing in a deploy",
"ActionType": "Octopus.Script",
"Version": 1,
"CommunityActionTemplateId": null,
"Packages": [],
"Properties": {
"Octopus.Action.Script.ScriptSource": "Inline",
@BlythMeister
BlythMeister / PaketSort
Created Mar 7, 2019
Will update, sort, simplify and install paket dependencies in a repo
View PaketSort
void Main()
{
Run(@"C:\My\Repo\Root");
}
void Run(string rootDir)
{
Console.WriteLine($"Starting at {DateTime.UtcNow.ToString("u")}");
Console.WriteLine($"Running against: {rootDir}");
RunPaketCommand(rootDir, "update");
View gist:1374115d02f44ff390e4ffc6cd693e25
### Keybase proof
I hereby claim:
* I am blythmeister on github.
* I am blythmeister (https://keybase.io/blythmeister) on keybase.
* I have a public key ASBwvtTm8cs1SATrLmvuqsQcKo9NKAUSTG8veaNmHfwdswo
To claim this, I am signing this object:
View ExpectantStrictMock.cs
using Moq;
using Moq.Language;
using Moq.Language.Flow;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
namespace MoqHelper
{
public class ExpectantStrictMock<T> : Mock<T> where T : class
View Option.cs
using System;
namespace OptionTypes
{
public abstract class Option<T>
{
public abstract T GetSome { get; }
public abstract override string ToString();
protected T Value;