Skip to content

Instantly share code, notes, and snippets.

View spk33's full-sized avatar

Prasadh Kumar spk33

  • Payoda
  • Coimbatore
View GitHub Profile
@dzsquared
dzsquared / sql-dev-feedback.yml
Created April 23, 2025 14:55
Example CI pipeline that integrates database quality and pre-deployment checks
# this workflow will create the DB in a container
# and perform code analysis checks on the T-SQL code
# before getting a script for the anticipated deployment
name: SQL dev feedback
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
@davidfowl
davidfowl / MinimalAPIs.md
Last active March 16, 2025 16:47
Minimal APIs at a glance

System Architecture Course

This course provides a structured approach for designing and implementing large systems that are scalable and highly available.

The challenges designing and building large systems are in how they are decomposed and communicate with each other. You will learn how to define boundaries based on business capabilities and implement asynchronous messaging for communication.

This course will show architectural patterns and styles that create a system that is resilient when failures occur. And when load and traffic increases are scalable horizontally on-demand as required.

I've developed this course based on my over two decades of experience designing and developing business systems in distribution, transportation, manufacturing, and accounting.

@dylanbeattie
dylanbeattie / ObjectExtensions.cs
Created January 14, 2021 01:41
ObjectExtensions.ToDynamic
public static class ObjectExtensions {
public static dynamic ToDynamic(this object value) {
IDictionary<string, object> expando = new ExpandoObject();
var properties = TypeDescriptor.GetProperties(value.GetType());
foreach (PropertyDescriptor property in properties) {
expando.Add(property.Name, property.GetValue(value));
}
return (ExpandoObject)expando;
}
}
@ufcpp
ufcpp / TaskOfTuple.cs
Created February 10, 2015 16:24
Task of Tuple for async return values
public async Task<(int sum, int count)> TallyAsync(IEnumerable<int> values) { ... }
var t = await TallyAsync(myValues);
Console.WriteLine($"Sum: {t.sum}, count: {t.count}");
@spewu
spewu / Enumeration.cs
Last active November 27, 2024 03:03
Better enums in C# for DDD ... based on Jimmy Bogards Enumeration class
using System;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
[Serializable]
[DebuggerDisplay("{DisplayName} - {Value}")]
public abstract class Enumeration<TEnumeration, TValue> : IComparable<TEnumeration>, IEquatable<TEnumeration>
where TEnumeration : Enumeration<TEnumeration, TValue>
where TValue : IComparable