This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tasks.withType(ScalaCompile){ | |
// Map plugin jars to -Xplugin parameter | |
List<String> parameters = | |
configurations.scalaCompilerPlugin.files.collect { | |
'-Xplugin:'+ it.absolutePath | |
} | |
// Add existing parameters | |
List<String> existingParameters = scalaCompileOptions.additionalParameters | |
if (existingParameters) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins { | |
id 'scala' | |
} | |
configurations { | |
scalaCompilerPlugin | |
} | |
dependencies { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package experiments | |
import experiments.expectation.EquivalenceExpectationResult | |
import shapeless._ | |
trait EquivalenceExpectation[-In] { | |
type Result | |
def apply(actual:In, expected:In):Result | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace FSharp.EventSourcing | |
open System | |
open System.Threading.Tasks | |
open Orleankka | |
open Orleankka.FSharp | |
open Strategies.Contracts | |
open System.Collections |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Requires -Version 4.0 | |
$ErrorActionPreference = 'Stop' | |
# Ignoring progress stream is vital to keep the performance | |
# of Invoke-WebRequest decent in Teamcity | |
$ProgressPreference = 'SilentlyContinue' | |
function global:RestoreBuildLevelPackages { | |
# Download paket.exe. | |
# Use --prefer-nuget to get it from nuget.org first as it is quicker (compressed .nupkg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Cake.Core; | |
using Cake.Core.Diagnostics; | |
using Cake.Core.IO; | |
using Cake.Core.Tooling; | |
using NSubstitute; | |
namespace Mohawk.Cake.Fixtures | |
{ | |
public sealed class CakeContextFixture | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using Akka.Configuration; | |
using Microsoft.Extensions.Configuration; | |
using Newtonsoft.Json.Linq; | |
namespace Akka.Configuration | |
{ | |
public static class ConfigExtensions | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare | |
table_count integer; | |
begin | |
select count (object_id) into table_count from user_objects where exists ( | |
select object_name from user_objects where (object_name = upper('{0}') and object_type = 'TABLE')); | |
if table_count = 0 then | |
dbms_output.put_line('Creating the {0} table'); | |
execute immediate ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Script to restore nuget packages | |
.DESCRIPTION | |
Script to restore nuget packages | |
.PARAMETER Site | |
The web site name. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// credit: http://madskristensen.net/post/A-shorter-and-URL-friendly-GUID | |
using System; | |
public static class GuidEncoder | |
{ | |
public static string Encode(string guidText) | |
{ | |
Guid guid = new Guid(guidText); | |
return Encode(guid); | |
} |