based on original document from Alan Stevens
- Install using Local Account first, attach Microsoft account later
(* | |
This script analyzes the dependencies between top level types in a .NET Assembly. | |
It is then used to compare the dependency relationships in some F# projects with those in some C# projects. | |
Note that no attempt has been made to optimize the code yet! | |
REQUIRES: | |
* Mono.Cecil for code analysis | |
From http://www.mono-project.com/Cecil#Download |
// StartResult would be the type of the response. Must be marked with [<CLIMutable>] | |
let response = | |
restWithResponse<StartResult> ( | |
POST >> toResource "stopwatch/{type}/{key}/start" >> atUrl config.Url | |
>> withUrlSegment "type" stopwatchType | |
>> withUrlSegment "key" key | |
>> withFormValue "owner" owner | |
>> withExpectedStatusOk | |
) |
module Tuple2 | |
let replicate x = x, x | |
let curry f x y = f (x, y) | |
let uncurry f (x, y) = f x y | |
let swap (x, y) = (y, x) |
based on original document from Alan Stevens
public class DebounceDispatcher | |
{ | |
private DispatcherTimer timer; | |
public void Debounce(int timeout, Action<object> action, | |
object param = null, | |
DispatcherPriority priority = DispatcherPriority.ApplicationIdle, | |
Dispatcher disp = null) | |
{ | |
if (disp == null) |
// General hints on defining types with constraints or invariants | |
// | |
// Just as in C#, use a private constructor | |
// and expose "factory" methods that enforce the constraints | |
// | |
// In F#, only classes can have private constructors with public members. | |
// | |
// If you want to use the record and DU types, the whole type becomes | |
// private, which means that you also need to provide: | |
// * a constructor function ("create"). |
# Description: Boxstarter Script | |
# Author: Jess Frazelle <jess@linux.com> | |
# Last Updated: 2017-09-11 | |
# | |
# Install boxstarter: | |
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
# | |
# You might need to set: Set-ExecutionPolicy RemoteSigned | |
# | |
# Run this boxstarter by calling the following from an **elevated** command-prompt: |
#Put this in Export-Chocolatey.ps1 file and run it: | |
#.\Export-Chocolatey.ps1 > packages.config | |
#You can install the packages using | |
#choco install packages.config -y | |
Write-Output "<?xml version=`"1.0`" encoding=`"utf-8`"?>" | |
Write-Output "<packages>" | |
choco list -lo -r -y | % { " <package id=`"$($_.SubString(0, $_.IndexOf("|")))`" version=`"$($_.SubString($_.IndexOf("|") + 1))`" />" } | |
Write-Output "</packages>" |