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 / 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 / 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 / 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 / kubedbg.ps1
Last active March 11, 2018 11:56
Debugging ASP.NET Core app running in Kubernetes Minikube from Visual Studio 2017 on Windows
param(
# the selector from your yml file
# selector:
# matchLabels:
# app: myweb
# -Selector app=myweb
[Parameter(Mandatory=$true)][string]$Selector
)
Write-Host '1. searching pod by selector:' $Selector '...';
@pavel-agarkov
pavel-agarkov / marble-scheduler-injector.ts
Last active March 9, 2018 20:41
Injects TestScheduler from jasmine-marbles into time-dependent Observable operations
import "rxjs/add/operator/debounceTime";
import "rxjs/add/operator/throttleTime";
import { TestScheduler } from "jasmine-marbles/src/scheduler";
import { Observable } from "rxjs/Observable";
export class MarbleSchedulerInjector
{
static inject(scheduler: TestScheduler, ...methods: (keyof Observable<any> | "all")[])
{
methods = methods || ["all"];
@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);