- Settings -> Windows Update
- Install all updates
- launch Windows Powershell as administrator and execute:
### | |
### | |
### UPDATE: For Win 11, I recommend using this tool in place of this script: | |
### https://christitus.com/windows-tool/ | |
### https://github.com/ChrisTitusTech/winutil | |
### https://www.youtube.com/watch?v=6UQZ5oQg8XA | |
### iwr -useb https://christitus.com/win | iex | |
### | |
### |
#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>" |
# 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: |
// 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"). |
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) |
based on original document from Alan Stevens
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) |
// 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 | |
) |