Skip to content

Instantly share code, notes, and snippets.

View jacobduijzer's full-sized avatar
👊
Hi

Jacob Duijzer jacobduijzer

👊
Hi
View GitHub Profile
@jacobduijzer
jacobduijzer / generate-pdf.sh
Created April 22, 2025 10:03
An example script for generating PDFs from an AsciiDoc file.
asciidoctor-pdf --out-file=assessment.pdf \
--backend=pdf \
assessment.adoc
@jacobduijzer
jacobduijzer / example.adoc
Created April 22, 2025 09:49
An AsciiDoc example

Jane Doe

Summary

Experienced software engineer with a focus on backend systems and distributed architectures.

Experience

public class ChaosProductServiceDecorator : IProductService
{
private readonly IProductService _inner;
private readonly AsyncInjectOutcomePolicy _asyncChaosPolicy;
public ChaosProductServiceDecorator(IProductService inner)
{
_inner = inner;
_asyncChaosPolicy = MonkeyPolicy
.InjectExceptionAsync((with) => with.Fault(new InvalidDataException("Chaos Monkey says Hi!"))
public class CanbusService
{
private readonly CanbusDataApi _canbusDataApi;
private readonly AsyncCircuitBreakerPolicy _circuitBreakerPolicy;
public CanbusService(CanbusDataApi canbusDataApi, ILogger<CanbusService> logger)
{
_canbusDataApi = canbusDataApi;
_circuitBreakerPolicy = Policy
.Handle<HttpRequestException>(with => with.StatusCode == HttpStatusCode.TooManyRequests)
public async Task<CanbusData> Get(User user, Car car)
{
var unauthorizedApiPolicy = Policy
.Handle<UnauthorizedAccessException>()
.RetryAsync(async (exception, i, context) => await _canbusApi.AuthorizeCall());
var tokenExpiredPolicy = Policy
.Handle<TokenExpiredException>()
.RetryAsync(async (exception, i, context) => await _canbusApi.AuthenticateUser(user));
public class AuthenticationService : IAuthenticationService
{
private static readonly int NUMBER_OF_RETRIES = 3;
private readonly IAuthenticationApi _authenticationApi;
private readonly string _clientId;
private readonly string _clientSecret;
public AuthenticationService(
IAuthenticationApi authenticationApi,
@jacobduijzer
jacobduijzer / SomeNewDataHandler.cs
Created April 4, 2019 19:23
Full example code for MockSequence
namespace Spielerei.App.SomeHandler
{
public class SomeNewDataHandler
{
private readonly ISomeService _someService;
public SomeNewDataHandler(ISomeService someService) =>
_someService = someService;
public void Handle()