Skip to content

Instantly share code, notes, and snippets.

View culmat's full-sized avatar

Matthias Cullmann culmat

View GitHub Profile
function Add-EnvPath {
param(
[Parameter(Mandatory=$true)]
[string] $Path,
[ValidateSet('Machine', 'User', 'Session')]
[string] $Container = 'Session'
)
if ($Container -ne 'Session') {
@culmat
culmat / FactoryHashMap.java
Last active November 27, 2015 10:13
FactoryHashMap
package common;
import java.util.HashMap;
import java.util.function.Function;
/**
* How many times have you written code like this
* <blockquote><pre>
* List&lt;Integer&gt; value = map.get(key);
* if(value == null) {