Skip to content

Instantly share code, notes, and snippets.

View PilotBob's full-sized avatar

Bob Archer PilotBob

View GitHub Profile
@PilotBob
PilotBob / gist:803025d415b7e6794fb7149bb613172f
Last active October 9, 2023 22:00
Domain Events are raised by Entities, Sent by Unit of Work, Integration Events are published by UseCases
DoThisThingCommandHandler()
{
var entity = entityrepo.GetEntity();
entity.DoThisThing(); // raises domain event
unitOfWork.Save(); // publishes the domain events
_bus.Publish(new ThisThingIntegrationEvent(entity.id, entity.payload, blah));
}
class Entity : AggregateRoot
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"vertical_offset": 0,
"segments": [
{
"type": "session",
@PilotBob
PilotBob / settings.json
Created December 2, 2020 18:44
Terminal Settings File
// This file was initially generated by Windows Terminal 0.11.1121.0
// It should still be usable in newer versions, but newer versions might have additional
// settings, help text, or changes that you will not see unless you clear this file
// and let us generate a new one for you.
// To view the default settings, hold "alt" while clicking on the "Settings" button.
// For documentation on these settings, see: https://aka.ms/terminal-documentation
{
"$schema": "https://aka.ms/terminal-profiles-schema",
@PilotBob
PilotBob / keybase.md
Last active September 9, 2019 21:40
keybase.md

Keybase proof

I hereby claim:

  • I am pilotbob on github.
  • I am pilotbob (https://keybase.io/pilotbob) on keybase.
  • I have a public key ASAueYMexWXoMG9ouezpRQrSgedJoMhUc5NRWVTBw78TTwo

To claim this, I am signing this object:

@PilotBob
PilotBob / readme.md
Last active December 3, 2021 03:23
EF Core, AspNet Core, Docker, MySql

EF Core, AspNet Core, Docker, MySql

This setup describes the ability to run AspNet Core and MySql db in docker containers during dev and still be able to use EF Core tools in order to run migrations against the MySql database running in a container.

This is basically an addendum to Julie Lermans 3 part article on using EF core in Docker connecting to MySql rather than SQL Server.

Here I use a different method to provide a dev time verses runtime connection string for EF core.

The key point is in order to do that you have to provide a connection string to EF tools that can talk to your container as well as exposing the MySql db to your localhost in the docker-compose configuration.

@PilotBob
PilotBob / gist:dcdf5bfcc0e7c11200dce83b2d29bef2
Created December 17, 2018 19:44
Devops Pipeline LFS issue
2018-12-17T18:04:20.0637782Z Prepending Path environment variable with directory containing 'git.exe'.
2018-12-17T18:04:20.0803087Z ##[command]git version
2018-12-17T18:04:20.5487112Z git version 2.14.3.windows.1
2018-12-17T18:04:20.5585776Z ##[command]git lfs version
2018-12-17T18:04:20.9954212Z git-lfs/2.6.1 (GitHub; windows amd64; go 1.11.1; git dc072c3e)
2018-12-17T18:04:21.0085413Z ##[command]git config --get remote.origin.url
2018-12-17T18:04:21.1570796Z ##[command]git config gc.auto 0
2018-12-17T18:04:21.2322820Z ##[command]git config --get-all http.https://amsidev.visualstudio.com/Infor%20Property%20Management/_git/InforPropertyManagement.extraheader
2018-12-17T18:04:21.2935813Z ##[command]git config --get-all http.proxy
2018-12-17T18:04:21.3637727Z ##[command]git lfs install --local
{#each perms as node}
<li class="folder {node.Granted}">
<a on:click="event.preventDefault()"
href="/#"
title={node.Description}
id={node.RuntimeName}
role="treeitem"
tabindex="0"
aria-selected="true"
aria-level="0" aria-posinset="1" aria-setsize="13" class="hide-focus">
This works:
db.Entry(target).Collection(r => r.Permissions).Load();
target.Permissions.Remove(permission);
This doesn't:
db.Entry(target).Collection(r => r.Permissions).Query().Where(p => p.ID == permission.ID).Load();
target.Permissions.Remove(permission);
2018-05-31T14:34:15.9502941Z ##[section]Starting: Download artifact - InforPropertyManagement-CI
2018-05-31T14:34:15.9699892Z ==============================================================================
2018-05-31T14:34:15.9700337Z Task : Download Build Artifacts
2018-05-31T14:34:15.9700611Z Description : Download Build Artifacts
2018-05-31T14:34:15.9700895Z Version : 0.136.1
2018-05-31T14:34:15.9701146Z Author : Microsoft Corporation
2018-05-31T14:34:15.9701423Z Help :
2018-05-31T14:34:15.9701701Z ==============================================================================
2018-05-31T14:34:24.0509330Z Downloading artifacts for build: 626
2018-05-31T14:34:32.1900845Z Linked artifacts count: 1
@echo off
REM IN YOUR SSL FOLDER, SAVE THIS FILE AS: makeCert.bat
REM AT COMMAND LINE IN YOUR SSL FOLDER, RUN: makecert
REM IT WILL CREATE THESE FILES: example.cnf, example.crt, example.key
REM IMPORT THE .crt FILE INTO CHROME Trusted Root Certification Authorities
REM REMEMBER TO RESTART APACHE OR NGINX AFTER YOU CONFIGURE FOR THESE FILES
REM PLEASE UPDATE THE FOLLOWING VARIABLES FOR YOUR NEEDS.
SET HOSTNAME=yourhouse.name.here