Skip to content

Instantly share code, notes, and snippets.

View dbones's full-sized avatar
☄️
Coding the dotNEXT

Dave R. dbones

☄️
Coding the dotNEXT
View GitHub Profile
@dbones
dbones / Nuget.config
Created March 22, 2024 07:34
dev container
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="gh-dbones-labs" value="https://nuget.pkg.github.com/dbones-labs/index.json" />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<packageSourceCredentials>
<gh-dbones-labs>
<add key="Username" value="usr" />
<add key="ClearTextPassword" value="pwd" />
@dbones
dbones / Program.cs
Created March 19, 2024 19:09
laters - marten
using System.ComponentModel.DataAnnotations;
using Laters;
using Laters.AspNet;
using Laters.ClientProcessing;
using Laters.Data.Marten;
using Laters.Minimal.Application;
using Marten;
using Microsoft.EntityFrameworkCore;
using Weasel.Core;
@dbones
dbones / Program.cs
Last active March 25, 2024 21:01
Laters EF
using System.ComponentModel.DataAnnotations;
using System.Data;
using System.Data.Common;
using Laters;
using Laters.AspNet;
using Laters.ClientProcessing;
using Laters.Data.EntityFrameworkCore;
using Laters.Minimal.Application;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
@dbones
dbones / AppBuilder.cs
Created February 9, 2024 08:25
Mimicking a minimal Api
using System.ComponentModel.DataAnnotations;
using System.Linq.Expressions;
using Microsoft.Extensions.DependencyInjection;
public delegate Task MinimalCommand<T>(IServiceProvider scope, T instnace);
public class AppBuilder
{
readonly IServiceProvider _serviceProvider;
readonly Dictionary<Type, object> _commands = new();
@dbones
dbones / servcies.yaml
Last active May 31, 2023 00:27
eploring the service model, along with backups
# global annotastion
# lab.dev/sync - how often to sync
# lab.dev/keep - disables the delete
# improved support for sevices
# namespace, in downstream clusters
@dbones
dbones / postgres.yaml
Created May 25, 2023 21:10
postgres KubeOps Api RFC
# Ops API Tech RFC: postgres
# connection is a secret (default pg-connection, in the same namepace, or a configfile which has the location of the connection))
# database
# schema
# security label
# role
# grant(s)
@dbones
dbones / command
Last active July 17, 2022 20:51
k3d-example
k3d cluster create --config ./config.yaml
# /org
# dbones-labs.yaml
#
# /platform-services
# github.yaml
# rancher.yaml
# discord.yaml
#
# /users
# dbones.yaml
@dbones
dbones / Cache.cs
Last active January 10, 2022 09:30
possible wapper for redis, encapsulates Keys and Serialization
namespace Core.Redis
{
using System;
using Infrastructure;
using StackExchange.Redis;
public class Cache
{
private readonly IDatabase _database;
private readonly JsonSerializer _serializer;
@dbones
dbones / BoilerPlate.cs
Created November 27, 2021 18:13
example of duplicate/redundant code (to prove a point)
namespace PipesExample
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;