Skip to content

Instantly share code, notes, and snippets.


Chris Blyth BlythMeister

View GitHub Profile
BlythMeister / MarkFilesAsViewed.linq
Last active Sep 28, 2021
GitHub Mark Files As Viewed
View MarkFilesAsViewed.linq
<Query Kind="Program">
<NuGetReference Prerelease="true">Octokit.GraphQL</NuGetReference>
async Task Main()
View Program.cs
void Main()
var teams = File.ReadAllLines(@"C:\users\chris.blyth\Desktop\Teams.txt").ToList();
var people = File.ReadAllLines(@"C:\users\chris.blyth\Desktop\People.txt").ToList();
if (teams.Count > people.Count)
var missingPeople = teams.Count - people.Count;
for (int i = 0; i < missingPeople; i++)
View ForkSync.linq
<Query Kind="Program">
GitHubClient githubClient;
string githubToken = "[TOKEN]";
BlythMeister / RepoMigrate.cs
Last active Apr 7, 2021
Repo Migrate Folder With History
View RepoMigrate.cs
void Main()
var originalRepo = "**_/_**_.git";
var originalRepoBranch = "master";
var newRepo = "**_/_**_.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">
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 / PaketSort
Created Mar 7, 2019
Will update, sort, simplify and install paket dependencies in a repo
View PaketSort
void Main()
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 ( 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;