Skip to content

Instantly share code, notes, and snippets.

Philippe Vlérick Pvlerick

View GitHub Profile
View DockerClientExtensions.cs
using System;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Docker.DotNet;
using Docker.DotNet.Models;
public static class DockerClientExtensions
public static async Task WaitForLogMessage(this DockerClient client, string containerId, string pattern, TimeSpan readDelay)
View Retour d'expérience sur une migration sauce


  1. Intro
  2. Techniques "DevOps"
  3. Histoire
  4. Conclusion (et suite)

Techniques (cfr DevOps Handbook)

  • Shadow deploy
  • Parallel execution
  • Automatisation maximum, minimum d'étapes manuelles
Pvlerick / Dockerfile
Last active Nov 23, 2017
Node App DevDay2017
View Dockerfile
FROM node:9.2.0-alpine
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
Pvlerick / MinMax.cs
Last active May 2, 2017
Elements names in tuples
View MinMax.cs
static (int min, int max) MinMax(IEnumerable<int> source)
using (var iterator = source.GetEnumerator())
if (!iterator.MoveNext())
throw new InvalidOperationException("Cannot find min/max of an empty sequence");
int min = iterator.Current;
int max = iterator.Current;
Pvlerick / Issue.cs
Created Feb 27, 2017
StructureMap Issue
View Issue.cs
public void ProfileAndChild_DifferentHandlingOfSingleton()
var container = new Container(c =>
c.Profile("a", p =>
Pvlerick / quotes.json
Created Feb 9, 2017
Duke Nukem 3D Quotes
View quotes.json
"quotes": [
"Yeah, piece of cake!",
"I should have known those alien maggots booby-trapped this sub.",
"It's time to abort your whole freaking species!",
"My name's Duke Nukem.",
"It's time to kick ass and chew bubble gum, and I'm all outta gum!",
"I'm Duke Nukem, and I'm coming to get the rest of you alien bastards!",
"Nobody steals our chicks... and lives!",
"We meet again, Doctor Jones.",
Pvlerick / Program01.cs
Last active Jan 21, 2017
C#7 Pattern Matching Weirdness
View Program01.cs
using System;
namespace ConsoleApp2
class Program
static void Main(string[] args)
Pvlerick / Program.cs
Created Jan 17, 2016
Serilog with interpolated strings
View Program.cs
using Serilog;
using System;
namespace ConsoleApplication10
class Program
static void Main(string[] args)
var log = new LoggerConfiguration()
Pvlerick / xUnit.snippet
Created Oct 14, 2015
Visual Studio Snippets
View xUnit.snippet
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="">
<CodeSnippet Format="1.0.0">
<Title>xUnit Fact</Title>
<Author>Philippe Vlérick</Author>
<Description>xUnit Unit Test - Fact.</Description>
View Nuget update.txt
C:\Users\Phil\Documents\GitHub\Roslyn [issue-5094]> .\nuget.exe restore .\Roslyn.sln
Restoring packages for C:\Users\Phil\Documents\GitHub\Roslyn\src\Compilers\Core\CodeAnalysisTest\CodeAnalysisTest.csproj...
Restoring packages for .NETFramework,Version=v4.5...
All packages are compatible with .NETFramework,Version=v4.5.
Restoring packages for C:\Users\Phil\Documents\GitHub\Roslyn\src\Compilers\Core\Portable\CodeAnalysis.csproj...
Restoring packages for .NETPortable,Version=v4.5,Profile=Profile7...
All packages are compatible with .NETPortable,Version=v4.5,Profile=Profile7.
Restoring packages for C:\Users\Phil\Documents\GitHub\Roslyn\src\Compilers\Core\VBCSCompiler\VBCSCompiler.csproj...
Restoring packages for .NETFramework,Version=v4.5...
Restoring packages for .NETFramework,Version=v4.5 (win-anycpu)...
You can’t perform that action at this time.