Skip to content

Instantly share code, notes, and snippets.

View mapfel's full-sized avatar

Marko Apfel mapfel

View GitHub Profile
<TypePattern DisplayName="StyleCop Classes, Interfaces, &amp; Structs" RemoveRegions="All">
<TypePattern.Match>
<Or>
<Kind Is="Class" />
<Kind Is="Struct" />
<Kind Is="Interface" />
</Or>
</TypePattern.Match>
<Entry DisplayName="Constants">
<Entry.Match>
@mapfel
mapfel / README.md
Created October 20, 2020 22:42
Default Repository Readme from Azure

Introduction

TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.

Getting Started

TODO: Guide users through getting your code up and running on their own system. In this section you can talk about:

  1. Installation process
  2. Software dependencies
  3. Latest releases
  4. API references
@mapfel
mapfel / Cmder
Created November 13, 2019 09:52
Configurations
# Git Bash in dev default folder
Name
Bash::Git bash
Parameters
/icon "%CMDER_ROOT%\icons\cmder.ico"
COmmands
-new_console:d:C:\_projects set "PATH=%ConEmuDrive%\Program Files\Git\usr\bin;%PATH%" & "%ConEmuDrive%\Program Files\Git\git-cmd.exe" --no-cd --command=%ConEmuBaseDirShort%\conemu-msys2-64.exe /usr/bin/bash.exe -l -i -new_console:p
# Include a task for "Developer Command Prompt for VS2019" and start in dev default folder
Name
@mapfel
mapfel / LocalFunctions.cs
Created October 22, 2019 12:19
Clean Code Samples
// Local functions offer some real benefits
// - improves readability from top till down and usage of method names for documentation purposes
// - supports the SLA principle to keep the abstraction level in a block or local funtion on the same level
// - avoid spreading "private scope" code in the file which pollutes the file structure
private static ProcessDetails GetProcessDetailsBy(BvmsApplication bvmsApplication)
{
switch (bvmsApplication)
{
case BvmsApplication.ConfigurationClient:
@mapfel
mapfel / Combinations in flagged enums.cs
Last active September 4, 2019 08:18
Nice C# constructs
// Kombinieren von Werten in einer flagged Enumeration
[Flags]
public enum DefaultValueHandling
{
  Include = 0,
  Ignore = 1,
  Populate = 2,
  IgnoreAndPopulate = Ignore | Populate
}
@mapfel
mapfel / AllowCodeFolding.json
Created July 12, 2019 08:36
Visual Studio Code Settings
{
"editor.showFoldingControls": "always",
"editor.folding": true,
"editor.foldingStrategy": "indentation",
}
@mapfel
mapfel / bookmarks.ini
Created July 10, 2019 07:28
Keypirinha Personal Configuration
[provider/Chromium]
# Should bookmarks from the Chromium browser be referenced?
# Default: yes
enable = no
[provider/Chrome]
# Should bookmarks from the Chrome browser be referenced?
# Default: yes
enable = no
@mapfel
mapfel / build.fsx
Last active June 13, 2019 07:55
Simple starting point for FAKe
#load ".fake/build.fsx/intellisense.fsx"
open Fake.Core
open Fake.DotNet
open Fake.IO
open Fake.IO.FileSystemOperators
open Fake.IO.Globbing.Operators
open Fake.Core.TargetOperators
Target.create "Clean" (fun _ ->
!! "src/**/bin"
@mapfel
mapfel / VS Excludes.flt
Created January 16, 2019 10:36
WinMerge Filters
## This is a directory/file filter template for WinMerge
name: VS Excluded
desc: Excludes package & .git Folder
## Select if filter is inclusive or exclusive
## Inclusive (loose) filter lets through all items not matching rules
## Exclusive filter lets through only items that match to rule
## include or exclude
def: exclude
@mapfel
mapfel / variant.01.cs
Last active August 2, 2018 14:20
ASP.NET Core - Configurations
// https://exceptionnotfound.net/working-with-environments-and-launch-settings-in-asp-net-core/
// https://github.com/exceptionnotfound/DotNetCoreEnvironmentsDemo/blob/master/src/CoreEnvironmentBehaviorDemo/Startup.cs
namespace CoreEnvironmentBehaviorDemo
{
public class Startup
{
public Startup(IHostingEnvironment env)
{
var builder = new ConfigurationBuilder()