Skip to content

Instantly share code, notes, and snippets.

Avatar

Ronald Rink dfch

View GitHub Profile
View ContractTest.cs
/**
* Copyright 2016 d-fens GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@dfch
dfch / 00-README.md
Last active Feb 27, 2016
ODataQueryOptions do not apply $filter and $orderby options to IQueryable when using EntityFramework 6 with SQL Server
@dfch
dfch / 00-README.md
Last active Feb 27, 2016
ODataQueryOptions do not apply $filter and $orderby options to IQueryable when using EntityFramework 6 with SQL Server
@dfch
dfch / 00-README.md
Last active Feb 27, 2016
ODataQueryOptions do not apply $filter and $orderby options to IQueryable when using EntityFramework 6 with SQL Server
View Should.ps1
help Should
function Should {
[CmdletBinding(
SupportsShouldProcess = $false
,
ConfirmImpact = 'Low'
)]
Param
(
@dfch
dfch / TSGET.CMD
Created Aug 13, 2015
TSGET - get X.509 timestamp via Windows Cmd file and utilities
View TSGET.CMD
@ECHO OFF
SETLOCAL
FOR /F "tokens=* delims=?" %%I IN ('ECHO %0') DO @SET SCRIPTPATH=%%~dpI
FOR /F "tokens=* delims=?" %%I IN ('ECHO %SCRIPTPATH%') DO @SET SCRIPTPATH=%%~I
FOR /F "tokens=* delims=?" %%I IN ('ECHO %SCRIPTPATH%') DO @SET SCRIPTPATH=%%~sI
IF "\" EQU "%SCRIPTPATH:~-1%" SET SCRIPTPATH=%SCRIPTPATH:~0,-1%
IF "\" EQU "%SCRIPTPATH:~0,1%" (
PUSHD "%SCRIPTPATH%"
@dfch
dfch / --- README.md
Last active Aug 29, 2015
biz.dfch.PS.Pester.Tests - Verifiable Mocks
View --- README.md
@dfch
dfch / HashtableDuplicateKey.Tests.ps1
Last active Dec 26, 2015
[Bug] PowerShell Hashtables and duplicate keys with Import-CliXml
View HashtableDuplicateKey.Tests.ps1
#Requires -Module Pester
#Requires -Version 3.0
# see http://d-fens.ch/2015/06/28/bug-powershell-import-clixml-incorrectly-creates-hashtables-with-duplicate-keys/ for further explanation
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
$ImportCliXmlDuplicateKeys = "{0}.xml" -f $MyInvocation.MyCommand.Name.Replace('.Tests.ps1', '');
Describe -Tags "Test-ImportCliXml" "Test-ImportCliXml" {
@dfch
dfch / Get-Functions.ps1
Last active Mar 12, 2018
Enumerate all functions in a PowerShell script file via AST
View Get-Functions.ps1
#Requires -Version 3
# http://d-fens.ch/2015/04/26/nobrainer-enumerate-all-functions-in-a-powershell-script-file-via-ast
[CmdletBinding(
SupportsShouldProcess = $true
,
ConfirmImpact = 'Low'
,
DefaultParameterSetName = 'list'
)]
Param