Skip to content

Instantly share code, notes, and snippets.

@d1820
d1820 / run-unit-tests.yaml
Created September 1, 2024 13:28
Fast Run Unit Tests Pipeline
parameters:
runTests: false
testNamespacePattern: ''
BuildConfiguration: 'Debug'
testResultFolder: 'TestResults'
reports: '**/TestResults/**/*.xml'
targetdir: './TestResults/Report/'
testSearchPath: '*.csproj'
testProjects: '(Tests|Test)'
coverageFileExclusions: "**/entities/**/*,**/models/**/*,**/mocks/**/*,**/obj/**/*,**/*Test*/**/*"
The user may indicate their desired VERBOSITY of your response as follows:
V=2: concise
V=3: detailed (default)
V=4: comprehensive
Once the user has sent a message, adopt the role of 1 or more subject matter EXPERTs most qualified to provide a authoritative, nuanced answer, then proceed step-by-step to respond:
1. Begin your response like this:
**Expert(s)**: list of selected EXPERTs
**Possible Keywords**: CSV of EXPERT-related topics, terms, people, and/or jargon limit to 5
@d1820
d1820 / About.md
Created February 23, 2024 14:42
ChatGTP 3.5 Instructions that provides search links on BRAVE

This adopts the work done from ChatGPT-AutoExpert and updates it to get rid of some of the verboseness and adds links into the response (while not clickable, due to blocks by MS) are at least copy pastable to use.

Example output

image

@d1820
d1820 / Save EBooks You Own.md
Created February 20, 2024 18:52
Bookmarklets to auto advance pages from Ebooks online and save them as images

Saving ebooks as images

Saving Certain Ebook providers books

Some ebooks are image based and have certain DRM rights added to them, even though you PAID for them. These bookmarklets allows for capturing those EBooks YOU own.

Image based books

  • Install the advance-and-download-ebook bookmarklet as a favorite in your bookmarks bar.
@d1820
d1820 / Install POSH for Mac.sh
Last active February 8, 2024 14:19
Install Terminal Icons and POSH for Mac
#!/bin/bash
# Set default value for theme if not provided
theme=${1:-'quick-term.omp.json'}
font=${2:-'Meslo'}
echo 'Installing Posh...'
brew install jandedobbeleer/oh-my-posh/oh-my-posh
@d1820
d1820 / Install Terminal Icons and POSH for Powershell.ps1
Last active May 6, 2024 15:09
Install Terminal Icons and POSH for Powershell
param(
[string]$theme = "quick-term.omp.json",
[string]$font = "Meslo"
)
$moduleName = "Terminal-Icons"
$poshName = "JanDeDobbeleer.OhMyPosh"
Write-Host "Installing Terminal Icons..." -ForegroundColor Blue
Install-Module -Name $moduleName -Repository PSGallery
@d1820
d1820 / ExampleTest.cs
Last active January 13, 2024 19:14
Running XUNIT Tests that need a static implementation of a class
public class CommentHelperTests: IClassFixture<TestFixture>
{
private readonly TestFixture fixture;
public CommentHelperTests(TestFixture fixture, ITestOutputHelper output)
{
this.fixture = fixture;
this.fixture.Initialize(output);
}
@d1820
d1820 / SqlExpressionVisitor Example.txt
Last active December 29, 2023 17:57
Convert Linq Where expressions to user friendly string
foreach (var item in spec.WhereExpressions)
{
var sqlVisitor = new ExportsAPI.Domain.Visitors.SqlSearchExpressionVisitor();
string sqlString = sqlVisitor.VisitExpression(item.Filter, test);
sql.Add(sqlString);
}
SQL list:
[0]: "(Assigned.UserName = 'Awesome')"
[1]: "(Id = 'fb9244e7-72d5-4842-95a2-7b44af136a9c')"
[2]: "(ClientId = 'fb9244e7-72d5-4842-95a2-7b44af136a9c')"
@d1820
d1820 / CleanBinObj.ps1
Last active November 1, 2023 19:10 — forked from xtrmstep/cleanup-objbin.ps1
PowerShell command to delete all \bin and \obj folders. Use as a VS2022 External Tool
Get-ChildItem .\ -include bin,obj -Recurse | foreach ($_) { Write-Host "Removing $($_.fullname)"; remove-item $_.fullname -Force -Recurse }; Write-Host "Complete"
@d1820
d1820 / PropertyMap.cs
Last active March 19, 2024 13:02
Parse object to create getter and setter expresssions
using System.Reflection;
namespace Entities
{
public class PropertyMap<T>
{
public Func<T, object> Getter { get; set; }
public PropertyInfo PropertyInfo { get; set; }