Skip to content

Instantly share code, notes, and snippets.

Avatar
🎖️
Protecting common sense

Alexey Zimarev alexeyzimarev

🎖️
Protecting common sense
View GitHub Profile
View ci-template.yaml
variables:
KUBERNETES_VERSION: 1.18.4
HELM_VERSION: 2.16.9
ROLLOUT_RESOURCE_TYPE: deployment
DOTNET_SDK_VERSION: 3.1.301-alpine3.12
DOTNET_RUNTIME_VERSION: 3.1.5-alpine3.12
.deployment:
image: registry.ubiquitous.no/gitlab/auto-deploy-image:latest
allow_failure: false
@alexeyzimarev
alexeyzimarev / VueDevelopmentServerMiddleware .cs
Created Jan 27, 2019
Perspective Vue CLI middleware that uses the generic npm middleware
View VueDevelopmentServerMiddleware .cs
using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.SpaServices;
using Microsoft.AspNetCore.SpaServices.Npm;
namespace ASP.NETCoreWebApplication
{
/// <summary>
View VueDevelopmentServerMiddleware.cs
// This file is based on the code from the ASP.NET Core repository
// https://github.com/aspnet/AspNetCore/tree/master/src/Middleware/SpaServices.Extensions/src
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Net;
@alexeyzimarev
alexeyzimarev / JsonNetRestSharp.cs
Created Dec 30, 2018
Using Newtonsoft.Json with RestSharp v106.6
View JsonNetRestSharp.cs
using Newtonsoft.Json;
using RestSharp;
using RestSharp.Serialization;
namespace JsonNetRestSharp
{
class Program
{
static void Main(string[] args)
{
View Marketplace.xml
<?xml version="1.0"?>
<doc>
<assembly>
<name>Marketplace</name>
</assembly>
<members>
<member name="M:Marketplace.Api.ClassifiedAdsCommandsApi.Post(Marketplace.Contracts.ClassifiedAds.V1.Create)">
<summary>
Create a new classified ad
</summary>
View swagger.json
{
"swagger": "2.0",
"info": {
"version": "v1",
"title": "ClassifiedAds"
},
"paths": {
"/ad": {
"post": {
"tags": [
@alexeyzimarev
alexeyzimarev / Program.cs
Created Jan 9, 2018
MassTransit v4 and .NET Core console app to run in a Docker container
View Program.cs
using System;
using System.IO;
using System.Runtime.Loader;
using System.Threading;
using System.Threading.Tasks;
using GreenPipes;
using MassTransit;
using Microsoft.Extensions.Configuration;
using Serilog;
@alexeyzimarev
alexeyzimarev / BaseHandler.cs
Last active Jul 12, 2017
Using this base class you can handle your messages without extracting them first from the context. Context is still available.
View BaseHandler.cs
using System.Threading.Tasks;
using MassTransit;
namespace Demo.MassTransit
{
public abstract class BaseHandler<T> : IConsumer<T> where T : class
{
protected ConsumeContext<T> Context { get; private set; }
public abstract Task Handle(T message);
View AssemblyScanningSagaDbContext.cs
namespace MassTransit.EntityFrameworkIntegration
{
using System.Data.Common;
using System.Data.Entity;
using System.Data.Entity.Core.Objects;
using System.Data.Entity.Infrastructure;
using System.Reflection;
public class AssemblyScanningSagaDbContext : DbContext
View Request_Specs.cs
// Copyright 2007-2015 Chris Patterson, Dru Sellers, Travis Smith, et. al.
//
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use
// this file except in compliance with the License. You may obtain a copy of the
// License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed
// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
You can’t perform that action at this time.