All is from a cygwin console like Babun under windows.
openssl genrsa -des3 -out root-ca.key 2048
static class LibGit2SharpForLinqPad | |
{ | |
[DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] | |
static extern bool SetDllDirectory(string lpPathName); | |
[DllImport("kernel32.dll", CharSet = CharSet.Unicode, EntryPoint = "GetDllDirectory", SetLastError = true)] | |
static extern uint GetDllDirectoryPInvoke(uint length, StringBuilder lpPathName); | |
static string GetDllDirectory() | |
{ |
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<handlers> | |
<remove name="httpplatformhandler" /> | |
<add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" /> | |
</handlers> | |
<httpPlatform | |
stdoutLogEnabled="true" | |
stdoutLogFile="./logs/SuaveIIS.log" |
#r "packages/FAKE/tools/FakeLib.dll" | |
namespace BlackFox | |
/// Allow to define FAKE tasks with a syntax similar to Gulp tasks | |
[<AutoOpen>] | |
module TaskDefinitionHelper = | |
open Fake | |
open System | |
open System.Text.RegularExpressions |
/// Escape arguments in a form that programs parsing it as Microsoft C Runtime will successfuly understand | |
/// Rules taken from http://www.daviddeley.com/autohotkey/parameters/parameters.htm#WINARGV | |
module MsvcrCommandLine = | |
open System.Text | |
let escapeArg (arg : string) (builder : StringBuilder) = | |
let needQuote = arg.Contains(" ") || arg.Contains("\t") | |
let rec escape (builder: StringBuilder) pos = | |
if pos >= arg.Length then | |
() |
open Microsoft.CodeAnalysis | |
open Microsoft.CodeAnalysis.CSharp | |
open Microsoft.CodeAnalysis.CSharp.Syntax | |
open Microsoft.CodeAnalysis.MSBuild | |
open Microsoft.CodeAnalysis.Formatting | |
open System.IO | |
module FluentRoslynLite = | |
let (!!) t = Async.AwaitTask t | |
let emptyFile = SyntaxFactory.CompilationUnit() |
#r @"packages/FAKE/tools/FakeLib.dll" | |
#load "./scriptcs.fsx" | |
open Fake | |
open Fake.AssemblyInfoFile | |
open Fake.ReleaseNotesHelper | |
open System | |
open System.IO | |
open Fake.ScriptCs |
using System; | |
using System.IO; | |
static class RelativePath | |
{ | |
private static string[] GetPathPart(string path) | |
{ | |
return path | |
.TrimEnd(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar) | |
.Split(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar); |
All is from a cygwin console like Babun under windows.
openssl genrsa -des3 -out root-ca.key 2048
static class EwsExtensions | |
{ | |
public static string GetFullPath(this Folder folder, string separator = "/") | |
{ | |
var folderPathProperty = new ExtendedPropertyDefinition(26293, MapiPropertyType.String); | |
var folderPathPropertySet = new PropertySet(BasePropertySet.FirstClassProperties) { folderPathProperty }; | |
var folderWithFullnameProperty = Folder.Bind(folder.Service, folder.Id, folderPathPropertySet); | |
object pathObj = null; | |
if (!folderWithFullnameProperty.TryGetProperty(folderPathProperty, out pathObj)) |
// Variant of MoreLinq Batch implementation | |
// https://code.google.com/p/morelinq/source/browse/MoreLinq/Batch.cs | |
public static IEnumerable<IEnumerable<T>> Batch<T>(IEnumerable<T> source, int size) | |
{ | |
T[] bucket = null; | |
var count = 0; | |
foreach (var item in source) | |
{ |