Skip to content

Instantly share code, notes, and snippets.

View JayBazuzi's full-sized avatar

Jay Bazuzi JayBazuzi

View GitHub Profile
{
"imports": {
"std/": "https://deno.land/std@0.212.0/"
}
}
@JayBazuzi
JayBazuzi / _result.md
Last active April 5, 2023 19:21
This batch file produces different results depending on where I run it
D:\>one.cmd
success

D:\>cmd /c one.cmd
fail
using NUnit.Framework;
public class Hiker
{
[TestFixture]
public class Tests
{
[Test]
public void life_the_universe_and_everything()
{
@JayBazuzi
JayBazuzi / events.kt
Created July 4, 2022 00:10
Demonstration of asserting events in Kotlin
fun main() {
val foo = Foo()
val aClass = AClass()
aClass.OnBaz = foo::Bar
aClass.Do()
println(aClass.OnBaz == aClass.OnBaz)
println(aClass.OnBaz)
}
[TestClass]
public class Tests
{
[TestMethod]
public void TestProgram()
{
foreach (var main in new[] {
DirectCall.Program.Main1,
DependencyInjection.Program.Main2,
EventBased.Program.Main3,

Current:

r   extract method
R   extract method
R!! extract method
R** clean stuff up
B   oh no
B!! oh no
B** oh no
F   good stuff
@JayBazuzi
JayBazuzi / Port
Last active December 18, 2021 00:48
interface ITaxInfo {
async GetTaxInfo(sin: SIN) -> TaxInfo?
class Error {}
}
// requires https://www.nuget.org/packages/FluentAssertions/
using FluentAssertions;
using FluentAssertions.Primitives;
using Microsoft.VisualStudio.TestTools.UnitTesting;
[TestClass]
public class UnitTest1
{
[TestMethod]
public void TestMethod1()
@JayBazuzi
JayBazuzi / gist:978c5a2e3262e66f33ff158c7c26f73a
Created June 9, 2021 16:38
Arlo's Commit Notation push rule regex
# I'm experimenting with a GitLab Push Rule to force all commits to follow Arlo's Commit Notation. Here's my latest regex:
^([RFB]!!)|([RFBa-z] )|(\*\*\*)[- ].*
@JayBazuzi
JayBazuzi / Pipelines.py
Last active September 12, 2020 18:45
Pipelines in Python proof-of-concept
# /usr/bin/env python3
from typing import Callable
import unittest
import typing
import abc
import typing
class Tests(unittest.TestCase):