Skip to content

Instantly share code, notes, and snippets.

View paulomorgado's full-sized avatar

Paulo Morgado paulomorgado

View GitHub Profile
@paulomorgado
paulomorgado / efcoremapping.md
Created February 29, 2024 15:06
EFCore ReadOnlyMemory<byte> mapping

Code

var services = new ServiceCollection()
    .AddPooledDbContextFactory<EFStorageDbContext<TestMessage>>(options =>
    {
        options.UseSqlServer(@"Server=(localdb)\mssqllocaldb;Database=TestDatabase;Trusted_Connection=True;");

        options.ReplaceService<IModelCustomizer, SqlServerModelCostumizer<TestMessage>>();
    })
    .BuildServiceProvider()
@paulomorgado
paulomorgado / speedscope.json
Created September 24, 2020 14:30
Speedscope converted from binlog
{
"exporter": "dotnet-msbuild@1.0.0.0",
"name": "Microsoft.PracticesChecker.Build.release.speedscope",
"activeProfileIndex": 0,
"$schema": "https://www.speedscope.app/file-format-schema.json",
"shared": {
"frames": [
{
"name": "Frame=0"
},
@paulomorgado
paulomorgado / Microsoft.PowerShell_profile.ps1
Created June 12, 2018 07:58
Developer PowerShell for VS2017
cmd.exe /c '"C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\VsDevCmd.bat" && set' |
Out-String -Stream | Select-String -Pattern '^(.*?)=(.*)$' |
ForEach-Object { Set-Content -Path "env:$($_.Matches.Groups[1].Value)" -Value $_.Matches.Groups[2].Value }
Import-Module posh-git
Set-PSReadlineOption -HistoryNoDuplicates -ShowToolTips -BellStyle Visual
Enable-RemoteDesktop
cinst fiddler4
cinst sysinternals
cinst 7zip.install
cinst notepadplusplus.install
cinst linqpad4
cinst windirstat
Install-WindowsUpdate -AcceptEula