Skip to content

Instantly share code, notes, and snippets.

Bill Barry bbarry

  • Pennsylvania
Block or report user

Report or block bbarry

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View IServiceFactory.cs
using System;
using Microsoft.Extensions.DependencyInjection;
namespace ServiceFactory
{
public interface IServiceFactory<T>
{
T GetService();
}
View example 2
0eNrtvVtuXUmWJDoXfus0/P2Ij/7rGdRfISFQEiOCKAUlUFTgBgoxgB5IT6xHcg+pEM8RtW27mR027m2gfjJTSdL28uVvX7Zs/efVu49fbz7f3949XP3yn1e37z/dfbn65d//8+rL7W931x8f/7+Hvz7fXP1y9evHr7cfrt5c3V3/8fjP9/dfP9wcPt1+vPr7zdXt3Yeb/+fql/j3v95c3dw93D7c3nxDefrHX2/vvv7x7ub++AvPf/7l4f769rffHw7H//p4RP386cvxrz7dPX7wiHQY4c3VX8f/7u3vv9/8hJOecR7//PCPrT+hjP9Wv6P8t7qFk1l74q45hYUpaQ+msjC97ME0vlFtD6fTOHEXZ9A4ebddk8bpu7312JfqKCybQFEePts4SR4/2zhZHkDbOIWbXr0+z698nF9vrj7c3t+8//YLZQu36iNz28CmD81toK6PzW2goQ/ObaDJ+T72qDk/nUb9r9dfHg5HK+++fP50/3B4d/PxYWPsx3b6Qnr5hbb1BWN1T5ure5Ln1TZOlufVNk6R59U2zmn8P8LcHb48fPq8AdKeQd5cHffjh/tPH9++u/n9+s/bT/ePv3N/c/3h7a/3n/54+wRz9cvD/debN98w3z5ifr758Pan/fvP2/uHr09D6Xtbnn7j8G9XR1uPDbv+ZsLV1Zblxp6y7QJjU9kGMnaVbSBjW9kEyoHq3djT/++6N0d5bSjPa0MAR6ukrwZhE0g/pG3j6Ke0bRz9mLaNY8ypbSBjTm0DGXNqG8iYU5tART+qtbEJJB/VAI58VAM48lEN4JwP6pubj4f3v998edjaU77P19af9vJ314/9tIVYf1wLbu++3Nw/HH+yc/z7B/PsfJC2kJu2yvSB8bfOH6XTlnfR8qFZPoJo+RQ9MzX8GuSlZnu41SgvNQAoyUsNAMqa62IW+74W9QND/EBVPzDFD4jzLpYgfqCrH4jiB4b6gSR+YKofyNoHWlA/UMQPRPUD4urdkvqBJn5AnclFnMlNnclFnMl
@bbarry
bbarry / hg.ArgumentCompleters.ps1
Created Aug 16, 2018
mercurial argument completion, works in powershell 5.1, should work with TabExpansionPlusPlus; faster (and more limited) than https://github.com/JeremySkinner/posh-hg
View hg.ArgumentCompleters.ps1
# http://www.wtfpl.net/txt/copying/
function isHgDirectory() {
if(test-path ".hg") {
return (Get-Item .).fullname
}
$d = (Get-Item .).parent
while ($d -ne $NULL) {
$p = $d.fullname + "\.hg"
View Builder.cs
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)
View 1kspm refinery
0eNrFvduOXDmSLPoveu4oLN7JxsH5iP06aDRSqZAq0KnM3HkpTGOgf98hKSNilWqRbmacjH7p6iopjKST5rwsc/f/+fDx7nX/+HS4f/nw9//5cLh9uH/+8Pf/+p8Pz4cv9zd33//by78f9x/+/uHwsv/64W8f7m++fv+3h8Pd7mn/+XC/f/r3h29/+3C4/7T/7w9/d9/+8bcP+/uXw8th/xPnx7/8+5/3r18/7p+Of+GM8HF/c2zsiPj48Hz868f/e2zrCLFz7W8f/n38Z3TfcY+tPn//k+fH/f7T7uvDp9e7/S58+Lv/9u1vf0H3NroOHkxwJ2PHM/bj4XG/e3nYfXl6eL3/tGWepZyb2UBKZ6T9fz8+7Z+fdy9PN/fPjw9PL7uP+7uXLZPUN8Dl2O9Ph6f97c8/jRvwWYAv2/B5A74I8BmHrwJ8wuHbX+CfH+8OLy/HP9sAjj+BQ/st2dBuEboe8K47J+B7At8L+I7ADwL+QuBHHr82Av/C26eHjw/fYbcQ/W9vyzHU46rZwskITqkmTrFdaTmvYNrfuQrAOx2+2fC5yvB+AeCTDg9sktnr8MAumZoOHwD4rMNHAD7o8Ak4oOjr3mcbfgLdJu16NyPBbcpWHdwmrHMyerD5eppTBd2mqys6us1Wv+joNll90NFtrvqso9tU9U1Ht5kavI5uMzXoVA02VYPO1WBzNetsijZXs86maHO16GyKNleLzqZoc7XobIo2V4vOpmhztepsijZXq86maHO16myKNlebvvNFm6tN52qyudp0riZgX110siYPwOtsTcBz0aLTNUUAXudr+usz0uv9p/3Tz1cp6yHpx9F1/ZD0t/Mj4v3j68uHrQaVh6XTSbn+uTm/hV/095Nfh7N1f091Ar9uTkGTpsBv2ySfp+Dh9aUzB3mRWlxWVrLbcPo70K9j2nyfvLD6+eXm9l+7w/3z/qnzArfg6ycHHLe2Dg22cC88vnv4cnh+Odzubn/fP7/snvb/9/X4z3EL33v+9hf/+flwd/z
View 8 belt burner inserter train loader.txt
0eNqlnduuHjeSpV+loevSIHkm61UGg0FVt9BjoMo2bFdjGo1699luj61f2hmpFd+60nHHYZHMCMaJ//Xhr3/7x6cff/ru+18+/Pm/Pnz3rz98//OHP//P//rw83f//v1f/vbr3/3ynz9++vDnD9/98unvH/704fu//P3XP/3th3/94e8//PLdf3z68M8/ffju+3/79H8//Ln883/96cOn73/57pfvPv1G5b//8J//+/t//P2vn356+w9//PzPv/z0l+/+/f/88vHtl7+9kf3xh5/ffuqH739l+Cul/acP//nhzx/rrP/855/e0al5OtcdnZamM/YdnZ6nM+/ojDydfkdn5unc4rzydG5x3mk6/Rbnk6dzi3O58oRugS75Hd1vkS75Ld1voS75Pd1usS75Td3uwc7v6nYP9udt/en//vjTp59//vhG7/uff/zhp18+/vXT3355T/FtQ/6P8TvR+j/G27fq37776dO//vZf6h2TBZj0LJMNmLQskwOY1CSTegEmJcukACZXlknNMykny6QBJjvLpAMmK8tkACYzywSc+JI98RWc+JI98RWc+JI98RWc+JI98Q2c+JI98Q2c+JI98Q2c+OyBb+DAZ897A+c9e9wbOO7Z097Aac8e9gYOe/asN3DWs0e9kaOe5NGJbc/yAAc9e857/pynWeSPeXo18qc8vRj5Q57dtz1/xrPHr+ePePYr0vMnPPsx7PkDnv2mj/z5zpqmkT/eWQs78qc77SkMcLyz53vkz3fadxvvD/jPP/7tu19+efvH99RfD55AO3+y0w7uyB/t1+tA+ZpHv+Px/mz/4/t/+/TTv//0w9uvApf3mvzpjxjq9z/+45cPd0zzka12G0eaF5D++a78h/Q//OOXQPyZP+avQQBpXWa1eFSJR3P2Vz0Sj27t4UviAUJut9HEOR3QRUCWtbAaINta2CXxOBaPrfBY+cB1vY3uLuvEaoAs68SKgHgndkg8rBNbp8Qjf2LrbbR9eSdWA8Q6sSIg3oltEg/vxHa
@bbarry
bbarry / day1.pl6
Last active Dec 7, 2017
advent of code 2017 Perl6
View day1.pl6
my @seq = '112212'.univals.List;
(@seq Z @seq.rotate(1)).grep({[==] $_})».first.sum.say;
(@seq Z @seq.rotate(+@seq div 2)).grep({[==] $_})».first.sum.say;
@bbarry
bbarry / Van_der_Waerden_2_6.cs
Created Nov 17, 2017
WIP of a program that proves W(2,6) = 1132; currently capable (in a few thousands of years I think) of finding all sequences of 1120 length.
View Van_der_Waerden_2_6.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApplication8 {
class Program {
static uint[][] _lchecks; // bitmasks for sets of 6 progressive checks involving more than one u32 segment
View Van_der_Waerden.cs
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
namespace ConsoleApplication6 {
View blueprint-bus.txt
0eNrtfctuZEmO5a8UtJ30gr0ftezNzGIaaPT0blAoKBReEUIpJI2kyO7sRvz7uEJy9yuJZjyH9wYwi6lNojLlvLQXSaOR5/zXxaeb7/v7h+vbp799urv7x8Vf/uv8bx4v/vK/F//3+b9dX93dvvzrx+svt5c3z//u6Y/7/cVfLq6f9t8ufru4vfz2/P8er673t1f73f3l1T92/uLHbxfXt5/3/3HxF//jr79d7G+frp+u9y+Sfv6fP/52+/3bp/3D4Q9OMi4fH/ffPt1c337Zfbu8+np9u9/Fwxfu7x4PP767ff72QaD77eKPi7/sfDh842F/dX3/4fPh8PkPnwmnzzw9XN4+3t89PO0+7W+ePn4gvn4g/RDERFpMlMQkWMzuKMdLcvJJzt8vH59217eP+4enw3/4KCacxPx28fn6MHEv/7EIQgs9xiDpVlHdCNUarZo4bZ2ffifJ8Y4W1EU5xkPQuTPg+UMgDzuSS9v1lfWJ1U2eyUzOZNFm0oszWdAZSOIMBEkmfGAaLhM/MH02q+cD823/+fr7t93+5vDZh+ur3f3dzV7Y7a/DbpK0wJ8aWY6n5VRRTmCtaNP3c4i2I11It5bIlQmzCc3sGZTF0A5EXpZqO8qFO8qBPiLyoNkj0ibComN1Emcw8gekiHICLSeLciJ70LJ+0CLtOOQxZtKnIarRB0Getko6m6w7hthIZ1MAmZ3dteJKJHrzi7OW+M0vRvyJ3/xyyG90CJFzCIk+DvKoaVcgD7rYbHjkbHiq7JaRB027AnnQ/PVCvEBlPk6SL4meNbtBt205mLaz43ZzZm8aiOb0CZFXhz4h8uKwN4mgG+Jsi5wcd+gy60IQzWkXIq5NoV2IuDaFdiHidbkE2+1J1imyOsliEmkTkLwRGUI5QCQbQckLUE2XJHni2BSULKVzp97pR6c67jgiIj15jMTZr4GUIs5Yjab7lSyLTr/KCc7MihHDhVpMnpSMCyuZjgUcaWWPgjyL3eSsyAixOe7AAb6qee7AISLZoyL
You can’t perform that action at this time.