Skip to content

Instantly share code, notes, and snippets.

View ErikSchierboom's full-sized avatar
💭
I only respond on Tuesdays & Fridays

Erik Schierboom ErikSchierboom

💭
I only respond on Tuesdays & Fridays
View GitHub Profile
@ErikSchierboom
ErikSchierboom / Program.cs
Created June 10, 2019 10:47
SimpleInjector + ASP.NET Core
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
namespace WebApplication1
{
public class Program
{
public static void Main(string[] args) =>
CreateWebHostBuilder(args).Build().Run();
@ErikSchierboom
ErikSchierboom / Discoverer.cs
Created December 4, 2019 15:31
Force execution in order
public class TestCaseInDiscoveryOrderOrderer : ITestCaseOrderer
{
public IEnumerable<TTestCase> OrderTestCases<TTestCase>(IEnumerable<TTestCase> testCases) where TTestCase : ITestCase =>
testCases.ToList();
}
@ErikSchierboom
ErikSchierboom / Compile-in-memory.cs
Last active December 11, 2019 06:47
Compile C# in-memory
// analyzer Git SHA: d236535d1656e5e11c84b25bce8374d40b9d65e0
<Project>
<PropertyGroup>
<OutDir>/Users/erikschierboom/Downloads/temp/bin</OutDir>
<BaseIntermediateOutputPath>/Users/erikschierboom/Downloads/temp/obj</BaseIntermediateOutputPath>
</PropertyGroup>
</Project>
// var xElements = xDocument.XPathSelectElements("//TestRun/Results/UnitTestResult").ToList();
@ErikSchierboom
ErikSchierboom / .gitconfig
Last active February 12, 2020 09:12
.gitconfig alias to remove gone branches
[alias]
co = checkout
ap = !git commit --amend -a --no-edit && git push --force
gone = ! "git fetch -p && for branch in `git for-each-ref --format '%(refname) %(upstream:track)' refs/heads | awk '$2 == \"[gone]\" {sub(\"refs/heads/\", \"\", $1); print $1}'`; do git branch -D $branch; done"
@ErikSchierboom
ErikSchierboom / results.json
Created May 8, 2020 13:53
Generated results.json
{
"status": "fail",
"tests": [
{
"name": "Test Using Assert Equal In Expression Body With Expected Int",
"test": "FakeExpressionBodies.Test_Using_Assert_Equal_In_Expression_Body_With_Expected_Int",
"expected": "-5",
"command": "Fake.Invert(5)",
"status": "pass"
},
@ErikSchierboom
ErikSchierboom / docker-compose.yml
Created July 24, 2020 17:22
Exercism v3 website
version: "3.2"
services:
mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: password
volumes:
- ./v3-website/docker/init.sql:/docker-entrypoint-initdb.d/v3-website.sql
redis:
@ErikSchierboom
ErikSchierboom / Program.cs
Last active September 11, 2020 03:50
Inject dependencies into hosted service
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
using WebApiPlayground.Services;
namespace WebApiPlayground
@ErikSchierboom
ErikSchierboom / tags.md
Last active January 19, 2021 13:25
Exercism v3 tags

Paradigm

  • Declarative
  • Functional
  • Imperative
  • Logic
  • Object-oriented
  • Procedural

Typing

@ErikSchierboom
ErikSchierboom / practice-exercise-migration.md
Created February 5, 2021 13:58
Practice Exercise migration

We've made some changes to the v3 spec this week, most notably we've defined what the file structure looks like for Practice Exercises. See the spec for more information.

This PR applies changes to the track to conform to the latest spec. Each change is made as a separate commit, to help with reviewing. When merging this PR, I would suggest to not squash this to preserve the individual commits.

As having this PR merged is essential to prepare this track for Exercism v3, we'll automatically merge this PR one week after it was opened (if it hasn't been merged already).

Here are the changes made:

Add practices field to Practice Exercises

@ErikSchierboom
ErikSchierboom / open-issues.md
Last active May 21, 2021 18:07
Open issues on Exercism per 2021-05-21
track status # issues
exercism/05ab1e OPEN 18
exercism/05ab1e CLOSED 1
exercism/ada OPEN 19
exercism/ada CLOSED 1
exercism/analyzer-builder OPEN 1
exercism/analyzer-orchestrator OPEN 1
exercism/analyzer-pipeline OPEN 1
exercism/arkov CLOSED 2