Skip to content

Instantly share code, notes, and snippets.

View pavel-agarkov's full-sized avatar

Paweł Agarków pavel-agarkov

  • Sopot
View GitHub Profile
@pavel-agarkov
pavel-agarkov / tech.yml
Last active June 12, 2022 05:17
The list of all technologies I use
Methodologies:
DDD: Domain-Driven Design
EDA: Event-Driven Architecture
TDD: Test-Driven Development
CQRS: Command Query Responsibility Segregation
ES: Event Sourcing
CI: Continuous Integration
CD: Continuous Deployment and Delivery
MS: Microservices
LS: Lambda Architecture
@pavel-agarkov
pavel-agarkov / kube-debug.sh
Last active February 11, 2021 15:29
Script for starting remote debugging of dotnet app in kubernetes from Visual Studio 2019
#!/bin/bash
set -e
while [ "$1" != "" ]; do
case $1 in
-n | --namespace)
NAMESPACE=$2
shift 2
;;
-s | --selector)
SELECTOR=$2
@pavel-agarkov
pavel-agarkov / launch.json
Last active February 7, 2021 12:16
launch.json for remote debugging dotnet running in Kubernetes from Visual Studio 2019
{
"version": "0.2.0",
"adapter": "C:\\Program Files\\Git\\bin\\bash.exe",
"adapterArgs": "-c \"%SolutionRootForBash%/kube-debug.sh --selector app.kubernetes.io/name=my-app-name --namespace my-app-namespace\"",
"configurations": [
{
"name": "dotnet k8s attach",
"type": "coreclr",
"request": "attach",
"processName": "dotnet"
@pavel-agarkov
pavel-agarkov / midnight-lizard-technologies.yaml
Last active March 24, 2019 16:56
all technologies used in Midnight Lizard system
Methodologies:
DDD: Domain-Driven Design
EDA: Event-Driven Architecture
TDD: Test-Driven Development
CQRS: Command Query Responsibility Segregation
ES: Event Sourcing
CI: Continuous Integration
CD: Continuous Deployment
MS: Microservices
@pavel-agarkov
pavel-agarkov / launch.json
Last active September 29, 2018 21:10
VS code launch.json with configuration to attach to dotnet process running in Kubernetes
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Kubernetes",
"type": "coreclr",
"request": "attach", // we are going to attach to the existing pod
"processName": "dotnet",
"sourceFileMap": {
// mapping of source code inside a container to the source code on a host machine
@pavel-agarkov
pavel-agarkov / kube-debug.sh
Last active February 7, 2021 12:15
Shell script to attach vsdbg to container running in kubernetes
#!/bin/bash
set -e
# echo "processing params"
while [ "$1" != "" ]; do
case $1 in
-n | --namespace)
NAMESPACE=$2
shift 2
;;
-s | --selector)
@pavel-agarkov
pavel-agarkov / command-actions-generator.ts
Last active July 4, 2018 17:28
Example of ngrx actions generation
export interface CommandErrorPayload {
readonly errorMessage: string;
readonly originalError?: any;
}
export class StandardAction<TActionType extends string, TActionPayload> {
type: TActionType;
constructor(readonly payload: TActionPayload) { }
}
@pavel-agarkov
pavel-agarkov / Pipe.cs
Last active February 3, 2018 18:24
Naive C# Pipe implementation
using System;
using System.Collections.Generic;
using System.Linq;
public static class Test
{
static Test()
{
1d.Pipe(TimeSpan.FromDays, AddHours(3), ToString, ToLower);
@pavel-agarkov
pavel-agarkov / ValuesController.Spec.cs
Created February 1, 2018 16:37
Example controller and its tests
using System.Collections.Generic;
using Xunit;
namespace WebApp.Controllers
{
public class ValuesControllerSpec : IClassFixture<ValuesController>
{
private readonly ValuesController controller;
public ValuesControllerSpec(ValuesController controller)
@pavel-agarkov
pavel-agarkov / WebApp.csproj
Created February 1, 2018 16:20
Conditional test files exclusion
...
<Choose>
<When Condition=" '$(Configuration)'!='Test' ">
<ItemGroup>
<Compile Remove="**/*.Spec.cs" />
<Compile Remove="**/*.Stub.cs" />
<Compile Remove="**/*.Stubs.cs" />
<Compile Remove="**/*.Test.cs" />
<Compile Remove="**/*.Tests.cs" />
</ItemGroup>