Skip to content

Instantly share code, notes, and snippets.

View akamsteeg's full-sized avatar

Alex Kamsteeg akamsteeg

View GitHub Profile
@akamsteeg
akamsteeg / .editorconfig
Created January 16, 2022 13:20
.editorconfig for C#
root = true
[*.cs]
indent_size = 2
indent_style = space
trim_trailing_whitespace = true
# Enable "this."
dotnet_style_qualification_for_field = true:warning
dotnet_style_qualification_for_property = true:warning
dotnet_style_qualification_for_method = true:warning
@akamsteeg
akamsteeg / CreateSolution.ps1
Last active September 17, 2018 20:40
Create a .NET Core project of the specified type with a solution and optionally a XUnit unit test project
param(
[Parameter(Mandatory=$True)][string]$projectName,
[Parameter(Mandatory=$True)][string]$projectType,
[Parameter(Mandatory=$True)][bool]$createUnitTest=$False
)
dotnet new sln --name $projectName
dotnet new $projectType --name $projectName
dotnet sln $projectName.sln add $projectName\$projectName.csproj
@akamsteeg
akamsteeg / .gitconfig
Last active March 25, 2019 10:51
My .gitconfig file with my aliasses
[core]
autocrlf = false
[fetch]
prune = true
[alias]
st = status
co = checkout
ci = commit
@akamsteeg
akamsteeg / .editorconfig
Last active August 19, 2019 14:03
Visual Studio .editorconfig
root = true
[*.cs]
indent_size = 2
indent_style = space
trim_trailing_whitespace = true
# Enable "this."
dotnet_style_qualification_for_field = true:warning
dotnet_style_qualification_for_property = true:warning
dotnet_style_qualification_for_method = true:warning
@akamsteeg
akamsteeg / BigLib.cs
Created January 14, 2016 19:05
Generate a 140+ MB .NET assembly from only 142 bytes of source code
/*
Compile: csc.exe /target:library BigLib.cs
Output: 140+ MB DLL
*/
class A<T1,T2,T3,T4,T5>{class B:A<B,B,B,B,B>{B.B.B.B.B.B.B.B.B.B y;}}
@akamsteeg
akamsteeg / badssl.atlex.nl.
Created January 6, 2016 12:46
badssl.atlex.nl Apache configuration
<VirtualHost *:80 *:443>
# A config that scores abysmal in Ivan Ristic's SSL Server Test
# https://www.ssllabs.com/ssltest/analyze.html?d=badssl.atlex.nl
ServerName badssl.atlex.nl
DocumentRoot /home/akamsteeg/sites/badssl.atlex.nl/www
<Directory /home/akamsteeg/sites/badssl.atlex.nl/www>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
password
123456
12345678
1234
qwerty
12345
dragon
pussy
baseball
football
@akamsteeg
akamsteeg / hashingspeed.cs
Last active November 30, 2023 18:09
Speed of different hashing algorithms
using System;
using System.Security.Cryptography;
using System.Diagnostics;
using System.Text;
// Compile in the VS Developer Command Prompt with: csc /warnaserror+ /optimize+ hasingspeed.cs
// This is just a demonstration. :)
// Sample output: