Skip to content

Instantly share code, notes, and snippets.

Manuel Riezebosch riezebosch

Block or report user

Report or block riezebosch

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@riezebosch
riezebosch / Update-AUPackages.md
Last active Jan 24, 2020
Update-AUPackages Report #powershell #chocolatey
View Update-AUPackages.md
@riezebosch
riezebosch / Update-AUPackages.md
Last active Jan 24, 2020
Update-AUPackages Report #powershell #chocolatey
View Update-AUPackages.md
View Copy-BackupFiles.ps1
robocopy "\\some\share\containing\backup" "C:\some\local\drive" database-backup*.sqb /Z /ETA /TEE /W:2 /xo
View test.md

asdf


using (var host = new HostBuilder()
        .ConfigureWebJobs(builder => builder
            .AddTimers()
            .AddDurableTaskInTestHub()
            .AddAzureStorageCoreServices()
            .ConfigureServices(services => services.AddSingleton(mock)))
        .Build())
@riezebosch
riezebosch / switch.cs
Last active Oct 4, 2019
exploring C# 8
View switch.cs
public static IArgumentMatcher? Create(Expression arg) => arg switch
{
MethodCallExpression call when call.Method.DeclaringType == typeof(Arg) => call.Method.Name switch
{
nameof(Arg.Ignore) => (IArgumentMatcher)new IgnoreArgument(),
nameof(Arg.Where) => new LambdaArgument(call.Arguments.Single()),
_ => throw new InvalidOperationException()
},
_ => null
};
@riezebosch
riezebosch / Dockerfile
Last active Jun 24, 2019
containerization
View Dockerfile
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env
WORKDIR /app
RUN dotnet new webapi
RUN dotnet publish -c Release -o out
FROM mcr.microsoft.com/dotnet/core/aspnet
ENV ASPNETCORE_URLS http://+:80
EXPOSE 80
WORKDIR /app
COPY --from=build-env /app/out ./
View test.cs
using System;
using System.Diagnostics;
using System.Threading;
using Microsoft.Extensions.Configuration;
using Polly;
using Polly.Bulkhead;
using Xunit;
namespace test
{
@riezebosch
riezebosch / _install.ps1
Last active Jan 19, 2019
BoxStarter VS2015
View _install.ps1
$myfeed = "https://myget.org/F/riezebosch"
$wu = Get-Service -Name wuauserv
$wu | Set-Service -StartupType Manual | Stop-Service
choco install DotNet4.5.1 -y
choco install KB2919442 -y
choco install KB2919355 -y
$env:visualStudio:setupFolder = "K:\VS2015"
View install-docker.ps1
$ErrorActionPreference = "Stop"
if ((Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V -Online).State -ne 'Enabled') {
Enable-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V -Online -All -NoRestart
}
if ((Get-WindowsOptionalFeature -FeatureName Containers -Online).State -ne 'Enabled') {
Enable-WindowsOptionalFeature -FeatureName Containers -Online -All -NoRestart
}
@riezebosch
riezebosch / rabbitmq.cs
Created Jan 25, 2018
Send drops message if no queue
View rabbitmq.cs
public class RabbitMqSpecificTests : IClassFixture<RabbitMqOptions>
{
readonly RabbitMqOptions options;
string queue = $"{nameof(RabbitMqSpecificTests)}{nameof(CommandDissapearsIfNoQueue)}";
public RabbitMqSpecificTests(RabbitMqOptions options)
{
this.options = options;
EnsureQueueDeleted();
}
You can’t perform that action at this time.