This file contains hidden or 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
New-Item -ItemType directory -Path ".paket" | |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
$tag = (Invoke-WebRequest -Uri https://api.github.com/repos/fsprojects/Paket/releases | ConvertFrom-Json)[0].tag_name | |
$uri = " https://github.com/fsprojects/Paket/releases/download/" + $tag + "/paket.bootstrapper.exe" | |
Invoke-WebRequest $uri -OutFile .paket/paket.exe |
This file contains hidden or 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
#r "packages/NETStandard.Library/build/netstandard2.0/ref/netstandard.dll" | |
open canopy.csharp | |
#r "packages/Selenium.WebDriver/lib/netstandard2.0/WebDriver.dll" | |
#r "packages/canopy/lib/netstandard2.0/canopy.dll" | |
open System | |
open canopy.classic | |
open OpenQA.Selenium | |
/////////////////////////////////////// |
This file contains hidden or 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
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
# $tag = (Invoke-WebRequest -Uri https://api.github.com/repos/npryce/adr-tools/releases | ConvertFrom-Json)[0].tag_name | |
# Set explicit version due to https://github.com/npryce/adr-tools/issues/71 | |
$tag = "2.1.0" | |
$uri = " https://github.com/npryce/adr-tools/archive/" + $tag + ".zip" | |
Invoke-WebRequest $uri -OutFile C:\Temp\adr.zip | |
Expand-Archive "C:\Temp\adr.zip" -Force -DestinationPath "C:\Temp\" | |
$src = "C:\Temp\adr-tools-" + $tag + "\src\*" | |
Copy-Item -Force -Recurse -Verbose $src -Destination "C:\Program Files\Git\usr\bin\" |
This file contains hidden or 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
wget https://github.com/npryce/adr-tools/archive/3.0.0.tar.gz | |
tar -xf 3.0.0.tar.gz | |
export PATH="$PATH:~/adr-tools-3.0.0/src/" | |
source ~/.profile |
This file contains hidden or 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 System.Linq; | |
namespace X | |
{ | |
public class Result | |
{ | |
public static Result Success() => new Result(); | |
public static Result Fail(params Exception[] exceptions) => new Result(exceptions); |
This file contains hidden or 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
$buildToolsUrl = "https://aka.ms/vs/15/release/vs_buildtools.exe" | |
$installLocation = "C:\TEMP\vs_buildtools.exe" | |
(New-Object System.Net.WebClient).DownloadFile($buildToolsUrl, $installLocation) |
This file contains hidden or 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 Native | |
type HookProc = delegate of int * nativeint * nativeint -> nativeint | |
module User32 = | |
open System.Runtime.InteropServices | |
[<DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)>] | |
extern nativeint SetWindowsHookEx(int idHook, HookProc lpfn, nativeint hMod, uint32 dwThreadId) |
This file contains hidden or 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
#r "packages/PdfSharp/lib/net20/PdfSharp.dll" | |
open PdfSharp.Pdf.IO | |
open System.Text | |
open PdfSharp.Pdf.Content.Objects | |
open PdfSharp.Pdf.Content | |
let rec extractText(content:CObject, sb:StringBuilder) = | |
match content with | |
| :? CArray as xs -> for x in xs do extractText(x, sb) |
This file contains hidden or 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
open System.IO | |
open Microsoft.FSharp.Reflection | |
open System | |
type Array = | |
static member join delimiter xs = | |
xs | |
|> Array.map (fun x -> x.ToString()) | |
|> String.concat delimiter |
This file contains hidden or 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
function New-Paket { | |
mkdir .paket | |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | |
$tag = (Invoke-WebRequest -Uri https://api.github.com/repos/fsprojects/Paket/releases | ConvertFrom-Json)[0].tag_name | |
$uri = " https://github.com/fsprojects/Paket/releases/download/" + $tag + "/paket.bootstrapper.exe" | |
Invoke-WebRequest $uri -OutFile .paket/paket.exe | |
} |