Skip to content

Instantly share code, notes, and snippets.

Avatar

Jay Bazuzi JayBazuzi

View GitHub Profile
View IniitalizePipeline.cs
var pipeline = new Pipeline(CharacterFile.From)
{
new ResultCollector<CharacterFile>(),
new Pipeline(ConfigFile.Matching)
{
new ResultCollector<ConfigFile>(),
},
new Pipeline(_ => _.ParseCards())
{
new ResultCollector<List<CardData>>(),
@JayBazuzi
JayBazuzi / MergeDownProcess.py
Created Sep 22, 2018
One way to factor a script for a multi-step process.
View MergeDownProcess.py
def main():
return (MergeDownProcess(_WORKSPACE_DIR)
.get_user_intent()
.ensure_on_sparse_branch()
.ensure_no_files_opened()
.ensure_something_to_integrate()
.merge()
.create_changelist_for_any_changes()
.ensure_resolved()
.submit_any_changes()
@JayBazuzi
JayBazuzi / MergeDownProcess.py
Created Sep 22, 2018
One way to factor a script for a multi-step process.
View MergeDownProcess.py
def main():
return (MergeDownProcess(_WORKSPACE_DIR)
.get_user_intent()
.ensure_on_sparse_branch()
.ensure_no_files_opened()
.ensure_something_to_integrate()
.merge()
.create_changelist_for_any_changes()
.ensure_resolved()
.submit_any_changes()
@JayBazuzi
JayBazuzi / MergeDownProcess.py
Created Sep 22, 2018
One way to factor a script for a multi-step process.
View MergeDownProcess.py
def main():
return (MergeDownProcess(_WORKSPACE_DIR)
.get_user_intent()
.ensure_on_sparse_branch()
.ensure_no_files_opened()
.ensure_something_to_integrate()
.merge()
.create_changelist_for_any_changes()
.ensure_resolved()
.submit_any_changes()
View FizzBuzz-Kata-2018-07-11.cs
using System;
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace UnitTestProject1
{
[TestClass]
public class UnitTest1
{
[TestMethod]
@JayBazuzi
JayBazuzi / cloudSettings
Last active Aug 28, 2020
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2020-08-28T19:24:37.953Z","extensionVersion":"v3.4.3"}
View HtmlRequestMessageData.cs
class HtmlRequestMessageData
{
public readonly string Content;
public readonly HttpMethod Method;
public readonly Uri RequestUri;
[JsonConstructor]
HtmlRequestMessageData(HttpMethod method, Uri requestUri, string content)
{
this.Method = method;
View http-record-and-playback.cs
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
class PlaybackHtmlMessageHandler : HttpClientHandler
@JayBazuzi
JayBazuzi / Get, Set, m_.cpp
Last active Aug 12, 2017
C++ value type styles
View Get, Set, m_.cpp
class Size
{
int m_width;
int m_height;
public:
Size(int width, int height)
: m_width(width)
, m_height(height)
{}
View factorial steps.md
factorial ratio
1
2 2x
3 1.5x
5 1.7x
8 1.6x
13 1.6x
20 1.5x
40 2x