Skip to content

Instantly share code, notes, and snippets.

View nikkonrom's full-sized avatar
🎯
Focusing

Nick Romaniuk nikkonrom

🎯
Focusing
View GitHub Profile
@nikkonrom
nikkonrom / cqrs-auth-playground.ts
Last active January 3, 2022 17:14
Possible solution for Auth and Permissions checking in CQRS
//interfaces and abstract classes used in our real commands
//firstly basic class for command w/o any additional data, pure payload only
export abstract class Command<TPayload> {
payload: TPayload;
public constructor(payload: TPayload) {
this.payload = payload;
}
using System;
using System.Net;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
namespace test
{
static class Program
{
#include <stdio.h>
#include <stdlib.h>
int fin(int);
void main()
{
int n, i, temp;
scanf("%d", &n);
for (i = 0; (temp = fin(i)) <n; i++)
printf("%4d\n", temp);