Skip to content

Instantly share code, notes, and snippets.

View tugberkugurlu's full-sized avatar
:shipit:
💥 shakalaka

Tugberk Ugurlu tugberkugurlu

:shipit:
💥 shakalaka
View GitHub Profile
➜ aws ec2 describe-images --image-id ami-0a879f21e6f3b1fb2
{
    "Images": [
        {
            "Architecture": "arm64",
            "CreationDate": "2020-12-10T18:09:00.000Z",
            "ImageId": "ami-0a879f21e6f3b1fb2",
            "ImageLocation": "amazon/amzn2-ami-ecs-hvm-2.0.20201209-arm64-ebs",
            "ImageType": "machine",
From f629b295fc8f9bbd44904284cb0ec832d51185be Mon Sep 17 00:00:00 2001
From: Tugberk Ugurlu
Date: Tue, 30 Apr 2019 09:55:44 +0100
Subject: [PATCH] cache invalidation, imperatively
---
postsharp/0-caching/1-sample-web/Startup.cs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/postsharp/0-caching/1-sample-web/Startup.cs b/postsharp/0-caching/1-sample-web/Startup.cs
From f0889e68e55298e43360e01dd3b0e8b1cf6468e3 Mon Sep 17 00:00:00 2001
From: Tugberk Ugurlu
Date: Tue, 30 Apr 2019 09:40:21 +0100
Subject: [PATCH] cache invalidation, declarative
---
postsharp/0-caching/1-sample-web/Startup.cs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/postsharp/0-caching/1-sample-web/Startup.cs b/postsharp/0-caching/1-sample-web/Startup.cs
From a20fc8e95ffd9bf5d424467e0e1283ae5891454a Mon Sep 17 00:00:00 2001
From: Tugberk Ugurlu
Date: Tue, 9 Apr 2019 23:38:32 +0100
Subject: [PATCH] add caching
---
postsharp/0-caching/1-sample-web/1-sample-web.csproj | 1 +
postsharp/0-caching/1-sample-web/Program.cs | 3 +++
postsharp/0-caching/1-sample-web/Startup.cs | 4 +++-
3 files changed, 7 insertions(+), 1 deletion(-)
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
+using PostSharp.Patterns.Diagnostics;
+using PostSharp.Patterns.Diagnostics.Backends.Console;
namespace _1_sample_web
{
+ [Log(AttributeExclude = true)]
public class Program
using PostSharp.Patterns.Diagnostics;
using PostSharp.Extensibility;
[assembly: Log(AttributePriority = 1, AttributeTargetMemberAttributes = MulticastAttributes.Protected | MulticastAttributes.Internal | MulticastAttributes.Public)]
[assembly: Log(AttributePriority = 2, AttributeExclude = true, AttributeTargetMembers = "get_*" )]
@tugberkugurlu
tugberkugurlu / Program.cs
Created January 14, 2019 01:17
Call private methods on implementation of the abstract class. This could be handy for the abstract Aggregate class which can get the event stream and populate the aggregate.
using System;
using System.Linq;
using System.Reflection;
namespace abstract_impl_reflect
{
public class Foo : FooBase
{
public Foo() : base()
{