Skip to content

Instantly share code, notes, and snippets.

View kierunb's full-sized avatar
💭
Any sufficiently advanced bug is indistinguishable from a feature.

Bartek kierunb

💭
Any sufficiently advanced bug is indistinguishable from a feature.
View GitHub Profile
@kierunb
kierunb / WindowsDefenderExclusionsVS2022.ps1
Created May 30, 2023 12:52
Windows Defender Exclusions VS2022
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
$pathExclusions.Add('C:\Windows\assembly') > $null
$pathExclusions.Add($userPath + '\.dotnet') > $null
$pathExclusions.Add($userPath + '\.librarymanager') > $null
@kierunb
kierunb / WindowsDefenderExclusionsDevApps.ps1
Created May 30, 2023 12:51
Windows Defender Exclusions for .NET/VS Developers
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
#$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
#$pathExclusions.Add($userPath + '\.dotnet') > $null
#$pathExclusions.Add($userPath + '\AppData\Local\Microsoft\VisualStudio') > $null
@kierunb
kierunb / github-training-content.txt
Created January 18, 2023 07:58
GitHub Training content
GitHub Developer Training
• https://githubtraining.github.io/training-manual/#/01_getting_ready_for_class
GitHub Skills and Learning Resources
• https://skills.github.com/
• https://learn.microsoft.com/en-us/training/github/
• https://docs.github.com/en/get-started/quickstart/git-and-github-learning-resources
GitHub Documentation
• https://docs.github.com/en
@kierunb
kierunb / actions.yml
Created September 20, 2022 09:09
GitHub Action Examples
name: Basics
on:
workflow_dispatch:
jobs:
first-job:
runs-on: ubuntu-latest
steps:
@kierunb
kierunb / class.cs
Created September 19, 2022 11:22
Fantastic snippet
using System;
public class Person
{
// Constructor that takes no arguments:
public Person()
{
Name = "unknown";
}
public abstract class ValueObject
{
protected static bool EqualOperator(ValueObject left, ValueObject right)
{
if (ReferenceEquals(left, null) ^ ReferenceEquals(right, null))
{
return false;
}
return ReferenceEquals(left, null) || left.Equals(right);
}
@kierunb
kierunb / gist:9de9e8477de1f520a10c31584aa5f8a3
Created November 19, 2021 12:01
ado-net6-build-pipeline.yml
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
trigger:
- master
pool:
vmImage: ubuntu-latest
@kierunb
kierunb / gist:97280dc068bf207956978b977f0d9eea
Created November 19, 2021 11:53
ado-net6-build-pipeline.yml
trigger:
- master
pool:
vmImage: ubuntu-latest
variables:
workingDirectory: '$(System.DefaultWorkingDirectory)'
stages:

redis & c#

using StackExchange.Redis;

using Dapper;
using Microsoft.Data.SqlClient;

        [HttpGet]
        [Route("sql")]
        public string Sql()
@kierunb
kierunb / ts
Last active November 14, 2019 11:22
using System;
using Microsoft.AspNetCore.Mvc;
using warsztaty14_11.Models;
namespace warsztaty14_11.Controllers
{
[Route("[controller]")]
public class PersonController : ControllerBase
{
// POST: /person