Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Coding!

Jeroen Heijmans jeroenheijmans

💭
Coding!
View GitHub Profile
@jeroenheijmans
jeroenheijmans / AspNetIdentity-SQL-Scripts.sql
Created Jan 17, 2018
SQL DDL scripts for [IdentityServer4 + AspNetIdentity] setup
View AspNetIdentity-SQL-Scripts.sql
/*
SQL DDL scripts generated using
dotnet ef database update
for the IdentityServer4.Samples 6_AspNetIdentity quick start. This was run for
commit 0a7400a2ade8c149b3feb08a05bf4423d19ac08c in that repository. It references
- IdentityServer4.AspNetIdentity 2.0.0 including
- Microsoft.AspNetCore.Identity (>= 2.0.1)
View keybase.md

Keybase proof

I hereby claim:

  • I am jeroenheijmans on github.
  • I am jeroenheijmans (https://keybase.io/jeroenheijmans) on keybase.
  • I have a public key ASAzXzBDLZAU_aCj3dB_dN4cDqCTyka3DSPFCMK-0hMBxwo

To claim this, I am signing this object:

@jeroenheijmans
jeroenheijmans / trello-export-lpic-1-101-study-guide.json
Last active Jul 8, 2017
Trello Export for LPIC-1 101 Study Guide
View trello-export-lpic-1-101-study-guide.json
{
"id": "5960b8fe99b1151dc82b6cb8",
"name": "LPIC-1 101 Study Guide",
"desc": "",
"descData": null,
"closed": false,
"idOrganization": null,
"invited": false,
"pinned": false,
"starred": false,
@jeroenheijmans
jeroenheijmans / EF_Select_N_plus_1_Repro.cs
Created Jun 2, 2017
EntityFramework SELECT N+1 issue
View EF_Select_N_plus_1_Repro.cs
/*
* Create a new Class Library and copy/paste this file over the class1.cs file.
*
* On Package Mananager Console:
*
* @("MSTest.TestFramework","MSTest.TestAdapter","EntityFramework") | foreach { Install-Package $_ }
*
* Run `sqllocaldb c soquestion` to create the instance.
* Afterwards create database `TestDb` e.g. with SSMS on that instance.
*/
@jeroenheijmans
jeroenheijmans / EntityFrameworkIntegrationTests.cs
Last active May 5, 2017
Entity Framework minimal integration tests setup
View EntityFrameworkIntegrationTests.cs
/*
* Create a new Class Library and copy/paste this file over the class1.cs file.
*
* On Package Mananager Console:
*
* @("MSTest.TestFramework","MSTest.TestAdapter","EntityFramework") | foreach { Install-Package $_ }
*
* Run `sqllocaldb c soquestion` to create the instance.
* Afterwards create database `TestDb` e.g. with SSMS on that instance.
*/
View Microsoft.PowerShell_profile.ps1
# Normal, colored prompt:
#function Prompt
#{
# $promptString = "PS " + $(Get-Location) + ">"
# Write-Host $promptString -NoNewline -ForegroundColor Yellow
# return " "
#}
# Posh-Git prompt
function prompt {
@jeroenheijmans
jeroenheijmans / WCF-Minimal-Repro.cs
Created Jan 6, 2017
Minimal WCF host and client setup for WCF repros
View WCF-Minimal-Repro.cs
using System;
using System.ServiceModel;
using System.ServiceModel.Description;
using System.Threading.Tasks;
namespace WcfMinimalTest
{
// WARNING! This minimal repro does no cleanup or error handling whatsoever!!
// Loosely based on http://stackoverflow.com/a/7833188/419956 by @Anuraj
@jeroenheijmans
jeroenheijmans / UploadMultipartForm.psm1
Created Jan 5, 2017
Powershell Module with cmdlet to upload files in a multipart-form POST
View UploadMultipartForm.psm1
<#
# It can be called like this:
$url ="http://localhost:12345/home/upload"
$form = @{ description = "Test 123." }
$pwd = ConvertTo-SecureString "s3cr3t" -AsPlainText -Force
$creds = New-Object System.Management.Automation.PSCredential ("john", $pwd)
Get-ChildItem *.txt | Send-MultiPartFormToApi $url $form $creds -Verbose -WhatIf
#>
@jeroenheijmans
jeroenheijmans / DoubleVsDecimal.cs
Last active Dec 29, 2016
DoubleVsDecimal Test-Driven-Description
View DoubleVsDecimal.cs
namespace DoubleVsDecimal
{
using System;
using NUnit.Framework;
[TestFixture]
public class RangeTests
{
static readonly decimal[] interestingDecimals = new decimal[] {
decimal.MinValue,
@jeroenheijmans
jeroenheijmans / windbg-commands.md
Last active Sep 2, 2016
WinDbg-ManagedThreads-Listing
View windbg-commands.md

Run these on the crash dump to get a listing of all CLR threads at the moment of the dump.

.loadby sos clr
~*e!clrstack