Skip to content

Instantly share code, notes, and snippets.

View JayBazuzi's full-sized avatar

Jay Bazuzi JayBazuzi

View GitHub Profile
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 September 22, 2018 19:14
One way to factor a script for a multi-step process.
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 September 22, 2018 19:14
One way to factor a script for a multi-step process.
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 September 22, 2018 19:14
One way to factor a script for a multi-step process.
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()
using System;
using FluentAssertions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace UnitTestProject1
{
[TestClass]
public class UnitTest1
{
[TestMethod]
@JayBazuzi
JayBazuzi / cloudSettings
Last active August 28, 2020 19:24
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-08-28T19:24:37.953Z","extensionVersion":"v3.4.3"}
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;
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 August 12, 2017 21:11
C++ value type styles
class Size
{
int m_width;
int m_height;
public:
Size(int width, int height)
: m_width(width)
, m_height(height)
{}
factorial ratio
1
2 2x
3 1.5x
5 1.7x
8 1.6x
13 1.6x
20 1.5x
40 2x