Skip to content

Instantly share code, notes, and snippets.

@Jogai
Jogai / DatesTest.cs
Created June 30, 2020 11:08
Check overlap in date ranges
using System;
using System.Collections.Generic;
public class Program
{
public static void Main()
{
var init = new { from = new DateTime(2020, 5, 10), to = new DateTime(2020, 5, 20)};
var x = new List<(DateTime StartsOn, DateTime EndsOn, Boolean expected)>() {
Add-MpPreference -ExclusionPath 'C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv'
Add-MpPreference -ExclusionPath 'C:\Program Files (x86)\Microsoft Office'
Add-MpPreference -ExclusionPath 'C:\Program Files (x86)\Microsoft SDKs'
Add-MpPreference -ExclusionPath 'C:\Program Files (x86)\Microsoft SDKs\NuGetPackages'
Add-MpPreference -ExclusionPath 'C:\Program Files (x86)\Microsoft Visual Studio'
Add-MpPreference -ExclusionPath 'C:\Program Files (x86)\Microsoft Visual Studio 10.0'
Add-MpPreference -ExclusionPath 'C:\Program Files (x86)\Microsoft Visual Studio 14.0'
Add-MpPreference -ExclusionPath 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.exe'
Add-MpPreference -ExclusionPath 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\ServiceHub\Hosts\ServiceHub.Host.Node.x86\ServiceHub.Host.Node.x86.exe'
Add-MpPreference -ExclusionPath 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Web\External\node.exe'
@Jogai
Jogai / from_memory.md
Created March 2, 2016 11:39
Handy Cache helper method
@Jogai
Jogai / DBDatabase.cs
Created January 6, 2016 09:33
dynasql fixes
/* Copyright 2009 PerceiveIT Limited
* This file is part of the DynaSQL library.
*
* DynaSQL is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* DynaSQL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of