Skip to content

Instantly share code, notes, and snippets.

View stephaneerard's full-sized avatar

Stéphane Erard stephaneerard

  • Pragmatism & Enthusiasm
  • Nice, France
View GitHub Profile
// if no cli
if (0 != strncasecmp(PHP_SAPI, 'cli', 3)) {
// do something
}
@cuppster
cuppster / 1.cs
Created September 3, 2012 18:39
Promises for C# using Generics
/*
modified from original source: https://bitbucket.org/mattkotsenas/c-promises/overview
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Promises
@altrive
altrive / Add-WindowsDefenderExclusionsPolicy.ps1
Last active June 21, 2023 18:14
Add WindowsDefender exclusions policies for Windows 8 Hyper-V
function Add-WindowsDefenderExclusionsPolicy
{
$ErrorActionPreference="Stop"
Set-StrictMode -Version Latest
#Get Hyper-V Settings
$vmHost = Get-VMHost
#Default Exclusion Entries
$excludes = @{