This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat "$1" | base64 | perl -wp -e 's/(^.*$)/data:image\/jpeg;base64,$1/' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Jacob Certain | |
email = [email protected] | |
[alias] | |
changelog = log --format='* %s%n%w(,4,4)%+b' | |
pick = cherry-pick | |
logg = log-oneline-graph | |
s = status --short --branch --untracked-files=all | |
l = log --graph --pretty=format:'%C(auto)%h %ad %d %s %C(white)[%aN]' --date='format:%b %d' --use-mailmap origin/master~10..HEAD | |
; ll = log --graph --pretty=format:'%C(auto)%h %ad %d %s %C(white)[%aN]' --date='format:%b %d' --remotes '@{upstream}' origin/master~10..HEAD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Threading.Tasks; | |
using MassTransit; | |
using MassTransit.Mediator; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Hosting; | |
using Serilog; | |
using Serilog.Sinks.SystemConsole.Themes; | |
namespace Trolley | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SELF=${0##*/} | |
die() { | |
log "$@" | |
exit 1 | |
} | |
log() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
SELF=${0##*/} | |
die() { | |
log "$@" | |
exit 1 | |
} | |
log() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private async IAsyncEnumerable<MemoryStream> YieldStreams(params byte[][] bs) | |
{ | |
// The compiler turns async + yield return type T into the | |
// desired return type of IAsyncEnumerable<T>. But we don't | |
// actually have any async code, just need the type. Soooo | |
await Task.CompletedTask; // hack to evade compiler warning | |
foreach (var b in bs) yield return new MemoryStream(b); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Net.Http; | |
using System.Net.Http.Json; | |
using System.Reflection; | |
using System.Text.Json; | |
using System.Text.Json.Serialization; | |
using System.Threading.Tasks; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
using Serilog.Events; | |
using Serilog.Formatting; | |
namespace com.example | |
{ | |
public class EventCentricSerilogFormatter : ITextFormatter | |
{ | |
private const string FgBrightWhite = "\x001B[97m"; | |
private const string Reset = "\x001B[0m"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using MediatR; | |
using MediatR.Pipeline; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Hosting; | |
using Microsoft.Extensions.Logging; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using Microsoft.Extensions.Logging; | |
using Xunit.Abstractions; | |
public class XunitLogger<T> : ILogger<T> | |
{ | |
private readonly ITestOutputHelper _outputHelper; | |
public XunitLogger(ITestOutputHelper outputHelper) | |
{ |